[Change] control_rate is now defined as a float.
This commit is contained in:
parent
7bf8d63e00
commit
29ba80afba
2
src/ai.c
2
src/ai.c
@ -399,7 +399,7 @@ void ai_think(Pilot* pilot) {
|
|||||||
if((cur_pilot->tcontrol < SDL_GetTicks()) || (cur_pilot->task == NULL)) {
|
if((cur_pilot->tcontrol < SDL_GetTicks()) || (cur_pilot->task == NULL)) {
|
||||||
ai_run(L, "control"); /* Run control. */
|
ai_run(L, "control"); /* Run control. */
|
||||||
lua_getglobal(L, "control_rate");
|
lua_getglobal(L, "control_rate");
|
||||||
cur_pilot->tcontrol = SDL_GetTicks() + 1000*(int)lua_tonumber(L, -1);
|
cur_pilot->tcontrol = SDL_GetTicks() + (int)(1000.*lua_tonumber(L, -1));
|
||||||
}
|
}
|
||||||
if(cur_pilot->task)
|
if(cur_pilot->task)
|
||||||
/* Pilot has a currently running task. */
|
/* Pilot has a currently running task. */
|
||||||
|
Loading…
Reference in New Issue
Block a user