mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +00:00
- zilla.cpp
This commit is contained in:
parent
e98e1a6fea
commit
95c92153ad
2 changed files with 15 additions and 32 deletions
|
@ -59,7 +59,7 @@ int SetupGoro(DSWActor*);
|
|||
int SetupCoolg(DSWActor*);
|
||||
int SetupEel(DSWActor*);
|
||||
int SetupSumo(DSWActor*);
|
||||
int SetupZilla(short);
|
||||
int SetupZilla(DSWActor*);
|
||||
int SetupToiletGirl(DSWActor*);
|
||||
int SetupWashGirl(DSWActor*);
|
||||
int SetupCarGirl(DSWActor*);
|
||||
|
@ -1282,7 +1282,7 @@ ActorSpawn(SPRITEp sp)
|
|||
}
|
||||
|
||||
PicAnimOff(sp->picnum);
|
||||
SetupZilla(SpriteNum);
|
||||
SetupZilla(actor);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -638,22 +638,20 @@ ACTOR_ACTION_SET ZillaActionSet =
|
|||
nullptr
|
||||
};
|
||||
|
||||
int
|
||||
SetupZilla(short SpriteNum)
|
||||
int SetupZilla(DSWActor* actor)
|
||||
{
|
||||
auto actor = &swActors[SpriteNum];
|
||||
SPRITEp sp = &sprite[SpriteNum];
|
||||
SPRITEp sp = &actor->s();
|
||||
USERp u;
|
||||
ANIMATOR DoActorDecide;
|
||||
|
||||
if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
|
||||
{
|
||||
u = User[SpriteNum].Data();
|
||||
u = actor->u();
|
||||
ASSERT(u);
|
||||
}
|
||||
else
|
||||
{
|
||||
u = SpawnUser(SpriteNum,ZILLA_RUN_R0,s_ZillaRun[0]);
|
||||
u = SpawnUser(actor, ZILLA_RUN_R0, s_ZillaRun[0]);
|
||||
u->Health = 6000;
|
||||
}
|
||||
|
||||
|
@ -672,19 +670,13 @@ SetupZilla(short SpriteNum)
|
|||
sp->xrepeat = 97;
|
||||
sp->yrepeat = 79;
|
||||
|
||||
//SET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int NullZilla(DSWActor* actor)
|
||||
{
|
||||
USER* u = actor->u();
|
||||
int SpriteNum = u->SpriteNum;
|
||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||
|
||||
//if (TEST(u->Flags,SPR_SLIDING))
|
||||
//DoActorSlide(actor);
|
||||
SPRITEp sp = &actor->s();
|
||||
|
||||
#if 0
|
||||
if (u->State == s_ZillaDie)
|
||||
|
@ -713,25 +705,21 @@ int NullZilla(DSWActor* actor)
|
|||
int DoZillaMove(DSWActor* actor)
|
||||
{
|
||||
USER* u = actor->u();
|
||||
int SpriteNum = u->SpriteNum;
|
||||
SPRITEp sp = &sprite[SpriteNum];
|
||||
SPRITEp sp = &actor->s();
|
||||
short choose;
|
||||
|
||||
//if (TEST(u->Flags,SPR_SLIDING))
|
||||
//DoActorSlide(actor);
|
||||
|
||||
// Random Zilla taunts
|
||||
if (!SoundValidAndActive(sp, CHAN_AnimeMad))
|
||||
{
|
||||
choose = STD_RANDOM_RANGE(1000);
|
||||
if (choose > 990)
|
||||
PlaySound(DIGI_Z16004, sp, v3df_none, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_Z16004, actor, v3df_none, CHAN_AnimeMad);
|
||||
else if (choose > 985)
|
||||
PlaySound(DIGI_Z16004, sp, v3df_none, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_Z16004, actor, v3df_none, CHAN_AnimeMad);
|
||||
else if (choose > 980)
|
||||
PlaySound(DIGI_Z16004, sp, v3df_none, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_Z16004, actor, v3df_none, CHAN_AnimeMad);
|
||||
else if (choose > 975)
|
||||
PlaySound(DIGI_Z16004, sp, v3df_none, CHAN_AnimeMad);
|
||||
PlaySound(DIGI_Z16004, actor, v3df_none, CHAN_AnimeMad);
|
||||
}
|
||||
|
||||
|
||||
|
@ -752,11 +740,7 @@ int DoZillaMove(DSWActor* actor)
|
|||
|
||||
int DoZillaStomp(DSWActor* actor)
|
||||
{
|
||||
USER* u = actor->u();
|
||||
int SpriteNum = u->SpriteNum;
|
||||
SPRITEp sp = &sprite[SpriteNum];
|
||||
|
||||
PlaySound(DIGI_ZILLASTOMP, sp, v3df_follow);
|
||||
PlaySound(DIGI_ZILLASTOMP, actor, v3df_follow);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -766,11 +750,10 @@ extern int SpawnGrenadeExp(int16_t Weapon);
|
|||
int DoZillaDeathMelt(DSWActor* actor)
|
||||
{
|
||||
USER* u = actor->u();
|
||||
int SpriteNum = u->SpriteNum;
|
||||
SPRITEp sp = &sprite[SpriteNum];
|
||||
SPRITEp sp = &actor->s();
|
||||
|
||||
if (RandomRange(1000) > 800)
|
||||
SpawnGrenadeExp(SpriteNum);
|
||||
SpawnGrenadeExp(actor->GetSpriteIndex());
|
||||
|
||||
u->ID = ZILLA_RUN_R0;
|
||||
RESET(u->Flags, SPR_JUMPING|SPR_FALLING|SPR_MOVED);
|
||||
|
|
Loading…
Reference in a new issue