mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-30 20:41:00 +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)
|
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 increased lightning damage for Centaurs into a damage factor.
|
||||||
- Changed PoisonCloud and Lightning special treatment in P_DamageMobj to use damage
|
- 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.
|
types instead to keep dependencies on specific actor types out of the main engine code.
|
||||||
|
|
|
@ -78,24 +78,6 @@ private:
|
||||||
DImpactDecal();
|
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
|
class ATeleportFog : public AActor
|
||||||
{
|
{
|
||||||
DECLARE_ACTOR (ATeleportFog, AActor)
|
DECLARE_ACTOR (ATeleportFog, AActor)
|
||||||
|
|
|
@ -52,6 +52,9 @@ xx(DoorCreak)
|
||||||
xx(DoorMetal2)
|
xx(DoorMetal2)
|
||||||
xx(Wind)
|
xx(Wind)
|
||||||
|
|
||||||
|
xx(PointPusher)
|
||||||
|
xx(PointPuller)
|
||||||
|
|
||||||
xx(BulletPuff)
|
xx(BulletPuff)
|
||||||
xx(StrifePuff)
|
xx(StrifePuff)
|
||||||
xx(MaulerPuff)
|
xx(MaulerPuff)
|
||||||
|
|
|
@ -787,20 +787,12 @@ static void Decrypt (void *to_, const void *from_, int len, int key)
|
||||||
|
|
||||||
class ACustomSprite : public AActor
|
class ACustomSprite : public AActor
|
||||||
{
|
{
|
||||||
DECLARE_ACTOR (ACustomSprite, AActor);
|
DECLARE_CLASS (ACustomSprite, AActor);
|
||||||
public:
|
public:
|
||||||
void BeginPlay ();
|
void BeginPlay ();
|
||||||
};
|
};
|
||||||
|
|
||||||
FState ACustomSprite::States[] =
|
IMPLEMENT_CLASS (ACustomSprite)
|
||||||
{
|
|
||||||
S_NORMAL (TNT1, 'A', -1, NULL, NULL)
|
|
||||||
};
|
|
||||||
|
|
||||||
IMPLEMENT_ACTOR (ACustomSprite, Any, 9988, 0)
|
|
||||||
PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY)
|
|
||||||
PROP_SpawnState (0)
|
|
||||||
END_DEFAULTS
|
|
||||||
|
|
||||||
void ACustomSprite::BeginPlay ()
|
void ACustomSprite::BeginPlay ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -3899,13 +3899,9 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
||||||
{
|
{
|
||||||
mthing->args[0] = mthing->type - 14000;
|
mthing->args[0] = mthing->type - 14000;
|
||||||
mthing->type = 14065;
|
mthing->type = 14065;
|
||||||
i = RUNTIME_CLASS(AAmbientSound);
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// find which type to spawn
|
// find which type to spawn
|
||||||
i = DoomEdMap.FindType (mthing->type);
|
i = DoomEdMap.FindType (mthing->type);
|
||||||
}
|
|
||||||
|
|
||||||
if (i == NULL)
|
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.
|
// 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
|
#define PUSH_FACTOR 7
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
|
@ -1742,7 +1722,7 @@ void DPusher::Tick ()
|
||||||
if ((speed > 0) && (P_CheckSight (thing, m_Source, 1)))
|
if ((speed > 0) && (P_CheckSight (thing, m_Source, 1)))
|
||||||
{
|
{
|
||||||
angle_t pushangle = R_PointToAngle2 (thing->x, thing->y, sx, sy);
|
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 += ANG180; // away
|
||||||
pushangle >>= ANGLETOFINESHIFT;
|
pushangle >>= ANGLETOFINESHIFT;
|
||||||
thing->momx += FixedMul (speed, finecosine[pushangle]);
|
thing->momx += FixedMul (speed, finecosine[pushangle]);
|
||||||
|
@ -1838,8 +1818,8 @@ AActor *P_GetPushThing (int s)
|
||||||
thing = sec->thinglist;
|
thing = sec->thinglist;
|
||||||
|
|
||||||
while (thing &&
|
while (thing &&
|
||||||
!thing->IsA (RUNTIME_CLASS(APointPusher)) &&
|
thing->GetClass()->TypeName != NAME_PointPusher &&
|
||||||
!thing->IsA (RUNTIME_CLASS(APointPuller)))
|
thing->GetClass()->TypeName != NAME_PointPuller)
|
||||||
{
|
{
|
||||||
thing = thing->snext;
|
thing = thing->snext;
|
||||||
}
|
}
|
||||||
|
@ -1889,12 +1869,14 @@ static void P_SpawnPushers ()
|
||||||
|
|
||||||
while ( (thing = iterator.Next ()) )
|
while ( (thing = iterator.Next ()) )
|
||||||
{
|
{
|
||||||
if (thing->IsA (RUNTIME_CLASS(APointPuller)) ||
|
if (thing->GetClass()->TypeName == NAME_PointPusher ||
|
||||||
thing->IsA (RUNTIME_CLASS(APointPusher)))
|
thing->GetClass()->TypeName == NAME_PointPuller)
|
||||||
|
{
|
||||||
new DPusher (DPusher::p_push, l->args[3] ? l : NULL, l->args[2],
|
new DPusher (DPusher::p_push, l->args[3] ? l : NULL, l->args[2],
|
||||||
0, thing, thing->Sector - sectors);
|
0, thing, thing->Sector - sectors);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1842,9 +1842,25 @@ CCMD (playersounds)
|
||||||
|
|
||||||
// AAmbientSound implementation ---------------------------------------------
|
// AAmbientSound implementation ---------------------------------------------
|
||||||
|
|
||||||
IMPLEMENT_STATELESS_ACTOR (AAmbientSound, Any, 14065, 0)
|
class AAmbientSound : public AActor
|
||||||
PROP_Flags (MF_NOBLOCKMAP|MF_NOSECTOR)
|
{
|
||||||
END_DEFAULTS
|
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)
|
void AAmbientSound::Serialize (FArchive &arc)
|
||||||
{
|
{
|
||||||
|
|
|
@ -62,6 +62,20 @@ ACTOR MapSpotGravity : MapSpot 9013
|
||||||
-NOGRAVITY
|
-NOGRAVITY
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Point Pushers ---------------------------------------------------
|
||||||
|
|
||||||
|
ACTOR PointPusher 5001
|
||||||
|
{
|
||||||
|
+NOBLOCKMAP
|
||||||
|
+INVISIBLE
|
||||||
|
}
|
||||||
|
|
||||||
|
ACTOR PointPuller 5002
|
||||||
|
{
|
||||||
|
+NOBLOCKMAP
|
||||||
|
+INVISIBLE
|
||||||
|
}
|
||||||
|
|
||||||
// Bloody gibs -------------------------------------------------------------
|
// Bloody gibs -------------------------------------------------------------
|
||||||
|
|
||||||
ACTOR RealGibs
|
ACTOR RealGibs
|
||||||
|
@ -90,3 +104,17 @@ ACTOR Gibs : RealGibs 24
|
||||||
SpawnID 146
|
SpawnID 146
|
||||||
ClearFlags
|
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 -----------------------------------------------------------
|
// Heretic Sound sequences -----------------------------------------------------------
|
||||||
|
|
||||||
ACTOR HereticSoundSequence1 : SoundSequence 1200
|
ACTOR HereticSoundSequence1 : SoundSequence 1200
|
||||||
|
|
Loading…
Reference in a new issue