From be2fe0f3043b8ddbbcf873ec15c8a30be1825ce6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 13 Jun 2022 00:08:34 +0200 Subject: [PATCH] - check point pushers/pullers by inheritance, not absiolute match --- src/maploader/specials.cpp | 8 ++++---- src/playsim/mapthinkers/a_pusher.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/maploader/specials.cpp b/src/maploader/specials.cpp index ef076cae8..369f1377c 100644 --- a/src/maploader/specials.cpp +++ b/src/maploader/specials.cpp @@ -1148,8 +1148,8 @@ AActor *MapLoader::GetPushThing(int s) thing = sec->thinglist; while (thing && - thing->GetClass()->TypeName != NAME_PointPusher && - thing->GetClass()->TypeName != NAME_PointPuller) + !thing->IsKindOf(NAME_PointPusher) && + !thing->IsKindOf(NAME_PointPuller)) { thing = thing->snext; } @@ -1208,8 +1208,8 @@ void MapLoader::SpawnPushers() while ((thing = iterator.Next())) { - if (thing->GetClass()->TypeName == NAME_PointPusher || - thing->GetClass()->TypeName == NAME_PointPuller) + if (thing->IsKindOf(NAME_PointPusher) || + thing->IsKindOf(NAME_PointPuller)) { Level->CreateThinker(DPusher::p_push, l->args[3] ? l : NULL, l->args[2], 0, thing, thing->Sector->Index()); } diff --git a/src/playsim/mapthinkers/a_pusher.cpp b/src/playsim/mapthinkers/a_pusher.cpp index 588ce338c..6cf9b0c7b 100644 --- a/src/playsim/mapthinkers/a_pusher.cpp +++ b/src/playsim/mapthinkers/a_pusher.cpp @@ -232,7 +232,7 @@ void DPusher::Tick () if ((speed > 0) && (P_CheckSight (thing, m_Source, SF_IGNOREVISIBILITY))) { DAngle pushangle = pos.Angle(); - if (m_Source->GetClass()->TypeName == NAME_PointPuller) pushangle += 180; + if (m_Source->IsKindOf(NAME_PointPuller)) pushangle += 180; thing->Thrust(pushangle, speed); } }