mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 12:30:40 +00:00
- scriptified stat121 special effect.
This commit is contained in:
parent
dc06a93a4f
commit
7cbc713b4e
9 changed files with 58 additions and 40 deletions
|
@ -996,7 +996,7 @@ void movetransports_r(void)
|
|||
static void rrra_specialstats()
|
||||
{
|
||||
Collision coll;
|
||||
DukeStatIterator it(118);
|
||||
DukeStatIterator it(STAT_BOBBING);
|
||||
while (auto act = it.Next())
|
||||
{
|
||||
if (act->spr.hitag > 1)
|
||||
|
@ -1087,36 +1087,6 @@ static void rrra_specialstats()
|
|||
enemysizecheat = 0;
|
||||
}
|
||||
|
||||
it.Reset(121);
|
||||
while (auto act = it.Next())
|
||||
{
|
||||
act->spr.extra++;
|
||||
if (act->spr.extra < 100)
|
||||
{
|
||||
if (act->spr.extra == 90)
|
||||
{
|
||||
act->spr.picnum--;
|
||||
if (act->spr.picnum < PIG + 7)
|
||||
act->spr.picnum = PIG + 7;
|
||||
act->spr.extra = 1;
|
||||
}
|
||||
movesprite_ex(act, DVector3(0, 0, -300/256.), CLIPMASK0, coll);
|
||||
if (act->sector()->ceilingz+ 4 > act->spr.pos.Z)
|
||||
{
|
||||
act->spr.picnum = 0;
|
||||
act->spr.extra = 100;
|
||||
}
|
||||
}
|
||||
else if (act->spr.extra == 200)
|
||||
{
|
||||
// This was really 10 and not (10 << 8)!
|
||||
SetActor(act, DVector3(act->spr.pos.X, act->spr.pos.Y, act->sector()->floorz - 10 * zmaptoworld));
|
||||
act->spr.extra = 1;
|
||||
act->spr.picnum = PIG + 11;
|
||||
spawn(act, TRANSPORTERSTAR);
|
||||
}
|
||||
}
|
||||
|
||||
it.Reset(STAT_RABBITSPAWN);
|
||||
while (auto act = it.Next())
|
||||
{
|
||||
|
|
|
@ -280,6 +280,7 @@ enum
|
|||
STAT_CHICKENPLANT = 106,
|
||||
STAT_LUMBERMILL = 107,
|
||||
STAT_TELEPORT = 108,
|
||||
STAT_BOBBING = 118,
|
||||
STAT_RABBITSPAWN = 119,
|
||||
STAT_REMOVED = MAXSTATUS-2,
|
||||
STAT_NETALLOC = MAXSTATUS-1
|
||||
|
|
|
@ -1457,6 +1457,11 @@ x(HENSTAND, 4897)
|
|||
x(HENSTAND1, 4898)
|
||||
x(PIG, 4945)
|
||||
x(PIGSTAYPUT, 4946)
|
||||
x(PIGBACK4, 4952)
|
||||
x(PIGBACK3, 4953)
|
||||
x(PIGBACK2, 4954)
|
||||
x(PIGBACK1, 4955)
|
||||
x(PIGBACK, 4956)
|
||||
x(PIGEAT, 4983)
|
||||
x(SBMOVE, 5015) // E1L7 shit boss, only RR1.
|
||||
x(SBSPIT, 5050)
|
||||
|
|
|
@ -438,7 +438,7 @@ void prelevel_r(int g, TArray<DDukeActor*>& actors)
|
|||
actor->spr.extra = 0;
|
||||
actor->spr.hitag = 1;
|
||||
actor->spr.pal = 0;
|
||||
ChangeActorStat(actor, 118);
|
||||
ChangeActorStat(actor, STAT_BOBBING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,14 +63,6 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
|
||||
ChangeActorStat(act, 116);
|
||||
break;
|
||||
case PIG + 11:
|
||||
if (!isRRRA()) goto default_case;
|
||||
act->spr.scale = DVector2(0.25, 0.25);
|
||||
act->clipdist = 0;
|
||||
act->spr.extra = 0;
|
||||
act->spr.cstat = 0;
|
||||
ChangeActorStat(act, 121);
|
||||
break;
|
||||
case RRTILE7936:
|
||||
if (!isRRRA()) goto default_case;
|
||||
act->spr.scale = DVector2(0, 0);
|
||||
|
|
|
@ -44,6 +44,7 @@ spawnclasses
|
|||
8192 = RedneckUfoSpawnerToggle
|
||||
1781 = RedneckChickenArrow
|
||||
1790 = RedneckBoatGrenade
|
||||
4956 = RedneckPigDisplay
|
||||
|
||||
7636 = DukeGenericDestructible, "OLDPHOTO0", "OLDPHOTO0BROKE", "VENT_BUST"
|
||||
7638 = DukeGenericDestructible, "OLDPHOTO1", "OLDPHOTO1BROKE", "VENT_BUST"
|
||||
|
|
|
@ -109,6 +109,7 @@ version "4.10"
|
|||
#include "zscript/games/duke/actors/rrcactus.zs"
|
||||
#include "zscript/games/duke/actors/balloons.zs"
|
||||
#include "zscript/games/duke/actors/gamblingmachine.zs"
|
||||
#include "zscript/games/duke/actors/pigback.zs"
|
||||
|
||||
#include "zscript/games/blood/bloodgame.zs"
|
||||
#include "zscript/games/blood/ui/menu.zs"
|
||||
|
|
47
wadsrc/static/zscript/games/duke/actors/pigback.zs
Normal file
47
wadsrc/static/zscript/games/duke/actors/pigback.zs
Normal file
|
@ -0,0 +1,47 @@
|
|||
// This appears not to be used
|
||||
class RedneckPigDisplay : DukeActor
|
||||
{
|
||||
default
|
||||
{
|
||||
spriteset "PIGBACK", "PIGBACK1", "PIGBACK2", "PIGBACK3", "PIGBACK4";
|
||||
ScaleX 0.25;
|
||||
ScaleY 0.25;
|
||||
clipdist 0;
|
||||
extra 0;
|
||||
statnum STAT_ACTOR;
|
||||
}
|
||||
|
||||
override void Initialize()
|
||||
{
|
||||
cstat = 0;
|
||||
}
|
||||
|
||||
override void Tick()
|
||||
{
|
||||
self.extra++;
|
||||
if (self.extra < 100)
|
||||
{
|
||||
if (self.extra == 90)
|
||||
{
|
||||
self.setSpriteSetImage(min(self.spritesetIndex + 1, 4));
|
||||
self.extra = 1;
|
||||
}
|
||||
self.movesprite((0, 0, -300/256.), CLIPMASK0);
|
||||
if (self.sector.ceilingz + 4 > self.pos.Z)
|
||||
{
|
||||
self.cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
self.extra = 100;
|
||||
}
|
||||
}
|
||||
else if (self.extra == 200)
|
||||
{
|
||||
// This was really 10 and not (10 << 8)!
|
||||
self.SetPosition((self.pos.X, self.pos.Y, self.sector.floorz - 10 * zmaptoworld));
|
||||
self.extra = 1;
|
||||
self.cstat = 0;
|
||||
self.setSpriteSetImage(0);
|
||||
self.spawn("DukeTransporterStar");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -109,6 +109,7 @@ class DukeActor : CoreActor native
|
|||
STAT_CHICKENPLANT = 106,
|
||||
STAT_LUMBERMILL = 107,
|
||||
STAT_TELEPORT = 108,
|
||||
STAT_BOBBING = 118,
|
||||
STAT_RABBITSPAWN = 119,
|
||||
|
||||
STAT_REMOVED = MAXSTATUS-2,
|
||||
|
|
Loading…
Reference in a new issue