diff --git a/src/p_acs.cpp b/src/p_acs.cpp index cb7da1a53..bd1f18484 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -4132,6 +4132,8 @@ enum EACSFunctions ACSF_StrLeft, ACSF_StrRight, ACSF_StrMid, + ACSF_GetActorClass, + ACSF_GetWeapon, // ZDaemon ACSF_GetTeamScore = 19620, // (int team) @@ -4653,6 +4655,12 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args) return a == NULL ? false : a->GetClass()->TypeName == FName(FBehavior::StaticLookupString(args[1])); } + case ACSF_GetActorClass: + { + AActor *a = SingleActorFromTID(args[0], activator); + return GlobalACSStrings.AddString(a == NULL ? "None" : a->GetClass()->TypeName.GetChars()); + } + case ACSF_SoundSequenceOnActor: { const char *seqname = FBehavior::StaticLookupString(args[1]); @@ -5025,6 +5033,17 @@ doplaysound: if (!looping) } break; + case ACSF_GetWeapon: + if (activator == NULL || activator->player == NULL || // Non-players do not have weapons + activator->player->ReadyWeapon == NULL) + { + return GlobalACSStrings.AddString("None"); + } + else + { + return GlobalACSStrings.AddString(activator->player->ReadyWeapon->GetClass()->TypeName.GetChars()); + } + default: break; }