- fixed a lost '='.

- scriptified A_TimeBomb.
This commit is contained in:
Christoph Oelckers 2016-11-16 21:12:16 +01:00
parent 7a29e6cfdc
commit df43ee96ce
6 changed files with 18 additions and 19 deletions

View file

@ -44,18 +44,6 @@ bool AArtiTomeOfPower::Use (bool pickup)
// Time bomb ---------------------------------------------------------------- // Time bomb ----------------------------------------------------------------
DEFINE_ACTION_FUNCTION(AActor, A_TimeBomb)
{
PARAM_SELF_PROLOGUE(AActor);
self->AddZ(32, false);
self->RenderStyle = STYLE_Add;
self->Alpha = 1.;
P_RadiusAttack (self, self->target, 128, 128, self->DamageType, RADF_HURTSOURCE);
P_CheckSplash(self, 128);
return 0;
}
class AArtiTimeBomb : public AInventory class AArtiTimeBomb : public AInventory
{ {
DECLARE_CLASS (AArtiTimeBomb, AInventory) DECLARE_CLASS (AArtiTimeBomb, AInventory)

View file

@ -6956,7 +6956,8 @@ DEFINE_ACTION_FUNCTION(AActor, AddZ)
{ {
PARAM_SELF_PROLOGUE(AActor); PARAM_SELF_PROLOGUE(AActor);
PARAM_FLOAT(addz); PARAM_FLOAT(addz);
self->AddZ(addz); PARAM_BOOL_DEF(moving);
self->AddZ(addz, moving);
return 0; return 0;
} }

View file

@ -108,7 +108,7 @@ class Actor : Thinker native
native void UnlinkFromWorld(); native void UnlinkFromWorld();
native bool CanSeek(Actor target); native bool CanSeek(Actor target);
native double AngleTo(Actor target, bool absolute = false); native double AngleTo(Actor target, bool absolute = false);
native void AddZ(float zadd); native void AddZ(float zadd, bool moving = true);
native void SetZ(float z); native void SetZ(float z);
native vector3 Vec3Offset(float x, float y, float z, bool absolute = false); native vector3 Vec3Offset(float x, float y, float z, bool absolute = false);
native vector3 Vec3Angle(float length, float angle, float z = 0, bool absolute = false); native vector3 Vec3Angle(float length, float angle, float z = 0, bool absolute = false);

View file

@ -80,8 +80,6 @@ Class ActivatedTimeBomb : Actor
DeathSound "misc/timebomb"; DeathSound "misc/timebomb";
} }
native void A_Timebomb();
States States
{ {
Spawn: Spawn:
@ -91,6 +89,13 @@ Class ActivatedTimeBomb : Actor
XPL1 BCDEF 4 BRIGHT; XPL1 BCDEF 4 BRIGHT;
Stop; Stop;
} }
void A_TimeBomb()
{
AddZ(32, false);
A_SetRenderStyle(1., STYLE_Add);
A_Explode();
}
} }

View file

@ -291,7 +291,7 @@ class Dragon : Actor
void A_DragonCheckCrash() void A_DragonCheckCrash()
{ {
if (pos.z < floorz) if (pos.z <= floorz)
{ {
SetStateLabel ("Crash"); SetStateLabel ("Crash");
} }

View file

@ -37,8 +37,6 @@ class FireBomb : Actor
DeathSound "FlechetteExplode"; DeathSound "FlechetteExplode";
} }
native void A_TimeBomb();
States States
{ {
Spawn: Spawn:
@ -50,6 +48,13 @@ class FireBomb : Actor
XPL1 BCDEF 4 Bright; XPL1 BCDEF 4 Bright;
Stop; Stop;
} }
void A_TimeBomb()
{
AddZ(32, false);
A_SetRenderStyle(1., STYLE_Add);
A_Explode();
}
} }
// Throwing Bomb (Flechette used by Fighter) -------------------------------- // Throwing Bomb (Flechette used by Fighter) --------------------------------