View Issue Details

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

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.

Activities

Gamesnert

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.

mabako

2010-03-21 19:47

updater   ~~0011226

http://github.com/marcusbauer/multitheftauto/commit/bbf750a51de331077bfa840b97d53c2f5eb9544e

x86

2010-03-23 12:19

administrator   ~~0011239

Fixed in: http://github.com/multitheftauto/multitheftauto/commit/edfb0a829ece14a4886025faeaf6a7123037478d

Issue History

Date Modified Username Field Change