- Load the test file and warp to MAP01.
- Type in the console: "give TestInv; use TestInv".
- In both GZDoom 3.7.2 and GZDoom g3.8pre-718-g6c91d15b0, the following is printed: "Result = 699".
- Go to the red teleporter to enter MAP02.
- Type "use TestInv" in the console. In GZDoom 3.7.2, the result is 699 as before, while in GZDoom g3.8pre-718-g6c91d15b0 the value is different (always less than 699).
level.time seems to return wrong values in hubs
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
- Player701
-
- Posts: 1636
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
- Contact:
level.time seems to return wrong values in hubs
This is probably related to the recent "level refactor" changes. One of the symptoms of this issue is that the old method for calculating player's air supply value (player.air_finished - level.time) no longer works correctly in a hub. See the steps below to reproduce the issue.
- Attachments
-
- air_test.pk3
- (4 KiB) Downloaded 28 times
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: level.time seems to return wrong values in hubs
Basing these on the hub timer was simply broken, I changed several such things to be based on the map timer. If this breaks some HUDs, I'm sorry, but this change was necessary.
- Player701
-
- Posts: 1636
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
- Contact:
Re: level.time seems to return wrong values in hubs
I see. I reported this because backwards compatibility is usually preserved, and when something breaks due to recent changes, it looks like a bug to me. Well, I guess this is yet another reason why I'll have to update my mod again for the new release...
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: level.time seems to return wrong values in hubs
Normally, yes, but I cannot leave bugs in the engine just because mods may depend on them. Fortunately there's not so many hub-based mods out there that have underwater areas so the effect of this is rather limited.
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: level.time seems to return wrong values in hubs
Is this change from time to maptime meant to be for specific air-supply-related cases only? Because I see, for instance, BaseStatusBar.GetAirTime() and ACS's GetAirSupply() are still using time instead of maptime.Graf Zahl wrote:Basing these on the hub timer was simply broken, I changed several such things to be based on the map timer.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: level.time seems to return wrong values in hubs
From the looks of it the change was incomplete. Several places still used level.time instead of the more robust level.maptime for checking it.