View Issue Details

IDProjectCategoryView StatusLast Update
0005249Multi Theft Auto : San AndreasScriptingpublic2010-03-23 18:20
ReporterGamesnert Assigned Tomabako  
Status resolvedResolutionfixed 
Target Version1.0.4Fixed in Version1.0.4 
Summary0005249: Only 1 timer can elapse per frame

The title pretty much says all. If you've got a lot of timers, you can enjoy them a long, long time.

Steps To Reproduce

This little runcode test should make it quite clear:

crun function drawSomeText() dxDrawText(tostring(getTickCount()-tick),0,0) end
crun for i=1,3600 do tick=getTickCount() setTimer(drawSomeText,50,1) end

On 36 FPS, this took just a little longer than 100 seconds.

36 FPS * 100 s = 3600 frames

3600 timers were set, so 1 elapsed per frame.

Additional Information

Not yet tested server-side, but I assume it should do the same.

TagsNo tags attached.



2010-03-21 17:02

developer   ~~0011223

Just tested it on the server, same issue:

run function drawSomeText() print(tostring(getTickCount()-tick)) end
run for i=1,3600 do tick=getTickCount() setTimer(drawSomeText,50,1) end

Ran for about 40 seconds, with around 60 - 100 FPS.


2010-03-21 19:47

updater   ~~0011226


2010-03-23 12:19

administrator   ~~0011239

Fixed in:

Issue History

Date Modified Username Field Change