mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-21 00:51:12 +00:00
- check point pushers/pullers by inheritance, not absiolute match
This commit is contained in:
parent
851a211be2
commit
be2fe0f304
2 changed files with 5 additions and 5 deletions
|
@ -1148,8 +1148,8 @@ AActor *MapLoader::GetPushThing(int s)
|
||||||
thing = sec->thinglist;
|
thing = sec->thinglist;
|
||||||
|
|
||||||
while (thing &&
|
while (thing &&
|
||||||
thing->GetClass()->TypeName != NAME_PointPusher &&
|
!thing->IsKindOf(NAME_PointPusher) &&
|
||||||
thing->GetClass()->TypeName != NAME_PointPuller)
|
!thing->IsKindOf(NAME_PointPuller))
|
||||||
{
|
{
|
||||||
thing = thing->snext;
|
thing = thing->snext;
|
||||||
}
|
}
|
||||||
|
@ -1208,8 +1208,8 @@ void MapLoader::SpawnPushers()
|
||||||
|
|
||||||
while ((thing = iterator.Next()))
|
while ((thing = iterator.Next()))
|
||||||
{
|
{
|
||||||
if (thing->GetClass()->TypeName == NAME_PointPusher ||
|
if (thing->IsKindOf(NAME_PointPusher) ||
|
||||||
thing->GetClass()->TypeName == NAME_PointPuller)
|
thing->IsKindOf(NAME_PointPuller))
|
||||||
{
|
{
|
||||||
Level->CreateThinker<DPusher>(DPusher::p_push, l->args[3] ? l : NULL, l->args[2], 0, thing, thing->Sector->Index());
|
Level->CreateThinker<DPusher>(DPusher::p_push, l->args[3] ? l : NULL, l->args[2], 0, thing, thing->Sector->Index());
|
||||||
}
|
}
|
||||||
|
|
|
@ -232,7 +232,7 @@ void DPusher::Tick ()
|
||||||
if ((speed > 0) && (P_CheckSight (thing, m_Source, SF_IGNOREVISIBILITY)))
|
if ((speed > 0) && (P_CheckSight (thing, m_Source, SF_IGNOREVISIBILITY)))
|
||||||
{
|
{
|
||||||
DAngle pushangle = pos.Angle();
|
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);
|
thing->Thrust(pushangle, speed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue