From 29ba80afba4f22bffeb618cd1ede6bfc1bc2e829 Mon Sep 17 00:00:00 2001 From: Allanis Date: Sat, 9 Nov 2013 00:02:06 +0000 Subject: [PATCH] [Change] control_rate is now defined as a float. --- src/ai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ai.c b/src/ai.c index 7f90af5..e2f44e8 100644 --- a/src/ai.c +++ b/src/ai.c @@ -399,7 +399,7 @@ void ai_think(Pilot* pilot) { if((cur_pilot->tcontrol < SDL_GetTicks()) || (cur_pilot->task == NULL)) { ai_run(L, "control"); /* Run control. */ 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) /* Pilot has a currently running task. */