Powered weapon crash after weapon powerup expires

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
Talon1024
 
 
Posts: 374
Joined: Mon Jun 27, 2016 7:26 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Contact:

Powered weapon crash after weapon powerup expires

Post by Talon1024 »

Calling action functions from the states of a powered-up weapon after the Tome of Power has expired causes the VM to abort.

To reproduce:
1. Give yourself an EtherealCrashbow and a Tome of power (ArtiTomeOfPower).
2. Wait until the Tome of power is almost expired.
3. Fire the EtherealCrashbow.
4. The VM will abort when it is about to go to the next state of EtherealCrashbowPowered, and the tome of power has expired.

Sample decorate code, with long states in order to exemplify the issue.

Code: Select all

actor EtherealCrashbow : Crossbow replaces Crossbow
{
	Weapon.SisterWeapon "EtherealCrashbowPowered"
}

actor EtherealCrashbowPowered : CrossbowPowered
{
	Weapon.SisterWeapon "EtherealCrashbow"
	States
	{
	Fire:
		CRBW D 70 A_FireCrossbowPL2
		CRBW E 70 A_FireProjectile("MinotaurFX2")
		CRBW F 70 A_FireProjectile("MinotaurFX2")
		CRBW G 70 A_FireProjectile("MinotaurFX2")
		CRBW H 70 A_FireProjectile("MinotaurFX2")
		CRBW A 70 A_FireProjectile("MinotaurFX2")
		CRBW B 70 A_FireProjectile("MinotaurFX2")
		CRBW C 70 A_ReFire
		Goto Ready
	}
}
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Powered weapon crash after weapon powerup expires

Post by Graf Zahl »

Fixed. Next time, please do not make an example that is harmful to the player!
Post Reply

Return to “Closed Bugs [GZDoom]”