- 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 ----------------------------------------------------------------
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
{
DECLARE_CLASS (AArtiTimeBomb, AInventory)

View File

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

View File

@ -108,7 +108,7 @@ class Actor : Thinker native
native void UnlinkFromWorld();
native bool CanSeek(Actor target);
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 vector3 Vec3Offset(float x, float y, float z, 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";
}
native void A_Timebomb();
States
{
Spawn:
@ -91,6 +89,13 @@ Class ActivatedTimeBomb : Actor
XPL1 BCDEF 4 BRIGHT;
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()
{
if (pos.z < floorz)
if (pos.z <= floorz)
{
SetStateLabel ("Crash");
}

View File

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