aboutsummaryrefslogtreecommitdiff
path: root/game/workers/WorkerScript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/workers/WorkerScript.cpp')
-rw-r--r--game/workers/WorkerScript.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/game/workers/WorkerScript.cpp b/game/workers/WorkerScript.cpp
index d641c6a..1bcf8d5 100644
--- a/game/workers/WorkerScript.cpp
+++ b/game/workers/WorkerScript.cpp
@@ -53,6 +53,8 @@ void WorkerScript::fixed_update(duration_t dt) {
= -rb_worker.data.linear_velocity.x / 5;
animator_worker.back().get().data.fps
= -rb_worker.data.linear_velocity.x / 5;
+ animator_worker.front().get().set_anim(0);
+ animator_worker.back().get().set_anim(0);
} else {
sprite_worker.front().get().data.flip.flip_x = false;
sprite_worker.back().get().data.flip.flip_x = false;
@@ -61,6 +63,8 @@ void WorkerScript::fixed_update(duration_t dt) {
= rb_worker.data.linear_velocity.x / 5;
animator_worker.back().get().data.fps
= rb_worker.data.linear_velocity.x / 5;
+ animator_worker.front().get().set_anim(0);
+ animator_worker.back().get().set_anim(0);
}
}
} else {
@@ -89,6 +93,9 @@ void WorkerScript::fixed_update(duration_t dt) {
= -rb_worker.data.linear_velocity.x / 5;
animator_worker.back().get().data.fps
= -rb_worker.data.linear_velocity.x / 5;
+
+ animator_worker.front().get().set_anim(0);
+ animator_worker.back().get().set_anim(0);
} else {
sprite_worker.front().get().data.flip.flip_x = false;
sprite_worker.back().get().data.flip.flip_x = false;
@@ -97,6 +104,9 @@ void WorkerScript::fixed_update(duration_t dt) {
= rb_worker.data.linear_velocity.x / 5;
animator_worker.back().get().data.fps
= rb_worker.data.linear_velocity.x / 5;
+
+ animator_worker.front().get().set_anim(0);
+ animator_worker.back().get().set_anim(0);
}
}
}