Fixing invalid timings with the movements of the player

This commit is contained in:
Anonymus Raccoon
2020-04-02 14:53:34 +02:00
parent 2f27e2e812
commit 704e19f2f0
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ struct controllable_component
gc_component base;
int movement_x;
int movement_y;
int move_callback;
float move_callback;
};
extern const struct controllable_component controllable_component;
+2 -2
View File
@@ -48,9 +48,9 @@ float dtime)
link->tile->entity = NULL;
new_tile->entity = entity;
engine->trigger_event(engine, "entity_moved", entity, link->tile);
ctl->move_callback = 10;
ctl->move_callback = .2f;
}
ctl->move_callback--;
ctl->move_callback -= dtime;
}
static void ctr(void *system, va_list list)