mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-20 18:52:43 +00:00
- renamed u-> in miscactr.cpp
This commit is contained in:
parent
a1c5c06e27
commit
8ffa12442c
1 changed files with 205 additions and 205 deletions
|
@ -123,26 +123,26 @@ int SetupToiletGirl(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
u = SpawnUser(actor, TOILETGIRL_R0, s_ToiletGirlStand);
|
||||
u->Health = 60;
|
||||
actor->user.Health = 60;
|
||||
}
|
||||
|
||||
|
||||
EnemyDefaults(actor, nullptr, nullptr);
|
||||
|
||||
ChangeState(actor,s_ToiletGirlStand);
|
||||
u->Attrib = &ToiletGirlAttrib;
|
||||
u->StateEnd = s_ToiletGirlStand;
|
||||
u->Rot = 0;
|
||||
u->RotNum = 0;
|
||||
actor->user.Attrib = &ToiletGirlAttrib;
|
||||
actor->user.StateEnd = s_ToiletGirlStand;
|
||||
actor->user.Rot = 0;
|
||||
actor->user.RotNum = 0;
|
||||
|
||||
actor->spr.xrepeat = 38;
|
||||
actor->spr.yrepeat = 32;
|
||||
actor->spr.xvel = actor->spr.yvel = actor->spr.zvel = 0;
|
||||
actor->spr.lotag = TOILETGIRL_R0;
|
||||
u->FlagOwner = 0;
|
||||
u->ID = TOILETGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
actor->user.ID = TOILETGIRL_R0;
|
||||
|
||||
RESET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -153,9 +153,9 @@ int DoToiletGirl(DSWActor* actor)
|
|||
bool ICanSee = false;
|
||||
|
||||
DoActorPickClosePlayer(actor);
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),u->targetActor->spr.pos.X,u->targetActor->spr.pos.Y,ActorZOfMiddle(u->targetActor),u->targetActor->spr.sector());
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),actor->user.targetActor->spr.pos.X,actor->user.targetActor->spr.pos.Y,ActorZOfMiddle(actor->user.targetActor),actor->user.targetActor->spr.sector());
|
||||
|
||||
if (u->FlagOwner != 1)
|
||||
if (actor->user.FlagOwner != 1)
|
||||
{
|
||||
if (RandomRange(1000) > 980)
|
||||
{
|
||||
|
@ -174,7 +174,7 @@ int DoToiletGirl(DSWActor* actor)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if ((u->WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
else if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
{
|
||||
if (!SoundValidAndActive(actor, CHAN_AnimeMad))
|
||||
{
|
||||
|
@ -184,12 +184,12 @@ int DoToiletGirl(DSWActor* actor)
|
|||
PlaySound(DIGI_ANIMEMAD2, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_ToiletGirlUzi);
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
|
||||
// stay on floor unless doing certain things
|
||||
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
|
||||
{
|
||||
KeepActorOnFloor(actor);
|
||||
}
|
||||
|
@ -207,15 +207,15 @@ int NullToiletGirl(DSWActor* actor)
|
|||
bool ICanSee = false;
|
||||
|
||||
DoActorPickClosePlayer(actor);
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),u->targetActor->spr.pos.X,u->targetActor->spr.pos.Y,u->targetActor->spr.pos.Z,u->targetActor->spr.sector());
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),actor->user.targetActor->spr.pos.X,actor->user.targetActor->spr.pos.Y,actor->user.targetActor->spr.pos.Z,actor->user.targetActor->spr.sector());
|
||||
|
||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags,SPR_CLIMBING))
|
||||
KeepActorOnFloor(actor);
|
||||
|
||||
if (u->FlagOwner != 1)
|
||||
if (actor->user.FlagOwner != 1)
|
||||
{
|
||||
}
|
||||
else if ((u->WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
else if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
{
|
||||
if (!SoundValidAndActive(actor, CHAN_AnimeMad))
|
||||
{
|
||||
|
@ -225,8 +225,8 @@ int NullToiletGirl(DSWActor* actor)
|
|||
PlaySound(DIGI_ANIMEMAD2, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_ToiletGirlUzi);
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -236,14 +236,14 @@ int ToiletGirlUzi(DSWActor* actor)
|
|||
{
|
||||
USER* u = actor->u();
|
||||
|
||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags,SPR_CLIMBING))
|
||||
KeepActorOnFloor(actor);
|
||||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
|
||||
{
|
||||
u->WaitTics = RandomRange(240)+120;
|
||||
actor->user.WaitTics = RandomRange(240)+120;
|
||||
ChangeState(actor,s_ToiletGirlStand);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -255,7 +255,7 @@ int ToiletGirlPain(DSWActor* actor)
|
|||
|
||||
NullToiletGirl(actor);
|
||||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
|
||||
ChangeState(actor,s_ToiletGirlStand);
|
||||
|
||||
return 0;
|
||||
|
@ -356,25 +356,25 @@ int SetupWashGirl(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
u = SpawnUser(actor, WASHGIRL_R0,s_WashGirlStand);
|
||||
u->Health = 60;
|
||||
actor->user.Health = 60;
|
||||
}
|
||||
|
||||
EnemyDefaults(actor, nullptr, nullptr);
|
||||
|
||||
ChangeState(actor,s_WashGirlStand);
|
||||
u->Attrib = &WashGirlAttrib;
|
||||
u->StateEnd = s_WashGirlStand;
|
||||
u->Rot = 0;
|
||||
u->RotNum = 0;
|
||||
actor->user.Attrib = &WashGirlAttrib;
|
||||
actor->user.StateEnd = s_WashGirlStand;
|
||||
actor->user.Rot = 0;
|
||||
actor->user.RotNum = 0;
|
||||
|
||||
actor->spr.xrepeat = 28;
|
||||
actor->spr.yrepeat = 24;
|
||||
actor->spr.xvel = actor->spr.yvel = actor->spr.zvel = 0;
|
||||
actor->spr.lotag = WASHGIRL_R0;
|
||||
u->FlagOwner = 0;
|
||||
u->ID = WASHGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
actor->user.ID = WASHGIRL_R0;
|
||||
|
||||
RESET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -385,9 +385,9 @@ int DoWashGirl(DSWActor* actor)
|
|||
bool ICanSee = false;
|
||||
|
||||
DoActorPickClosePlayer(actor);
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),u->targetActor->spr.pos.X,u->targetActor->spr.pos.Y,ActorZOfMiddle(u->targetActor),u->targetActor->spr.sector());
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),actor->user.targetActor->spr.pos.X,actor->user.targetActor->spr.pos.Y,ActorZOfMiddle(actor->user.targetActor),actor->user.targetActor->spr.sector());
|
||||
|
||||
if (RandomRange(1000) > 980 && u->ShellNum <= 0)
|
||||
if (RandomRange(1000) > 980 && actor->user.ShellNum <= 0)
|
||||
{
|
||||
if (!SoundValidAndActive(actor, CHAN_AnimeSing))
|
||||
{
|
||||
|
@ -398,24 +398,24 @@ int DoWashGirl(DSWActor* actor)
|
|||
}
|
||||
|
||||
ChangeState(actor,s_WashGirlStandScrub);
|
||||
u->ShellNum = RandomRange(2*120)+240;
|
||||
actor->user.ShellNum = RandomRange(2*120)+240;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (u->ShellNum > 0)
|
||||
if (actor->user.ShellNum > 0)
|
||||
{
|
||||
if ((u->ShellNum -= ACTORMOVETICS) < 0)
|
||||
if ((actor->user.ShellNum -= ACTORMOVETICS) < 0)
|
||||
{
|
||||
ChangeState(actor,s_WashGirlStand);
|
||||
u->ShellNum = 0;
|
||||
actor->user.ShellNum = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (u->FlagOwner != 1)
|
||||
if (actor->user.FlagOwner != 1)
|
||||
{
|
||||
}
|
||||
else if ((u->WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
else if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
{
|
||||
if (!SoundValidAndActive(actor, CHAN_AnimeMad))
|
||||
{
|
||||
|
@ -425,12 +425,12 @@ int DoWashGirl(DSWActor* actor)
|
|||
PlaySound(DIGI_ANIMEMAD2, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_WashGirlUzi);
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
|
||||
// stay on floor unless doing certain things
|
||||
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
|
||||
{
|
||||
KeepActorOnFloor(actor);
|
||||
}
|
||||
|
@ -448,15 +448,15 @@ int NullWashGirl(DSWActor* actor)
|
|||
bool ICanSee = false;
|
||||
|
||||
DoActorPickClosePlayer(actor);
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),u->targetActor->spr.pos.X,u->targetActor->spr.pos.Y,u->targetActor->spr.pos.Z,u->targetActor->spr.sector());
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),actor->user.targetActor->spr.pos.X,actor->user.targetActor->spr.pos.Y,actor->user.targetActor->spr.pos.Z,actor->user.targetActor->spr.sector());
|
||||
|
||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags,SPR_CLIMBING))
|
||||
KeepActorOnFloor(actor);
|
||||
|
||||
if (u->FlagOwner != 1)
|
||||
if (actor->user.FlagOwner != 1)
|
||||
{
|
||||
}
|
||||
else if ((u->WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
else if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
{
|
||||
if (!SoundValidAndActive(actor, CHAN_AnimeMad))
|
||||
{
|
||||
|
@ -466,8 +466,8 @@ int NullWashGirl(DSWActor* actor)
|
|||
PlaySound(DIGI_ANIMEMAD2, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_WashGirlUzi);
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -477,14 +477,14 @@ int WashGirlUzi(DSWActor* actor)
|
|||
{
|
||||
USER* u = actor->u();
|
||||
|
||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags,SPR_CLIMBING))
|
||||
KeepActorOnFloor(actor);
|
||||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
|
||||
{
|
||||
u->WaitTics = RandomRange(240)+120;
|
||||
actor->user.WaitTics = RandomRange(240)+120;
|
||||
ChangeState(actor,s_WashGirlStand);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -495,7 +495,7 @@ int WashGirlPain(DSWActor* actor)
|
|||
USER* u = actor->u();
|
||||
NullWashGirl(actor);
|
||||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
|
||||
ChangeState(actor,s_WashGirlStand);
|
||||
|
||||
return 0;
|
||||
|
@ -560,24 +560,24 @@ int SetupTrashCan(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
u = SpawnUser(actor, TRASHCAN,s_TrashCanStand);
|
||||
u->Health = 60;
|
||||
actor->user.Health = 60;
|
||||
}
|
||||
|
||||
EnemyDefaults(actor, nullptr, nullptr);
|
||||
|
||||
ChangeState(actor,s_TrashCanStand);
|
||||
u->Attrib = &TrashCanAttrib;
|
||||
u->StateEnd = s_TrashCanStand;
|
||||
u->Rot = 0;
|
||||
u->RotNum = 0;
|
||||
actor->user.Attrib = &TrashCanAttrib;
|
||||
actor->user.StateEnd = s_TrashCanStand;
|
||||
actor->user.Rot = 0;
|
||||
actor->user.RotNum = 0;
|
||||
|
||||
|
||||
actor->spr.xrepeat = 46;
|
||||
actor->spr.yrepeat = 42;
|
||||
actor->spr.xvel = actor->spr.yvel = actor->spr.zvel = 0;
|
||||
u->ID = TRASHCAN;
|
||||
actor->user.ID = TRASHCAN;
|
||||
|
||||
RESET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY);
|
||||
|
||||
return 0;
|
||||
|
@ -588,10 +588,10 @@ int DoTrashCan(DSWActor* actor)
|
|||
USER* u = actor->u();
|
||||
|
||||
// stay on floor unless doing certain things
|
||||
if (TEST(u->Flags,SPR_SLIDING))
|
||||
if (TEST(actor->user.Flags,SPR_SLIDING))
|
||||
DoActorSlide(actor);
|
||||
|
||||
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
|
||||
{
|
||||
KeepActorOnFloor(actor);
|
||||
}
|
||||
|
@ -605,13 +605,13 @@ int TrashCanPain(DSWActor* actor)
|
|||
{
|
||||
USER* u = actor->u();
|
||||
|
||||
if (TEST(u->Flags,SPR_SLIDING))
|
||||
if (TEST(actor->user.Flags,SPR_SLIDING))
|
||||
DoActorSlide(actor);
|
||||
|
||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags,SPR_CLIMBING))
|
||||
KeepActorOnFloor(actor);
|
||||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
|
||||
ChangeState(actor,s_TrashCanStand);
|
||||
|
||||
return 0;
|
||||
|
@ -663,24 +663,24 @@ int SetupPachinkoLight(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
u = SpawnUser(actor, PACHINKOLIGHT_R0,s_PachinkoLightStand);
|
||||
u->Health = 1;
|
||||
actor->user.Health = 1;
|
||||
}
|
||||
|
||||
EnemyDefaults(actor, nullptr, nullptr);
|
||||
|
||||
ChangeState(actor,s_PachinkoLightStand);
|
||||
u->Attrib = &PachinkoLightAttrib;
|
||||
u->StateEnd = s_PachinkoLightStand;
|
||||
u->Rot = 0;
|
||||
u->RotNum = 0;
|
||||
u->ID = PACHINKOLIGHT_R0;
|
||||
actor->user.Attrib = &PachinkoLightAttrib;
|
||||
actor->user.StateEnd = s_PachinkoLightStand;
|
||||
actor->user.Rot = 0;
|
||||
actor->user.RotNum = 0;
|
||||
actor->user.ID = PACHINKOLIGHT_R0;
|
||||
|
||||
actor->spr.xvel = actor->spr.yvel = actor->spr.zvel = 0;
|
||||
actor->spr.lotag = TAG_PACHINKOLIGHT;
|
||||
actor->spr.shade = -2;
|
||||
u->spal = actor->spr.pal;
|
||||
actor->user.spal = actor->spr.pal;
|
||||
|
||||
RESET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY);
|
||||
|
||||
return 0;
|
||||
|
@ -690,7 +690,7 @@ int PachinkoLightOperate(DSWActor* actor)
|
|||
{
|
||||
USER* u = actor->u();
|
||||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
|
||||
{
|
||||
actor->spr.shade = -2;
|
||||
ChangeState(actor,s_PachinkoLightStand);
|
||||
|
@ -761,22 +761,22 @@ int SetupPachinko1(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
u = SpawnUser(actor, PACHINKO1,s_Pachinko1Stand);
|
||||
u->Health = 1;
|
||||
actor->user.Health = 1;
|
||||
}
|
||||
|
||||
EnemyDefaults(actor, nullptr, nullptr);
|
||||
|
||||
ChangeState(actor,s_Pachinko1Stand);
|
||||
u->Attrib = &Pachinko1Attrib;
|
||||
u->StateEnd = s_Pachinko1Stand;
|
||||
u->Rot = 0;
|
||||
u->RotNum = 0;
|
||||
u->ID = PACHINKO1;
|
||||
actor->user.Attrib = &Pachinko1Attrib;
|
||||
actor->user.StateEnd = s_Pachinko1Stand;
|
||||
actor->user.Rot = 0;
|
||||
actor->user.RotNum = 0;
|
||||
actor->user.ID = PACHINKO1;
|
||||
|
||||
actor->spr.yvel = actor->spr.zvel = 0;
|
||||
actor->spr.lotag = PACHINKO1;
|
||||
|
||||
RESET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY);
|
||||
|
||||
return 0;
|
||||
|
@ -786,7 +786,7 @@ int PachinkoCheckWin(DSWActor* actor)
|
|||
{
|
||||
USER* u = actor->u();
|
||||
|
||||
u->WaitTics = 0; // Can operate it again now
|
||||
actor->user.WaitTics = 0; // Can operate it again now
|
||||
|
||||
// You already won, no more from this machine!
|
||||
if (TEST_BOOL1(actor)) return 0;
|
||||
|
@ -922,22 +922,22 @@ int SetupPachinko2(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
u = SpawnUser(actor, PACHINKO2,s_Pachinko2Stand);
|
||||
u->Health = 1;
|
||||
actor->user.Health = 1;
|
||||
}
|
||||
|
||||
EnemyDefaults(actor, nullptr, nullptr);
|
||||
|
||||
ChangeState(actor,s_Pachinko2Stand);
|
||||
u->Attrib = &Pachinko2Attrib;
|
||||
u->StateEnd = s_Pachinko2Stand;
|
||||
u->Rot = 0;
|
||||
u->RotNum = 0;
|
||||
u->ID = PACHINKO2;
|
||||
actor->user.Attrib = &Pachinko2Attrib;
|
||||
actor->user.StateEnd = s_Pachinko2Stand;
|
||||
actor->user.Rot = 0;
|
||||
actor->user.RotNum = 0;
|
||||
actor->user.ID = PACHINKO2;
|
||||
|
||||
actor->spr.yvel = actor->spr.zvel = 0;
|
||||
actor->spr.lotag = PACHINKO2;
|
||||
|
||||
RESET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY);
|
||||
|
||||
return 0;
|
||||
|
@ -1004,22 +1004,22 @@ int SetupPachinko3(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
u = SpawnUser(actor, PACHINKO3,s_Pachinko3Stand);
|
||||
u->Health = 1;
|
||||
actor->user.Health = 1;
|
||||
}
|
||||
|
||||
EnemyDefaults(actor, nullptr, nullptr);
|
||||
|
||||
ChangeState(actor,s_Pachinko3Stand);
|
||||
u->Attrib = &Pachinko3Attrib;
|
||||
u->StateEnd = s_Pachinko3Stand;
|
||||
u->Rot = 0;
|
||||
u->RotNum = 0;
|
||||
u->ID = PACHINKO3;
|
||||
actor->user.Attrib = &Pachinko3Attrib;
|
||||
actor->user.StateEnd = s_Pachinko3Stand;
|
||||
actor->user.Rot = 0;
|
||||
actor->user.RotNum = 0;
|
||||
actor->user.ID = PACHINKO3;
|
||||
|
||||
actor->spr.yvel = actor->spr.zvel = 0;
|
||||
actor->spr.lotag = PACHINKO3;
|
||||
|
||||
RESET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY);
|
||||
|
||||
return 0;
|
||||
|
@ -1087,22 +1087,22 @@ int SetupPachinko4(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
u = SpawnUser(actor, PACHINKO4,s_Pachinko4Stand);
|
||||
u->Health = 1;
|
||||
actor->user.Health = 1;
|
||||
}
|
||||
|
||||
EnemyDefaults(actor, nullptr, nullptr);
|
||||
|
||||
ChangeState(actor,s_Pachinko4Stand);
|
||||
u->Attrib = &Pachinko4Attrib;
|
||||
u->StateEnd = s_Pachinko4Stand;
|
||||
u->Rot = 0;
|
||||
u->RotNum = 0;
|
||||
u->ID = PACHINKO4;
|
||||
actor->user.Attrib = &Pachinko4Attrib;
|
||||
actor->user.StateEnd = s_Pachinko4Stand;
|
||||
actor->user.Rot = 0;
|
||||
actor->user.RotNum = 0;
|
||||
actor->user.ID = PACHINKO4;
|
||||
|
||||
actor->spr.yvel = actor->spr.zvel = 0;
|
||||
actor->spr.lotag = PACHINKO4;
|
||||
|
||||
RESET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY);
|
||||
|
||||
return 0;
|
||||
|
@ -1198,26 +1198,26 @@ int SetupCarGirl(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
u = SpawnUser(actor, CARGIRL_R0,s_CarGirlStand);
|
||||
u->Health = 60;
|
||||
actor->user.Health = 60;
|
||||
}
|
||||
|
||||
|
||||
EnemyDefaults(actor, nullptr, nullptr);
|
||||
|
||||
ChangeState(actor,s_CarGirlStand);
|
||||
u->Attrib = &CarGirlAttrib;
|
||||
u->StateEnd = s_CarGirlStand;
|
||||
u->Rot = 0;
|
||||
u->RotNum = 0;
|
||||
actor->user.Attrib = &CarGirlAttrib;
|
||||
actor->user.StateEnd = s_CarGirlStand;
|
||||
actor->user.Rot = 0;
|
||||
actor->user.RotNum = 0;
|
||||
|
||||
actor->spr.xrepeat = 29;
|
||||
actor->spr.yrepeat = 25;
|
||||
actor->spr.xvel = actor->spr.yvel = actor->spr.zvel = 0;
|
||||
actor->spr.lotag = CARGIRL_R0;
|
||||
u->FlagOwner = 0;
|
||||
u->ID = CARGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
actor->user.ID = CARGIRL_R0;
|
||||
|
||||
RESET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
|
||||
SET(actor->spr.cstat, CSTAT_SPRITE_XFLIP);
|
||||
|
||||
return 0;
|
||||
|
@ -1229,11 +1229,11 @@ int DoCarGirl(DSWActor* actor)
|
|||
bool ICanSee = false;
|
||||
|
||||
DoActorPickClosePlayer(actor);
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),u->targetActor->spr.pos.X,u->targetActor->spr.pos.Y,ActorZOfMiddle(u->targetActor),u->targetActor->spr.sector());
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),actor->user.targetActor->spr.pos.X,actor->user.targetActor->spr.pos.Y,ActorZOfMiddle(actor->user.targetActor),actor->user.targetActor->spr.sector());
|
||||
|
||||
if (u->FlagOwner == 1)
|
||||
if (actor->user.FlagOwner == 1)
|
||||
{
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
{
|
||||
if (!SoundValidAndActive(actor, CHAN_AnimeMad))
|
||||
{
|
||||
|
@ -1250,13 +1250,13 @@ int DoCarGirl(DSWActor* actor)
|
|||
PlaySound(DIGI_LANI054, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_CarGirlUzi);
|
||||
u->WaitTics = SEC(3)+SEC(RandomRange(2<<8)>>8);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.WaitTics = SEC(3)+SEC(RandomRange(2<<8)>>8);
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// stay on floor unless doing certain things
|
||||
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
|
||||
{
|
||||
KeepActorOnFloor(actor);
|
||||
}
|
||||
|
@ -1274,15 +1274,15 @@ int NullCarGirl(DSWActor* actor)
|
|||
bool ICanSee = false;
|
||||
|
||||
DoActorPickClosePlayer(actor);
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),u->targetActor->spr.pos.X,u->targetActor->spr.pos.Y,u->targetActor->spr.pos.Z,u->targetActor->spr.sector());
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),actor->user.targetActor->spr.pos.X,actor->user.targetActor->spr.pos.Y,actor->user.targetActor->spr.pos.Z,actor->user.targetActor->spr.sector());
|
||||
|
||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags,SPR_CLIMBING))
|
||||
KeepActorOnFloor(actor);
|
||||
|
||||
if (u->FlagOwner != 1)
|
||||
if (actor->user.FlagOwner != 1)
|
||||
{
|
||||
}
|
||||
else if ((u->WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
else if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
{
|
||||
if (!SoundValidAndActive(actor, CHAN_AnimeMad))
|
||||
{
|
||||
|
@ -1299,8 +1299,8 @@ int NullCarGirl(DSWActor* actor)
|
|||
PlaySound(DIGI_LANI054, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_CarGirlUzi);
|
||||
u->WaitTics = SEC(3)+SEC(RandomRange(2<<8)>>8);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.WaitTics = SEC(3)+SEC(RandomRange(2<<8)>>8);
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1310,14 +1310,14 @@ int CarGirlUzi(DSWActor* actor)
|
|||
{
|
||||
USER* u = actor->u();
|
||||
|
||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags,SPR_CLIMBING))
|
||||
KeepActorOnFloor(actor);
|
||||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
|
||||
{
|
||||
u->WaitTics = RandomRange(240)+120;
|
||||
actor->user.WaitTics = RandomRange(240)+120;
|
||||
ChangeState(actor,s_CarGirlStand);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1328,7 +1328,7 @@ int CarGirlPain(DSWActor* actor)
|
|||
USER* u = actor->u();
|
||||
NullCarGirl(actor);
|
||||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
|
||||
ChangeState(actor,s_CarGirlStand);
|
||||
|
||||
return 0;
|
||||
|
@ -1410,26 +1410,26 @@ int SetupMechanicGirl(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
u = SpawnUser(actor, MECHANICGIRL_R0,s_MechanicGirlStand);
|
||||
u->Health = 60;
|
||||
actor->user.Health = 60;
|
||||
}
|
||||
|
||||
|
||||
EnemyDefaults(actor, nullptr, nullptr);
|
||||
|
||||
ChangeState(actor,s_MechanicGirlStand);
|
||||
u->Attrib = &MechanicGirlAttrib;
|
||||
u->StateEnd = s_MechanicGirlStand;
|
||||
u->Rot = 0;
|
||||
u->RotNum = 0;
|
||||
actor->user.Attrib = &MechanicGirlAttrib;
|
||||
actor->user.StateEnd = s_MechanicGirlStand;
|
||||
actor->user.Rot = 0;
|
||||
actor->user.RotNum = 0;
|
||||
|
||||
actor->spr.xrepeat = 27;
|
||||
actor->spr.yrepeat = 26;
|
||||
actor->spr.xvel = actor->spr.yvel = actor->spr.zvel = 0;
|
||||
actor->spr.lotag = MECHANICGIRL_R0;
|
||||
u->FlagOwner = 0;
|
||||
u->ID = MECHANICGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
actor->user.ID = MECHANICGIRL_R0;
|
||||
|
||||
RESET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1440,11 +1440,11 @@ int DoMechanicGirl(DSWActor* actor)
|
|||
bool ICanSee = false;
|
||||
|
||||
DoActorPickClosePlayer(actor);
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),u->targetActor->spr.pos.X,u->targetActor->spr.pos.Y,ActorZOfMiddle(u->targetActor),u->targetActor->spr.sector());
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),actor->user.targetActor->spr.pos.X,actor->user.targetActor->spr.pos.Y,ActorZOfMiddle(actor->user.targetActor),actor->user.targetActor->spr.sector());
|
||||
|
||||
if (u->FlagOwner == 1)
|
||||
if (actor->user.FlagOwner == 1)
|
||||
{
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
{
|
||||
if (!SoundValidAndActive(actor, CHAN_AnimeMad))
|
||||
{
|
||||
|
@ -1461,13 +1461,13 @@ int DoMechanicGirl(DSWActor* actor)
|
|||
PlaySound(DIGI_LANI079, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_MechanicGirlDrill);
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(2<<8)>>8);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.WaitTics = SEC(1)+SEC(RandomRange(2<<8)>>8);
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// stay on floor unless doing certain things
|
||||
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
|
||||
{
|
||||
KeepActorOnFloor(actor);
|
||||
}
|
||||
|
@ -1485,15 +1485,15 @@ int NullMechanicGirl(DSWActor* actor)
|
|||
bool ICanSee = false;
|
||||
|
||||
DoActorPickClosePlayer(actor);
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),u->targetActor->spr.pos.X,u->targetActor->spr.pos.Y,u->targetActor->spr.pos.Z,u->targetActor->spr.sector());
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),actor->user.targetActor->spr.pos.X,actor->user.targetActor->spr.pos.Y,actor->user.targetActor->spr.pos.Z,actor->user.targetActor->spr.sector());
|
||||
|
||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags,SPR_CLIMBING))
|
||||
KeepActorOnFloor(actor);
|
||||
|
||||
if (u->FlagOwner != 1)
|
||||
if (actor->user.FlagOwner != 1)
|
||||
{
|
||||
}
|
||||
else if ((u->WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
else if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
{
|
||||
if (!SoundValidAndActive(actor, CHAN_AnimeMad))
|
||||
{
|
||||
|
@ -1510,8 +1510,8 @@ int NullMechanicGirl(DSWActor* actor)
|
|||
PlaySound(DIGI_LANI079, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_MechanicGirlDrill);
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(2<<8)>>8);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.WaitTics = SEC(1)+SEC(RandomRange(2<<8)>>8);
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1521,14 +1521,14 @@ int MechanicGirlDrill(DSWActor* actor)
|
|||
{
|
||||
USER* u = actor->u();
|
||||
|
||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags,SPR_CLIMBING))
|
||||
KeepActorOnFloor(actor);
|
||||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
|
||||
{
|
||||
u->WaitTics = RandomRange(240)+120;
|
||||
actor->user.WaitTics = RandomRange(240)+120;
|
||||
ChangeState(actor,s_MechanicGirlStand);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1540,7 +1540,7 @@ int MechanicGirlPain(DSWActor* actor)
|
|||
|
||||
NullMechanicGirl(actor);
|
||||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
|
||||
ChangeState(actor,s_MechanicGirlStand);
|
||||
|
||||
return 0;
|
||||
|
@ -1622,26 +1622,26 @@ int SetupSailorGirl(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
u = SpawnUser(actor, SAILORGIRL_R0,s_SailorGirlStand);
|
||||
u->Health = 60;
|
||||
actor->user.Health = 60;
|
||||
}
|
||||
|
||||
|
||||
EnemyDefaults(actor, nullptr, nullptr);
|
||||
|
||||
ChangeState(actor,s_SailorGirlStand);
|
||||
u->Attrib = &SailorGirlAttrib;
|
||||
u->StateEnd = s_SailorGirlStand;
|
||||
u->Rot = 0;
|
||||
u->RotNum = 0;
|
||||
actor->user.Attrib = &SailorGirlAttrib;
|
||||
actor->user.StateEnd = s_SailorGirlStand;
|
||||
actor->user.Rot = 0;
|
||||
actor->user.RotNum = 0;
|
||||
|
||||
actor->spr.xrepeat = 28;
|
||||
actor->spr.yrepeat = 26;
|
||||
actor->spr.xvel = actor->spr.yvel = actor->spr.zvel = 0;
|
||||
actor->spr.lotag = SAILORGIRL_R0;
|
||||
u->FlagOwner = 0;
|
||||
u->ID = SAILORGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
actor->user.ID = SAILORGIRL_R0;
|
||||
|
||||
RESET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
|
||||
alreadythrew = 0;
|
||||
|
||||
return 0;
|
||||
|
@ -1653,11 +1653,11 @@ int DoSailorGirl(DSWActor* actor)
|
|||
bool ICanSee = false;
|
||||
|
||||
DoActorPickClosePlayer(actor);
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),u->targetActor->spr.pos.X,u->targetActor->spr.pos.Y,ActorZOfMiddle(u->targetActor),u->targetActor->spr.sector());
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),actor->user.targetActor->spr.pos.X,actor->user.targetActor->spr.pos.Y,ActorZOfMiddle(actor->user.targetActor),actor->user.targetActor->spr.sector());
|
||||
|
||||
if (u->FlagOwner == 1)
|
||||
if (actor->user.FlagOwner == 1)
|
||||
{
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
{
|
||||
if (!SoundValidAndActive(actor, CHAN_AnimeMad))
|
||||
{
|
||||
|
@ -1678,13 +1678,13 @@ int DoSailorGirl(DSWActor* actor)
|
|||
PlaySound(DIGI_LANI066, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_SailorGirlThrow);
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// stay on floor unless doing certain things
|
||||
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
|
||||
{
|
||||
KeepActorOnFloor(actor);
|
||||
}
|
||||
|
@ -1703,15 +1703,15 @@ int NullSailorGirl(DSWActor* actor)
|
|||
static short alreadythrew = 0;
|
||||
|
||||
DoActorPickClosePlayer(actor);
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),u->targetActor->spr.pos.X,u->targetActor->spr.pos.Y,u->targetActor->spr.pos.Z,u->targetActor->spr.sector());
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),actor->user.targetActor->spr.pos.X,actor->user.targetActor->spr.pos.Y,actor->user.targetActor->spr.pos.Z,actor->user.targetActor->spr.sector());
|
||||
|
||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags,SPR_CLIMBING))
|
||||
KeepActorOnFloor(actor);
|
||||
|
||||
if (u->FlagOwner != 1)
|
||||
if (actor->user.FlagOwner != 1)
|
||||
{
|
||||
}
|
||||
else if ((u->WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
else if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
{
|
||||
if (!SoundValidAndActive(actor, CHAN_AnimeMad))
|
||||
{
|
||||
|
@ -1732,8 +1732,8 @@ int NullSailorGirl(DSWActor* actor)
|
|||
PlaySound(DIGI_LANI066, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
ChangeState(actor,s_SailorGirlThrow);
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1743,14 +1743,14 @@ int SailorGirlThrow(DSWActor* actor)
|
|||
{
|
||||
USER* u = actor->u();
|
||||
|
||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags,SPR_CLIMBING))
|
||||
KeepActorOnFloor(actor);
|
||||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
|
||||
{
|
||||
u->WaitTics = RandomRange(240)+120;
|
||||
actor->user.WaitTics = RandomRange(240)+120;
|
||||
ChangeState(actor,s_SailorGirlStand);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1761,7 +1761,7 @@ int SailorGirlPain(DSWActor* actor)
|
|||
USER* u = actor->u();
|
||||
NullSailorGirl(actor);
|
||||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
|
||||
ChangeState(actor,s_SailorGirlStand);
|
||||
|
||||
return 0;
|
||||
|
@ -1827,26 +1827,26 @@ int SetupPruneGirl(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
u = SpawnUser(actor, PRUNEGIRL_R0,s_PruneGirlStand);
|
||||
u->Health = 60;
|
||||
actor->user.Health = 60;
|
||||
}
|
||||
|
||||
|
||||
EnemyDefaults(actor, nullptr, nullptr);
|
||||
|
||||
ChangeState(actor,s_PruneGirlStand);
|
||||
u->Attrib = &PruneGirlAttrib;
|
||||
u->StateEnd = s_PruneGirlStand;
|
||||
u->Rot = 0;
|
||||
u->RotNum = 0;
|
||||
actor->user.Attrib = &PruneGirlAttrib;
|
||||
actor->user.StateEnd = s_PruneGirlStand;
|
||||
actor->user.Rot = 0;
|
||||
actor->user.RotNum = 0;
|
||||
|
||||
actor->spr.xrepeat = 33;
|
||||
actor->spr.yrepeat = 28;
|
||||
actor->spr.xvel = actor->spr.yvel = actor->spr.zvel = 0;
|
||||
actor->spr.lotag = PRUNEGIRL_R0;
|
||||
u->FlagOwner = 0;
|
||||
u->ID = PRUNEGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
actor->user.ID = PRUNEGIRL_R0;
|
||||
|
||||
RESET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1857,11 +1857,11 @@ int DoPruneGirl(DSWActor* actor)
|
|||
bool ICanSee = false;
|
||||
|
||||
DoActorPickClosePlayer(actor);
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),u->targetActor->spr.pos.X,u->targetActor->spr.pos.Y,ActorZOfMiddle(u->targetActor),u->targetActor->spr.sector());
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),actor->user.targetActor->spr.pos.X,actor->user.targetActor->spr.pos.Y,ActorZOfMiddle(actor->user.targetActor),actor->user.targetActor->spr.sector());
|
||||
|
||||
if (u->FlagOwner == 1)
|
||||
if (actor->user.FlagOwner == 1)
|
||||
{
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
{
|
||||
if (!SoundValidAndActive(actor, CHAN_AnimeMad))
|
||||
{
|
||||
|
@ -1877,8 +1877,8 @@ int DoPruneGirl(DSWActor* actor)
|
|||
else
|
||||
PlaySound(DIGI_LANI095, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1900,7 +1900,7 @@ int DoPruneGirl(DSWActor* actor)
|
|||
}
|
||||
|
||||
// stay on floor unless doing certain things
|
||||
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
|
||||
{
|
||||
KeepActorOnFloor(actor);
|
||||
}
|
||||
|
@ -1918,15 +1918,15 @@ int NullPruneGirl(DSWActor* actor)
|
|||
bool ICanSee = false;
|
||||
|
||||
DoActorPickClosePlayer(actor);
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),u->targetActor->spr.pos.X,u->targetActor->spr.pos.Y,u->targetActor->spr.pos.Z,u->targetActor->spr.sector());
|
||||
ICanSee = FAFcansee(actor->spr.pos.X,actor->spr.pos.Y,ActorZOfMiddle(actor),actor->spr.sector(),actor->user.targetActor->spr.pos.X,actor->user.targetActor->spr.pos.Y,actor->user.targetActor->spr.pos.Z,actor->user.targetActor->spr.sector());
|
||||
|
||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags,SPR_CLIMBING))
|
||||
KeepActorOnFloor(actor);
|
||||
|
||||
if (u->FlagOwner != 1)
|
||||
if (actor->user.FlagOwner != 1)
|
||||
{
|
||||
}
|
||||
else if ((u->WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
else if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0 && ICanSee)
|
||||
{
|
||||
if (!SoundValidAndActive(actor, CHAN_AnimeMad))
|
||||
{
|
||||
|
@ -1942,8 +1942,8 @@ int NullPruneGirl(DSWActor* actor)
|
|||
else
|
||||
PlaySound(DIGI_LANI095, actor, v3df_dontpan, CHAN_AnimeMad);
|
||||
}
|
||||
u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8);
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1953,14 +1953,14 @@ int PruneGirlUzi(DSWActor* actor)
|
|||
{
|
||||
USER* u = actor->u();
|
||||
|
||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||
if (!TEST(actor->user.Flags,SPR_CLIMBING))
|
||||
KeepActorOnFloor(actor);
|
||||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
|
||||
{
|
||||
u->WaitTics = RandomRange(240)+120;
|
||||
actor->user.WaitTics = RandomRange(240)+120;
|
||||
ChangeState(actor,s_PruneGirlStand);
|
||||
u->FlagOwner = 0;
|
||||
actor->user.FlagOwner = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1972,7 +1972,7 @@ int PruneGirlPain(DSWActor* actor)
|
|||
|
||||
NullPruneGirl(actor);
|
||||
|
||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
|
||||
ChangeState(actor,s_PruneGirlStand);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue