From d09ec5a930e3e16bb234e4a46a82394300620735 Mon Sep 17 00:00:00 2001 From: Blue-Shadow Date: Tue, 19 Jul 2016 03:16:12 +0300 Subject: [PATCH] Added DamageType ACS actor property --- src/p_acs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 919834a06..01953cad9 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -3719,6 +3719,7 @@ enum APROP_DamageMultiplier=43, APROP_MaxStepHeight = 44, APROP_MaxDropOffHeight= 45, + APROP_DamageType = 46, }; // These are needed for ACS's APROP_RenderStyle @@ -3978,6 +3979,9 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value) actor->MaxDropOffHeight = ACSToDouble(value); break; + case APROP_DamageType: + actor->DamageType = FBehavior::StaticLookupString(value); + break; default: // do nothing. @@ -4081,6 +4085,7 @@ int DLevelScript::GetActorProperty (int tid, int property) case APROP_Friction: return DoubleToACS(actor->Friction); case APROP_MaxStepHeight: return DoubleToACS(actor->MaxStepHeight); case APROP_MaxDropOffHeight: return DoubleToACS(actor->MaxDropOffHeight); + case APROP_DamageType: return GlobalACSStrings.AddString(actor->DamageType); default: return 0; } @@ -4153,6 +4158,7 @@ int DLevelScript::CheckActorProperty (int tid, int property, int value) case APROP_ActiveSound: string = actor->ActiveSound; break; case APROP_Species: string = actor->GetSpecies(); break; case APROP_NameTag: string = actor->GetTag(); break; + case APROP_DamageType: string = actor->DamageType; break; } if (string == NULL) string = ""; return (!stricmp(string, FBehavior::StaticLookupString(value)));