From 1c5103c9b1aa82f9964f5dd29e8ca27133409a76 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 16 Dec 2009 22:42:15 +0000 Subject: [PATCH] - Fixed: Morphed players tried endlessly to switch to a weapon they picked up. SVN r2027 (trunk) --- docs/rh-log.txt | 3 ++- src/p_pspr.cpp | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 5909da9aa..c3c5da73d 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,5 +1,6 @@ December 16, 2009 (Changes by Graf Zahl) -- fixed:P_DamageMobj just set an ice corpse's velocity to 0 to make it shatter. +- Fixed: Morphed players tried endlessly to switch to a weapon they picked up. +- fixed: P_DamageMobj just set an ice corpse's velocity to 0 to make it shatter. But that's insufficient because it doesn't factor in any subsequent velocity change that happens between the damaging and the next call to A_FreezeDeathChunks. - fixed: The TimeFreezer did not freeze other players' controls in a diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index 0b464aab2..e8751c1f0 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -505,6 +505,11 @@ void P_CheckWeaponSwitch (player_t *player) P_SetPsprite (player, ps_weapon, weapon->GetDownState()); return; } + else if (player->morphTics != 0) + { + // morphed classes cannot change weapons so don't even try again. + player->PendingWeapon = WP_NOCHANGE; + } } //---------------------------------------------------------------------------