From b3a7c70c015792351a394c7358b1b3e025dbd67d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 17 Jan 2011 00:33:20 +0000 Subject: [PATCH] - changed ACS Checkweapon to compare names instead of strings. SVN r3107 (trunk) --- src/p_acs.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 72648a052..19101bfb8 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -6025,18 +6025,17 @@ int DLevelScript::RunScript () sp--; break; - case PCD_CHECKWEAPON: - if (activator == NULL || activator->player == NULL || // Non-players do not have weapons - activator->player->ReadyWeapon == NULL) - { - STACK(1) = 0; - } - else - { - STACK(1) = 0 == stricmp (FBehavior::StaticLookupString (STACK(1)), - activator->player->ReadyWeapon->GetClass()->TypeName.GetChars()); - } - break; + case PCD_CHECKWEAPON: + if (activator == NULL || activator->player == NULL || // Non-players do not have weapons + activator->player->ReadyWeapon == NULL) + { + STACK(1) = 0; + } + else + { + STACK(1) = activator->player->ReadyWeapon->GetClass()->TypeName == FName(FBehavior::StaticLookupString (STACK(1)), true); + } + break; case PCD_SETWEAPON: if (activator == NULL || activator->player == NULL)