A_WeaponOffset affecting A_OverlayOffset without the flag

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
Serino
Posts: 4
Joined: Tue Apr 23, 2019 8:19 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

A_WeaponOffset affecting A_OverlayOffset without the flag

Post by Serino »

Hello. I apologise if this is already known, not a bug, or a mistake on my part. I created a pistol which inherits from a base weapon. Its alt-fire is supposed to perform a kick attack, with some of the frames using A_WeaponOffset including interpolation in order to smoothen the animation. Once a kick attack is executed, an overlay is called, which is supposed to make the weapon look like it's put aside. However, once A_WeaponOffset is called, the overlay's offset changes as well, despite not having the PSPF_ADDWEAPON flag.

Here's an example PK3. Once loaded, please press the Zoom button. It's a reference of how the overlay's offset should normally be adjusted. Now, please press the Alt-fire button. A kick attack will be performed and the overlay will mess up once the A_WeaponOffset function is called.
Attachments
Offset_Bug.pk3
(99.25 KiB) Downloaded 36 times
User avatar
Major Cooke
Posts: 8209
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: A_WeaponOffset affecting A_OverlayOffset without the fla

Post by Major Cooke »

I'm unable to look at the moment, but did you specifically call A_OverlayFlags and set PSPF_ADDWEAPON to false? By default, any overlay created automatically has PSPF_ADDWEAPON included.
Serino
Posts: 4
Joined: Tue Apr 23, 2019 8:19 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: A_WeaponOffset affecting A_OverlayOffset without the fla

Post by Serino »

Thank you for your response. I didn't know that. It does seem to work, although the offsets need re-adjustment. Thanks for your help! Wonder why the Wiki does not state this? Regardless, you can close this thread now. Sorry for your wasting time.
User avatar
Major Cooke
Posts: 8209
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: A_WeaponOffset affecting A_OverlayOffset without the fla

Post by Major Cooke »

It's not a waste of time, rest assured. By default it's naturally implied especially if it's assigned from a weapon.
Post Reply

Return to “Closed Bugs [GZDoom]”