Weapon destroys after trying of change state duration

Bugs that have been investigated and resolved somehow.

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.
Post Reply
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Weapon destroys after trying of change state duration

Post by Apeirogon »

Load example, type in console give boom_stick, choose it at number one, shot several times, release fire button, weapon disappear without any message.
Comment line 25 to prevent this to happening.
Attachments
set tick bug.wad
(718 Bytes) Downloaded 28 times
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Weapon destroys after trying of change state duration

Post by Graf Zahl »

You are setting the duration of the item itself, not the HUD sprite!

As long as an inventory item is owned it is displaying the 'held' state which has infinite duration. This state still gets ticked, though, and if its duration expires without a follow-up state the item will vanish.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm
Contact:

Re: Weapon destroys after trying of change state duration

Post by Arctangent »

Graf Zahl wrote:As long as an inventory item is owned it is displaying the 'held' state which has infinite duration. This state still gets ticked, though, and if its duration expires without a follow-up state the item will vanish.
Is this intentional behavior, or more just an aftereffect that might get unintentionally changed later on?

Could be a simple way to do time-limited weapons or such if it is reliable, which is an interesting thought.
User avatar
Rachael
Posts: 13531
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Weapon destroys after trying of change state duration

Post by Rachael »

The problem is, it leaves the player with a null weapon, which historically hasn't always proven stable in the game. But maybe I am wrong - maybe it's intentional to allow that.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Weapon destroys after trying of change state duration

Post by Graf Zahl »

The main issue here is that what he did qualifies as 'Don't do that'. There are legitimate reasons to allow owned weapons to run through their normal states, but mucking around with their duration is something the code cannot deal with.

I far more suspect a case of user error here, i.e. he wanted to alter the PSprite's duration - and for that it was just dead wrong.
Post Reply

Return to “Closed Bugs [GZDoom]”