Anyone else noticed this?

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
User avatar
Turbo
Posts: 161
Joined: Tue Mar 22, 2011 1:54 pm

Anyone else noticed this?

Post by Turbo »

I've noticed recently with the later versions of ZDoom/GZDoom SVN that the muzzle flash sprite on the pistol stays somewhat longer on the screen than before:

Image

Anyone else noticed this or know what could cause this to happen?
User avatar
FDARI
Posts: 1097
Joined: Tue Nov 03, 2009 9:19 am

Re: Anyone else noticed this?

Post by FDARI »

It may be related to a bug I used to pick on. Under some circumstances circumstances the gun flash could skip a tick. http://forum.zdoom.org/viewtopic.php?f= ... sh#p600581
The bug primarily or exclusively affected flash states that were not triggered immediately upon the press of the fire/altfire-button.

Pistol fire:

Code: Select all

    PISG A 4 // if flash had been triggered here, the bug would not have occured, because it would have started flash during input processing

    PISG B 6 A_FirePistol // triggers flash during overlay state processing; would (buggy) be followed by regular processing of the flash overlay during the same tick
    PISG C 4
 
   PISG B 5 A_ReFire
    Goto Ready
The gun flash is set to last 7 ticks, but would process two ticks in its first moment of existence. So you may be noticing the single tick difference. I wouldn't have.
User avatar
Turbo
Posts: 161
Joined: Tue Mar 22, 2011 1:54 pm

Re: Anyone else noticed this?

Post by Turbo »

@FDARI: Interesting
I found an older version of GZDoom (1. 0. 27 - 2. 1. 7XX (r553) : Oct 11 2007) which I tried, and the bug does not seem to be present there at all.
User avatar
FDARI
Posts: 1097
Joined: Tue Nov 03, 2009 9:19 am

Re: Anyone else noticed this?

Post by FDARI »

Perhaps the overlay states were handled differently back then, or perhaps gzdoom differs in this department (less likely). I'd have to check out that revision to find out, and... I'm not very keen to do that. Maybe somebody else knows. ZDoom revision r3500 contains the fix. Getting a revision close to that (created prior to april 1. 2012) might allow you to see the pre-fix behaviour.
User avatar
Turbo
Posts: 161
Joined: Tue Mar 22, 2011 1:54 pm

Re: Anyone else noticed this?

Post by Turbo »

I have no luck finding an approximate revision before r3500.
I did however take a look at the code in the modified files in r3500 and compare them to r3499:

In p_pspr.cpp of r3500, the if-statement

Code: Select all

if ((state = psp->state) != NULL && psp->processPending)
in the function void P_MovePsprites (player_t *player) is different in r3499 where it says

Code: Select all

if ((state = psp->state) != NULL)
In p_pspr.h of r3500, I noticed a declaration of a new function called P_NewPspriteTick(), which is defined in p_prspr.cpp and called once in p_tick.cpp in the function void P_Ticker (void).
Here is the code for the function:
Spoiler:
If I had the whole source code + project/solution files, I'd like to try commenting out the call to P_NewPspriteTick() or changing the contents of the function to see if it would affect pistol's flash time ingame.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: Anyone else noticed this?

Post by Edward-san »

User avatar
Turbo
Posts: 161
Joined: Tue Mar 22, 2011 1:54 pm

Re: Anyone else noticed this?

Post by Turbo »

@Edward-san: Thanks!
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Re: Anyone else noticed this?

Post by DoomRater »

This could affect a certain implementation of a few weapons I made, since they are using the flash states to display and fire a second weapon.
Post Reply

Return to “General”