[Change] control_rate is now defined as a float.

This commit is contained in:
Allanis 2013-11-09 00:02:06 +00:00
parent 7bf8d63e00
commit 29ba80afba

View File

@ -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. */