To clarify, I am referring to function Tick()'s float variable, (usually) known as Deltatime.
When I define function Tick, it is called offline with a correct deltatime, properly showing the time between the last tick and the current tick. When I run it online, however, the deltatime that is defined when Tick() is called is many times what it should be. I'm finding that 3-5 seconds worth of operation is executed in just 1 second. This is hazardous to my Inventory's charge, which depletes itself based on the deltatime, at a rate much faster than the proper rate demonstrated in a standalone game.
I could use function Timer(), but it is already in use as inherited (and slightly modified) code from the Inventory's superclass, UT_JumpBoots.
What's wrong, and how can I fix it?
To aid your investigations, here is the source code for my JetBoots.
Any and all help is greatly appreciated.
EDIT:
The Deltatime problem might be related to a problem with Timer that I have found. I call SetTimer(0.05,true) and Timer() gets called every second, by the looks of it.
It's not something wrong with my machine, for the record, because the class 'flakslug' calls Timer() every 0.04 seconds successfully. I don't know why it works for the flakslug but not for the JetBoots. it's very frustrating. What variables do I need to change??
Anyway, I found this Timer problem because I:
figured out what the UT_JumpBoots' original timer did -> concluded I didn't need it -> moved appropriate code from Tick() into Timer()
So here's an updated version of the mod with the attempted Timer fix:
When I define function Tick, it is called offline with a correct deltatime, properly showing the time between the last tick and the current tick. When I run it online, however, the deltatime that is defined when Tick() is called is many times what it should be. I'm finding that 3-5 seconds worth of operation is executed in just 1 second. This is hazardous to my Inventory's charge, which depletes itself based on the deltatime, at a rate much faster than the proper rate demonstrated in a standalone game.
I could use function Timer(), but it is already in use as inherited (and slightly modified) code from the Inventory's superclass, UT_JumpBoots.
What's wrong, and how can I fix it?
To aid your investigations, here is the source code for my JetBoots.
Any and all help is greatly appreciated.
EDIT:
The Deltatime problem might be related to a problem with Timer that I have found. I call SetTimer(0.05,true) and Timer() gets called every second, by the looks of it.
It's not something wrong with my machine, for the record, because the class 'flakslug' calls Timer() every 0.04 seconds successfully. I don't know why it works for the flakslug but not for the JetBoots. it's very frustrating. What variables do I need to change??
Anyway, I found this Timer problem because I:
figured out what the UT_JumpBoots' original timer did -> concluded I didn't need it -> moved appropriate code from Tick() into Timer()
So here's an updated version of the mod with the attempted Timer fix:
Attachments
Last edited: