VM abort: player.txt line 374

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
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

VM abort: player.txt line 374

Post by Major Cooke »

Code: Select all

virtual void CheckWeaponChange ()
{
	let player = self.player;
	if ((player.WeaponState & WF_DISABLESWITCH) || // <----------------------------------------------------------------Aborts here
		player.morphTics != 0)					// Morphed classes cannot change weapons.
	{ // ...so throw away any pending weapon requests.
		player.PendingWeapon = WP_NOCHANGE;
	}

	// Put the weapon away if the player has a pending weapon or has died, and
	// we're at a place in the state sequence where dropping the weapon is okay.
	if ((player.PendingWeapon != WP_NOCHANGE || player.health <= 0) &&
		player.WeaponState & WF_WEAPONSWITCHOK)
	{
		player.DropWeapon();
	}
}
Specifically:

Code: Select all

if ((player.WeaponState & WF_DISABLESWITCH) ||
This can happen when morphing, it would appear.
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: VM abort: player.txt line 374

Post by Graf Zahl »

How can I reproduce this? You are particularly vague on that aspect.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: VM abort: player.txt line 374

Post by Major Cooke »

Good question. Unfortunately, it's sporadic when playing D4D, so I cannot present a quick and easy demonstration.

Here's the resources and here's the bleeding edge.

Just put them in the same folder together and only load Doom4Doom-master.zip, it will auto-load the resources package for you.

I should also note I'm playing on maps like Dark Tartarus which makes extensive use of voodoo dolls.

I attempted to fix it myself by adding in at the top:

Code: Select all

if (!player || !player.mo)
	return;
I haven't encountered further aborts as of yet...
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: VM abort: player.txt line 374

Post by Graf Zahl »

Morphing and voodoo dolls are a match made in hell... :?
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: VM abort: player.txt line 374

Post by Graf Zahl »

fixed.
Post Reply

Return to “Closed Bugs [GZDoom]”