mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-07 15:31:11 +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()
|
static void rrra_specialstats()
|
||||||
{
|
{
|
||||||
Collision coll;
|
Collision coll;
|
||||||
DukeStatIterator it(118);
|
DukeStatIterator it(STAT_BOBBING);
|
||||||
while (auto act = it.Next())
|
while (auto act = it.Next())
|
||||||
{
|
{
|
||||||
if (act->spr.hitag > 1)
|
if (act->spr.hitag > 1)
|
||||||
|
@ -1087,36 +1087,6 @@ static void rrra_specialstats()
|
||||||
enemysizecheat = 0;
|
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);
|
it.Reset(STAT_RABBITSPAWN);
|
||||||
while (auto act = it.Next())
|
while (auto act = it.Next())
|
||||||
{
|
{
|
||||||
|
|
|
@ -280,6 +280,7 @@ enum
|
||||||
STAT_CHICKENPLANT = 106,
|
STAT_CHICKENPLANT = 106,
|
||||||
STAT_LUMBERMILL = 107,
|
STAT_LUMBERMILL = 107,
|
||||||
STAT_TELEPORT = 108,
|
STAT_TELEPORT = 108,
|
||||||
|
STAT_BOBBING = 118,
|
||||||
STAT_RABBITSPAWN = 119,
|
STAT_RABBITSPAWN = 119,
|
||||||
STAT_REMOVED = MAXSTATUS-2,
|
STAT_REMOVED = MAXSTATUS-2,
|
||||||
STAT_NETALLOC = MAXSTATUS-1
|
STAT_NETALLOC = MAXSTATUS-1
|
||||||
|
|
|
@ -1457,6 +1457,11 @@ x(HENSTAND, 4897)
|
||||||
x(HENSTAND1, 4898)
|
x(HENSTAND1, 4898)
|
||||||
x(PIG, 4945)
|
x(PIG, 4945)
|
||||||
x(PIGSTAYPUT, 4946)
|
x(PIGSTAYPUT, 4946)
|
||||||
|
x(PIGBACK4, 4952)
|
||||||
|
x(PIGBACK3, 4953)
|
||||||
|
x(PIGBACK2, 4954)
|
||||||
|
x(PIGBACK1, 4955)
|
||||||
|
x(PIGBACK, 4956)
|
||||||
x(PIGEAT, 4983)
|
x(PIGEAT, 4983)
|
||||||
x(SBMOVE, 5015) // E1L7 shit boss, only RR1.
|
x(SBMOVE, 5015) // E1L7 shit boss, only RR1.
|
||||||
x(SBSPIT, 5050)
|
x(SBSPIT, 5050)
|
||||||
|
|
|
@ -438,7 +438,7 @@ void prelevel_r(int g, TArray<DDukeActor*>& actors)
|
||||||
actor->spr.extra = 0;
|
actor->spr.extra = 0;
|
||||||
actor->spr.hitag = 1;
|
actor->spr.hitag = 1;
|
||||||
actor->spr.pal = 0;
|
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;
|
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
|
||||||
ChangeActorStat(act, 116);
|
ChangeActorStat(act, 116);
|
||||||
break;
|
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:
|
case RRTILE7936:
|
||||||
if (!isRRRA()) goto default_case;
|
if (!isRRRA()) goto default_case;
|
||||||
act->spr.scale = DVector2(0, 0);
|
act->spr.scale = DVector2(0, 0);
|
||||||
|
|
|
@ -44,6 +44,7 @@ spawnclasses
|
||||||
8192 = RedneckUfoSpawnerToggle
|
8192 = RedneckUfoSpawnerToggle
|
||||||
1781 = RedneckChickenArrow
|
1781 = RedneckChickenArrow
|
||||||
1790 = RedneckBoatGrenade
|
1790 = RedneckBoatGrenade
|
||||||
|
4956 = RedneckPigDisplay
|
||||||
|
|
||||||
7636 = DukeGenericDestructible, "OLDPHOTO0", "OLDPHOTO0BROKE", "VENT_BUST"
|
7636 = DukeGenericDestructible, "OLDPHOTO0", "OLDPHOTO0BROKE", "VENT_BUST"
|
||||||
7638 = DukeGenericDestructible, "OLDPHOTO1", "OLDPHOTO1BROKE", "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/rrcactus.zs"
|
||||||
#include "zscript/games/duke/actors/balloons.zs"
|
#include "zscript/games/duke/actors/balloons.zs"
|
||||||
#include "zscript/games/duke/actors/gamblingmachine.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/bloodgame.zs"
|
||||||
#include "zscript/games/blood/ui/menu.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_CHICKENPLANT = 106,
|
||||||
STAT_LUMBERMILL = 107,
|
STAT_LUMBERMILL = 107,
|
||||||
STAT_TELEPORT = 108,
|
STAT_TELEPORT = 108,
|
||||||
|
STAT_BOBBING = 118,
|
||||||
STAT_RABBITSPAWN = 119,
|
STAT_RABBITSPAWN = 119,
|
||||||
|
|
||||||
STAT_REMOVED = MAXSTATUS-2,
|
STAT_REMOVED = MAXSTATUS-2,
|
||||||
|
|
Loading…
Reference in a new issue