- Code: Select all • Expand view
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 • Expand view
if ((player.WeaponState & WF_DISABLESWITCH) ||
This can happen when morphing, it would appear.