- Exported Point pushers, CustomSprite and AmbientSound to DECORATE.

SVN r1131 (trunk)
This commit is contained in:
Christoph Oelckers 2008-08-08 16:16:40 +00:00
commit bd50321357
9 changed files with 70 additions and 62 deletions

View file

@ -1626,26 +1626,6 @@ void P_SetSectorFriction (int tag, int amount, bool alterFlag)
// types 1 & 2 is the sector containing the MT_PUSH/MT_PULL Thing.
class APointPusher : public AActor
{
DECLARE_STATELESS_ACTOR (APointPusher, AActor)
};
IMPLEMENT_STATELESS_ACTOR (APointPusher, Any, 5001, 0)
PROP_Flags (MF_NOBLOCKMAP)
PROP_RenderFlags (RF_INVISIBLE)
END_DEFAULTS
class APointPuller : public AActor
{
DECLARE_STATELESS_ACTOR (APointPuller, AActor)
};
IMPLEMENT_STATELESS_ACTOR (APointPuller, Any, 5002, 0)
PROP_Flags (MF_NOBLOCKMAP)
PROP_RenderFlags (RF_INVISIBLE)
END_DEFAULTS
#define PUSH_FACTOR 7
/////////////////////////////
@ -1742,7 +1722,7 @@ void DPusher::Tick ()
if ((speed > 0) && (P_CheckSight (thing, m_Source, 1)))
{
angle_t pushangle = R_PointToAngle2 (thing->x, thing->y, sx, sy);
if (m_Source->IsA (RUNTIME_CLASS(APointPusher)))
if (m_Source->GetClass()->TypeName == NAME_PointPusher)
pushangle += ANG180; // away
pushangle >>= ANGLETOFINESHIFT;
thing->momx += FixedMul (speed, finecosine[pushangle]);
@ -1838,8 +1818,8 @@ AActor *P_GetPushThing (int s)
thing = sec->thinglist;
while (thing &&
!thing->IsA (RUNTIME_CLASS(APointPusher)) &&
!thing->IsA (RUNTIME_CLASS(APointPuller)))
thing->GetClass()->TypeName != NAME_PointPusher &&
thing->GetClass()->TypeName != NAME_PointPuller)
{
thing = thing->snext;
}
@ -1889,10 +1869,12 @@ static void P_SpawnPushers ()
while ( (thing = iterator.Next ()) )
{
if (thing->IsA (RUNTIME_CLASS(APointPuller)) ||
thing->IsA (RUNTIME_CLASS(APointPusher)))
if (thing->GetClass()->TypeName == NAME_PointPusher ||
thing->GetClass()->TypeName == NAME_PointPuller)
{
new DPusher (DPusher::p_push, l->args[3] ? l : NULL, l->args[2],
0, thing, thing->Sector - sectors);
}
}
}
break;