Blackheart OT
Defense in depth
Hello fellow developer,
I am running TFS 1.1 on a Windows machine. Using the latest nightly compile binaries (#581).
Let me start by explaining the problem: For items with duration set in /data/items/items.xml, attribute "duration" in seconds, the game correctly displays the duration time, however it decays them at the rate of 1 minute = 1 second. As an example, an item with "duration" = 60, would decay in 1 second, where I would expect it to decay in 60 seconds.
I tried browsing through game.cpp file, and say that every 250 ms the game checks all decay items for expiration, here it assumes that the duration variable is in ms, and this is correct since in Item::setID the duration is multiplied by 1000. The error does not appear to be here.
Ive also tried searching through the lua scripts on the server, and I cant find anything that loads items.xml. It seems that only luascript.cpp does this, and that those are the values used by Game and Item objects.
I would sincerely appreciate your help, and rep you accordingly.
-Mike
I am running TFS 1.1 on a Windows machine. Using the latest nightly compile binaries (#581).
Let me start by explaining the problem: For items with duration set in /data/items/items.xml, attribute "duration" in seconds, the game correctly displays the duration time, however it decays them at the rate of 1 minute = 1 second. As an example, an item with "duration" = 60, would decay in 1 second, where I would expect it to decay in 60 seconds.
I tried browsing through game.cpp file, and say that every 250 ms the game checks all decay items for expiration, here it assumes that the duration variable is in ms, and this is correct since in Item::setID the duration is multiplied by 1000. The error does not appear to be here.
Ive also tried searching through the lua scripts on the server, and I cant find anything that loads items.xml. It seems that only luascript.cpp does this, and that those are the values used by Game and Item objects.
I would sincerely appreciate your help, and rep you accordingly.
-Mike