mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- Exported Point pushers, CustomSprite and AmbientSound to DECORATE.
SVN r1131 (trunk)
This commit is contained in:
parent
e010561088
commit
bd50321357
9 changed files with 70 additions and 62 deletions
|
@ -1,4 +1,5 @@
|
|||
August 8, 2008 (Changes by Graf Zahl)
|
||||
- Exported Point pushers, CustomSprite and AmbientSound to DECORATE.
|
||||
- Changed increased lightning damage for Centaurs into a damage factor.
|
||||
- Changed PoisonCloud and Lightning special treatment in P_DamageMobj to use damage
|
||||
types instead to keep dependencies on specific actor types out of the main engine code.
|
||||
|
|
|
@ -78,24 +78,6 @@ private:
|
|||
DImpactDecal();
|
||||
};
|
||||
|
||||
class AAmbientSound : public AActor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AAmbientSound, AActor)
|
||||
public:
|
||||
void Serialize (FArchive &arc);
|
||||
|
||||
void BeginPlay ();
|
||||
void Tick ();
|
||||
void Activate (AActor *activator);
|
||||
void Deactivate (AActor *activator);
|
||||
|
||||
protected:
|
||||
bool bActive;
|
||||
private:
|
||||
void SetTicker (struct AmbientSound *ambient);
|
||||
int NextCheck;
|
||||
};
|
||||
|
||||
class ATeleportFog : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (ATeleportFog, AActor)
|
||||
|
|
|
@ -52,6 +52,9 @@ xx(DoorCreak)
|
|||
xx(DoorMetal2)
|
||||
xx(Wind)
|
||||
|
||||
xx(PointPusher)
|
||||
xx(PointPuller)
|
||||
|
||||
xx(BulletPuff)
|
||||
xx(StrifePuff)
|
||||
xx(MaulerPuff)
|
||||
|
|
|
@ -787,20 +787,12 @@ static void Decrypt (void *to_, const void *from_, int len, int key)
|
|||
|
||||
class ACustomSprite : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (ACustomSprite, AActor);
|
||||
DECLARE_CLASS (ACustomSprite, AActor);
|
||||
public:
|
||||
void BeginPlay ();
|
||||
};
|
||||
|
||||
FState ACustomSprite::States[] =
|
||||
{
|
||||
S_NORMAL (TNT1, 'A', -1, NULL, NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (ACustomSprite, Any, 9988, 0)
|
||||
PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY)
|
||||
PROP_SpawnState (0)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (ACustomSprite)
|
||||
|
||||
void ACustomSprite::BeginPlay ()
|
||||
{
|
||||
|
|
|
@ -3899,13 +3899,9 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
|||
{
|
||||
mthing->args[0] = mthing->type - 14000;
|
||||
mthing->type = 14065;
|
||||
i = RUNTIME_CLASS(AAmbientSound);
|
||||
}
|
||||
else
|
||||
{
|
||||
// find which type to spawn
|
||||
i = DoomEdMap.FindType (mthing->type);
|
||||
}
|
||||
// find which type to spawn
|
||||
i = DoomEdMap.FindType (mthing->type);
|
||||
|
||||
if (i == NULL)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1842,9 +1842,25 @@ CCMD (playersounds)
|
|||
|
||||
// AAmbientSound implementation ---------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AAmbientSound, Any, 14065, 0)
|
||||
PROP_Flags (MF_NOBLOCKMAP|MF_NOSECTOR)
|
||||
END_DEFAULTS
|
||||
class AAmbientSound : public AActor
|
||||
{
|
||||
DECLARE_CLASS (AAmbientSound, AActor)
|
||||
public:
|
||||
void Serialize (FArchive &arc);
|
||||
|
||||
void BeginPlay ();
|
||||
void Tick ();
|
||||
void Activate (AActor *activator);
|
||||
void Deactivate (AActor *activator);
|
||||
|
||||
protected:
|
||||
bool bActive;
|
||||
private:
|
||||
void SetTicker (struct AmbientSound *ambient);
|
||||
int NextCheck;
|
||||
};
|
||||
|
||||
IMPLEMENT_CLASS (AAmbientSound)
|
||||
|
||||
void AAmbientSound::Serialize (FArchive &arc)
|
||||
{
|
||||
|
|
|
@ -62,6 +62,20 @@ ACTOR MapSpotGravity : MapSpot 9013
|
|||
-NOGRAVITY
|
||||
}
|
||||
|
||||
// Point Pushers ---------------------------------------------------
|
||||
|
||||
ACTOR PointPusher 5001
|
||||
{
|
||||
+NOBLOCKMAP
|
||||
+INVISIBLE
|
||||
}
|
||||
|
||||
ACTOR PointPuller 5002
|
||||
{
|
||||
+NOBLOCKMAP
|
||||
+INVISIBLE
|
||||
}
|
||||
|
||||
// Bloody gibs -------------------------------------------------------------
|
||||
|
||||
ACTOR RealGibs
|
||||
|
@ -90,3 +104,17 @@ ACTOR Gibs : RealGibs 24
|
|||
SpawnID 146
|
||||
ClearFlags
|
||||
}
|
||||
|
||||
// Needed for loading Build maps ---------------------------------------
|
||||
|
||||
ACTOR CustomSprite 9988 native
|
||||
{
|
||||
+NOBLOCKMAP
|
||||
+NOGRAVITY
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
TNT1 A -1
|
||||
Stop
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
|
||||
ACTOR AmbientSound 14065 native
|
||||
{
|
||||
+NOBLOCKMAP
|
||||
+NOSECTOR
|
||||
+DONTSPLASH
|
||||
}
|
||||
|
||||
|
||||
// Heretic Sound sequences -----------------------------------------------------------
|
||||
|
||||
ACTOR HereticSoundSequence1 : SoundSequence 1200
|
||||
|
|
Loading…
Reference in a new issue