2025-08-09 06:44 CEST

spring: develop e046ffe7 Diff ] Back to Repository ]
Author Committer Branch Timestamp Parent
Tobi Vollebregt Tobi Vollebregt develop 2011-03-21 22:31:28 develop 031c57db
Changeset Update gs->frameNum before calling GameFrame call-in

This fixes e.g. TTLs of CEGs being emitted by LUS after a Sleep or
WaitFor being one lower than specified.

The "wrong" frameNum is still passed to Lua to prevent breaking code
that depends on the existance of frame 0. (it doesn't exist, really!)

Note that this does mean that Spring.GetGameFrame, Spring.GetGameSeconds
return a value 1 frame higher than before / than passed as argument to
GameFrame, when called from within the GameFrame call-in.
mod - cont/base/springcontent/LuaGadgets/Gadgets/unit_script.lua Diff ] File ]
mod - rts/Game/Game.cpp Diff ] File ]