- KeepActorOnFloor

This commit is contained in:
Christoph Oelckers 2021-10-29 22:34:54 +02:00
parent 2ba98dc03c
commit ad0ed0c377
16 changed files with 54 additions and 54 deletions

View file

@ -520,11 +520,11 @@ int DoGenerateSewerDebris(DSWActor* actor)
// !AIC - Tries to keep actors correctly on the floor. More that a bit messy.
void
KeepActorOnFloor(short SpriteNum)
void KeepActorOnFloor(DSWActor* actor)
{
USERp u = User[SpriteNum].Data();
SPRITEp sp = User[SpriteNum]->SpriteP;
USERp u = actor->u();
SPRITEp sp = &actor->s();
int SpriteNum = actor->GetSpriteIndex();
SECTORp sectp;
int depth;

View file

@ -1114,7 +1114,7 @@ NullBunny(DSWActor* actor)
// stay on floor unless doing certain things
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if (TEST(u->Flags,SPR_SLIDING))
DoActorSlide(actor);
@ -1364,7 +1364,7 @@ DoBunnyMove(DSWActor* actor)
// stay on floor unless doing certain things
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);
@ -1433,7 +1433,7 @@ DoBunnyEat(DSWActor* actor)
// stay on floor unless doing certain things
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);
@ -1479,7 +1479,7 @@ DoBunnyScrew(DSWActor* actor)
// stay on floor unless doing certain things
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);

View file

@ -468,7 +468,7 @@ void EnemyDefaults(short SpriteNum, ACTOR_ACTION_SETp action, PERSONALITYp perso
DoActorZrange(SpriteNum);
//KeepActorOnFloor(SpriteNum); // for swimming actors
//KeepActorOnFloor(actor); // for swimming actors
// make sure we start in the water if thats where we are
if (u->lo_sectp) // && SectUser[u->lo_sectp - sector])
@ -585,7 +585,7 @@ int CooliePain(DSWActor* actor)
DoActorSlide(actor);
if (!TEST(u->Flags,SPR_CLIMBING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);
@ -604,7 +604,7 @@ int NullCoolie(DSWActor* actor)
DoActorSlide(actor);
if (!TEST(u->Flags,SPR_CLIMBING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);
@ -625,7 +625,7 @@ int DoCoolieMove(DSWActor* actor)
else
(*u->ActorActionFunc)(actor);
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if (DoActorSectorDamage(actor))
{

View file

@ -779,7 +779,7 @@ DoGirlNinjaMove(DSWActor* actor)
// stay on floor unless doing certain things
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
{
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
}
// take damage from environment
@ -826,7 +826,7 @@ NullGirlNinja(DSWActor* actor)
DoActorSlide(actor);
if (!TEST(u->Flags, SPR_CLIMBING) && !TEST(u->Flags, SPR_JUMPING|SPR_FALLING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);

View file

@ -521,7 +521,7 @@ int NullGoro(DSWActor* actor)
if (TEST(u->Flags,SPR_SLIDING))
DoActorSlide(actor);
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);
return 0;
@ -553,7 +553,7 @@ int DoGoroMove(DSWActor* actor)
ASSERT(User[SpriteNum].Data());
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);
return 0;

View file

@ -493,7 +493,7 @@ int NullLava(DSWActor* actor)
if (TEST(u->Flags,SPR_SLIDING))
DoActorSlide(actor);
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);
return 0;
@ -512,7 +512,7 @@ int DoLavaMove(DSWActor* actor)
else
(*u->ActorActionFunc)(actor);
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);
return 0;

View file

@ -84,7 +84,7 @@ int DoBeginJump(short SpriteNum);
int DoJump(short SpriteNum);
int DoBeginFall(short SpriteNum);
int DoFall(short SpriteNum);
void KeepActorOnFloor(short SpriteNum);
void KeepActorOnFloor(DSWActor* actor);
int DoActorSlide(DSWActor* actor);
int DoActorSectorDamage(DSWActor* actor);
int DoScaleSprite(DSWActor* actor);

View file

@ -198,7 +198,7 @@ int DoToiletGirl(DSWActor* actor)
// stay on floor unless doing certain things
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
{
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
}
// take damage from environment
@ -219,7 +219,7 @@ int NullToiletGirl(DSWActor* actor)
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum);
if (!TEST(u->Flags,SPR_CLIMBING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if (u->FlagOwner != 1)
{
@ -247,7 +247,7 @@ int ToiletGirlUzi(DSWActor* actor)
int SpriteNum = u->SpriteNum;
if (!TEST(u->Flags,SPR_CLIMBING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
{
@ -447,7 +447,7 @@ int DoWashGirl(DSWActor* actor)
// stay on floor unless doing certain things
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
{
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
}
// take damage from environment
@ -468,7 +468,7 @@ int NullWashGirl(DSWActor* actor)
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum);
if (!TEST(u->Flags,SPR_CLIMBING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if (u->FlagOwner != 1)
{
@ -496,7 +496,7 @@ int WashGirlUzi(DSWActor* actor)
int SpriteNum = u->SpriteNum;
if (!TEST(u->Flags,SPR_CLIMBING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
{
@ -618,7 +618,7 @@ int DoTrashCan(DSWActor* actor)
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
{
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
}
sp->xvel = sp->yvel = sp->zvel = 0;
@ -635,7 +635,7 @@ int TrashCanPain(DSWActor* actor)
DoActorSlide(actor);
if (!TEST(u->Flags,SPR_CLIMBING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
ChangeState(SpriteNum,s_TrashCanStand);
@ -1312,7 +1312,7 @@ int DoCarGirl(DSWActor* actor)
// stay on floor unless doing certain things
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
{
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
}
// take damage from environment
@ -1333,7 +1333,7 @@ int NullCarGirl(DSWActor* actor)
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum);
if (!TEST(u->Flags,SPR_CLIMBING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if (u->FlagOwner != 1)
{
@ -1368,7 +1368,7 @@ int CarGirlUzi(DSWActor* actor)
int SpriteNum = u->SpriteNum;
if (!TEST(u->Flags,SPR_CLIMBING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
{
@ -1534,7 +1534,7 @@ int DoMechanicGirl(DSWActor* actor)
// stay on floor unless doing certain things
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
{
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
}
// take damage from environment
@ -1555,7 +1555,7 @@ int NullMechanicGirl(DSWActor* actor)
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum);
if (!TEST(u->Flags,SPR_CLIMBING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if (u->FlagOwner != 1)
{
@ -1589,7 +1589,7 @@ int MechanicGirlDrill(DSWActor* actor)
USER* u = actor->u();
int SpriteNum = u->SpriteNum;
if (!TEST(u->Flags,SPR_CLIMBING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
{
@ -1761,7 +1761,7 @@ int DoSailorGirl(DSWActor* actor)
// stay on floor unless doing certain things
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
{
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
}
// take damage from environment
@ -1783,7 +1783,7 @@ int NullSailorGirl(DSWActor* actor)
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum);
if (!TEST(u->Flags,SPR_CLIMBING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if (u->FlagOwner != 1)
{
@ -1822,7 +1822,7 @@ int SailorGirlThrow(DSWActor* actor)
int SpriteNum = u->SpriteNum;
if (!TEST(u->Flags,SPR_CLIMBING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
{
@ -1988,7 +1988,7 @@ int DoPruneGirl(DSWActor* actor)
// stay on floor unless doing certain things
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
{
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
}
// take damage from environment
@ -2009,7 +2009,7 @@ int NullPruneGirl(DSWActor* actor)
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum);
if (!TEST(u->Flags,SPR_CLIMBING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if (u->FlagOwner != 1)
{
@ -2043,7 +2043,7 @@ int PruneGirlUzi(DSWActor* actor)
int SpriteNum = u->SpriteNum;
if (!TEST(u->Flags,SPR_CLIMBING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
{

View file

@ -2049,7 +2049,7 @@ DoNinjaMove(DSWActor* actor)
// stay on floor unless doing certain things
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
{
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
}
// take damage from environment
@ -2103,7 +2103,7 @@ NullNinja(DSWActor* actor)
DoActorSlide(actor);
if (!TEST(u->Flags, SPR_CLIMBING) && !TEST(u->Flags, SPR_JUMPING|SPR_FALLING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);

View file

@ -1313,7 +1313,7 @@ DoRipperMove(DSWActor* actor)
if (DoRipperQuickJump(actor))
return 0;
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
}
if (TEST(u->Flags, SPR_SLIDING))

View file

@ -1331,7 +1331,7 @@ DoRipper2Move(DSWActor* actor)
if (DoRipper2QuickJump(actor))
return 0;
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
}
if (TEST(u->Flags, SPR_SLIDING))

View file

@ -761,7 +761,7 @@ int NullSerp(DSWActor* actor)
if (TEST(u->Flags,SPR_SLIDING))
DoActorSlide(actor);
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
//DoActorSectorDamage(actor);
return 0;
@ -804,7 +804,7 @@ int DoSerpMove(DSWActor* actor)
}
}
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
//DoActorSectorDamage(actor);
return 0;

View file

@ -599,7 +599,7 @@ int NullSkel(DSWActor* actor)
if (TEST(u->Flags,SPR_SLIDING))
DoActorSlide(actor);
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);
return 0;
@ -631,7 +631,7 @@ int DoSkelMove(DSWActor* actor)
else
(*u->ActorActionFunc)(actor);
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);

View file

@ -685,7 +685,7 @@ int NullSumo(DSWActor* actor)
//DoActorSlide(actor);
if (!TEST(u->Flags,SPR_CLIMBING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);
@ -705,7 +705,7 @@ int DoSumoMove(DSWActor* actor)
else
(*u->ActorActionFunc)(actor);
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if (DoActorSectorDamage(actor))
{

View file

@ -698,7 +698,7 @@ int NullZilla(DSWActor* actor)
#endif
//if (!TEST(u->Flags,SPR_CLIMBING))
// KeepActorOnFloor(SpriteNum);
// KeepActorOnFloor(actor);
getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz);
u->lo_sectp = &sector[sp->sectnum];
u->hi_sectp = &sector[sp->sectnum];
@ -741,7 +741,7 @@ int DoZillaMove(DSWActor* actor)
else
(*u->ActorActionFunc)(actor);
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
if (DoActorSectorDamage(actor))
{
@ -783,7 +783,7 @@ int DoZillaDeathMelt(DSWActor* actor)
PlaySong(currentLevel->music, currentLevel->cdSongId);
}
//KeepActorOnFloor(SpriteNum);
//KeepActorOnFloor(actor);
getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz);
u->lo_sectp = &sector[sp->sectnum];
u->hi_sectp = &sector[sp->sectnum];

View file

@ -921,7 +921,7 @@ DoZombieMove(DSWActor* actor)
// stay on floor unless doing certain things
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
{
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
}
// take damage from environment
@ -955,7 +955,7 @@ NullZombie(DSWActor* actor)
DoActorSlide(actor);
if (!TEST(u->Flags, SPR_JUMPING|SPR_FALLING))
KeepActorOnFloor(SpriteNum);
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);