Add slight pushback also on non-stationary entities
This commit is contained in:
@@ -217,11 +217,10 @@ void entityUpdate(ecs_iter_t *it) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stationary) {
|
const f32 force = stationary ? 4000 : 1000;
|
||||||
dir = Vector2Normalize(dir);
|
dir = Vector2Normalize(dir);
|
||||||
dir = Vector2Scale(dir, 4000 * dt);
|
dir = Vector2Scale(dir, force * dt);
|
||||||
velocity[i] = Vector2Subtract(velocity[i], dir);
|
velocity[i] = Vector2Subtract(velocity[i], dir);
|
||||||
}
|
|
||||||
|
|
||||||
slowDown = BZ_MIN(slowDown, 0.65f);
|
slowDown = BZ_MIN(slowDown, 0.65f);
|
||||||
if (!stationary && slowDown > 0.0f) {
|
if (!stationary && slowDown > 0.0f) {
|
||||||
|
|||||||
Reference in New Issue
Block a user