mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
- globally replaced sp-> in several files.
No further cleanup yet.
This commit is contained in:
parent
dc7fecccd0
commit
639613297d
3 changed files with 36 additions and 36 deletions
|
@ -638,7 +638,7 @@ int SetupSumo(DSWActor* actor)
|
|||
USERp u;
|
||||
ANIMATOR DoActorDecide;
|
||||
|
||||
if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
|
||||
if (TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
|
||||
{
|
||||
u = actor->u();
|
||||
ASSERT(u);
|
||||
|
@ -660,19 +660,19 @@ int SetupSumo(DSWActor* actor)
|
|||
|
||||
EnemyDefaults(actor, &SumoActionSet, &SumoPersonality);
|
||||
|
||||
sp->clipdist = (512) >> 2;
|
||||
if (sp->pal == 16)
|
||||
actor->spr.clipdist = (512) >> 2;
|
||||
if (actor->spr.pal == 16)
|
||||
{
|
||||
// Mini Sumo
|
||||
sp->xrepeat = 43;
|
||||
sp->yrepeat = 29;
|
||||
actor->spr.xrepeat = 43;
|
||||
actor->spr.yrepeat = 29;
|
||||
u->ActorActionSet = &MiniSumoActionSet;
|
||||
u->Health = 500;
|
||||
}
|
||||
else
|
||||
{
|
||||
sp->xrepeat = 115;
|
||||
sp->yrepeat = 75;
|
||||
actor->spr.xrepeat = 115;
|
||||
actor->spr.yrepeat = 75;
|
||||
}
|
||||
|
||||
//SET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||
|
@ -754,7 +754,7 @@ int InitSumoClap(DSWActor* actor)
|
|||
USER* u = actor->u();
|
||||
SPRITEp sp = &actor->s();
|
||||
|
||||
if (sp->pal == 16 && RandomRange(1000) <= 800)
|
||||
if (actor->spr.pal == 16 && RandomRange(1000) <= 800)
|
||||
InitMiniSumoClap(actor);
|
||||
else
|
||||
InitSumoSkull(actor);
|
||||
|
@ -772,7 +772,7 @@ int DoSumoDeathMelt(DSWActor* actor)
|
|||
InitChemBomb(actor);
|
||||
u->ID = 0;
|
||||
|
||||
DoMatchEverything(nullptr, sp->lotag, ON);
|
||||
DoMatchEverything(nullptr, actor->spr.lotag, ON);
|
||||
if (!SW_SHAREWARE)
|
||||
{
|
||||
// Resume the regular music - in a hack-free fashion.
|
||||
|
@ -838,7 +838,7 @@ void BossHealthMeter(void)
|
|||
sp = &actor->s();
|
||||
u = actor->u();
|
||||
|
||||
if (cansee(sp->pos.X, sp->pos.Y, GetSpriteZOfTop(sp), sp->sector(), pp->pos.X, pp->pos.Y, pp->pos.Z - Z(40), pp->cursector))
|
||||
if (cansee(actor->spr.pos.X, actor->spr.pos.Y, GetSpriteZOfTop(sp), actor->spr.sector(), pp->pos.X, pp->pos.Y, pp->pos.Z - Z(40), pp->cursector))
|
||||
{
|
||||
if (i == 0 && !bosswasseen[0])
|
||||
{
|
||||
|
|
|
@ -644,7 +644,7 @@ int SetupZilla(DSWActor* actor)
|
|||
USERp u;
|
||||
ANIMATOR DoActorDecide;
|
||||
|
||||
if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
|
||||
if (TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
|
||||
{
|
||||
u = actor->u();
|
||||
ASSERT(u);
|
||||
|
@ -666,9 +666,9 @@ int SetupZilla(DSWActor* actor)
|
|||
|
||||
EnemyDefaults(actor, &ZillaActionSet, &ZillaPersonality);
|
||||
|
||||
sp->clipdist = (512) >> 2;
|
||||
sp->xrepeat = 97;
|
||||
sp->yrepeat = 79;
|
||||
actor->spr.clipdist = (512) >> 2;
|
||||
actor->spr.xrepeat = 97;
|
||||
actor->spr.yrepeat = 79;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -681,19 +681,19 @@ int NullZilla(DSWActor* actor)
|
|||
#if 0
|
||||
if (u->State == s_ZillaDie)
|
||||
{
|
||||
getzsofslopeptr(sp->sector(), sp->pos.X, sp->y, &u->hiz, &u->loz);
|
||||
u->lo_sectp = sp->sector();
|
||||
u->hi_sectp = sp->sector();
|
||||
sp->z = u->loz;
|
||||
getzsofslopeptr(actor->spr.sector(), actor->spr.pos.X, actor->spr.y, &u->hiz, &u->loz);
|
||||
u->lo_sectp = actor->spr.sector();
|
||||
u->hi_sectp = actor->spr.sector();
|
||||
actor->spr.z = u->loz;
|
||||
}
|
||||
#endif
|
||||
|
||||
getzsofslopeptr(sp->sector(), sp->pos.X, sp->pos.Y, &u->hiz, &u->loz);
|
||||
u->lo_sectp = sp->sector();
|
||||
u->hi_sectp = sp->sector();
|
||||
getzsofslopeptr(actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, &u->hiz, &u->loz);
|
||||
u->lo_sectp = actor->spr.sector();
|
||||
u->hi_sectp = actor->spr.sector();
|
||||
u->lowActor = nullptr;
|
||||
u->highActor = nullptr;
|
||||
sp->pos.Z = u->loz;
|
||||
actor->spr.pos.Z = u->loz;
|
||||
|
||||
DoActorSectorDamage(actor);
|
||||
|
||||
|
@ -754,7 +754,7 @@ int DoZillaDeathMelt(DSWActor* actor)
|
|||
u->ID = ZILLA_RUN_R0;
|
||||
RESET(u->Flags, SPR_JUMPING|SPR_FALLING|SPR_MOVED);
|
||||
|
||||
//DoMatchEverything(nullptr, sp->lotag, ON);
|
||||
//DoMatchEverything(nullptr, actor->spr.lotag, ON);
|
||||
if (!SW_SHAREWARE)
|
||||
{
|
||||
// Resume the regular music - in a hack-free fashion.
|
||||
|
@ -762,12 +762,12 @@ int DoZillaDeathMelt(DSWActor* actor)
|
|||
}
|
||||
|
||||
//KeepActorOnFloor(actor);
|
||||
getzsofslopeptr(sp->sector(), sp->pos.X, sp->pos.Y, &u->hiz, &u->loz);
|
||||
u->lo_sectp = sp->sector();
|
||||
u->hi_sectp = sp->sector();
|
||||
getzsofslopeptr(actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, &u->hiz, &u->loz);
|
||||
u->lo_sectp = actor->spr.sector();
|
||||
u->hi_sectp = actor->spr.sector();
|
||||
u->lowActor = nullptr;
|
||||
u->highActor = nullptr;
|
||||
sp->pos.Z = u->loz;
|
||||
actor->spr.pos.Z = u->loz;
|
||||
|
||||
BossSpriteNum[2] = nullptr;
|
||||
return 0;
|
||||
|
|
|
@ -756,8 +756,8 @@ int SetupZombie(DSWActor* actor)
|
|||
u->Health = 100;
|
||||
u->StateEnd = &s_ZombiePain[0][0];
|
||||
u->Rot = sg_ZombieRun;
|
||||
sp->xrepeat = PLAYER_NINJA_XREPEAT;
|
||||
sp->yrepeat = PLAYER_NINJA_YREPEAT;
|
||||
actor->spr.xrepeat = PLAYER_NINJA_XREPEAT;
|
||||
actor->spr.yrepeat = PLAYER_NINJA_YREPEAT;
|
||||
|
||||
u->Attrib = &ZombieAttrib;
|
||||
EnemyDefaults(actor, &ZombieActionSet, &ZombiePersonality);
|
||||
|
@ -810,8 +810,8 @@ void SpawnZombie2(DSWActor* actor)
|
|||
SPRITEp sp = &actor->s();
|
||||
SPRITEp np;
|
||||
USERp nu;
|
||||
auto sectu = sp->sector();
|
||||
SECTORp sectp = sp->sector();
|
||||
auto sectu = actor->spr.sector();
|
||||
SECTORp sectp = actor->spr.sector();
|
||||
|
||||
auto ownerActor = GetOwner(actor);
|
||||
|
||||
|
@ -821,19 +821,19 @@ void SpawnZombie2(DSWActor* actor)
|
|||
if (sectu && (TEST(sectp->extra, SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE))
|
||||
return;
|
||||
|
||||
if (SectorIsUnderwaterArea(sp->sector()))
|
||||
if (SectorIsUnderwaterArea(actor->spr.sector()))
|
||||
return;
|
||||
|
||||
if (FAF_ConnectArea(sp->sector()))
|
||||
if (FAF_ConnectArea(actor->spr.sector()))
|
||||
{
|
||||
auto newsect = sp->sector();
|
||||
updatesectorz(sp->pos.X, sp->pos.Y, sp->pos.Z + Z(10), &newsect);
|
||||
auto newsect = actor->spr.sector();
|
||||
updatesectorz(actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z + Z(10), &newsect);
|
||||
if (SectorIsUnderwaterArea(newsect))
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
auto actorNew = SpawnActor(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], sp->sector(), sp->pos.X, sp->pos.Y, sp->pos.Z, sp->ang, 0);
|
||||
auto actorNew = SpawnActor(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 0);
|
||||
np = &actorNew->s();
|
||||
nu = actorNew->u();
|
||||
nu->Counter3 = 0;
|
||||
|
|
Loading…
Reference in a new issue