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;
|
USERp u;
|
||||||
ANIMATOR DoActorDecide;
|
ANIMATOR DoActorDecide;
|
||||||
|
|
||||||
if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
|
if (TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
|
||||||
{
|
{
|
||||||
u = actor->u();
|
u = actor->u();
|
||||||
ASSERT(u);
|
ASSERT(u);
|
||||||
|
@ -660,19 +660,19 @@ int SetupSumo(DSWActor* actor)
|
||||||
|
|
||||||
EnemyDefaults(actor, &SumoActionSet, &SumoPersonality);
|
EnemyDefaults(actor, &SumoActionSet, &SumoPersonality);
|
||||||
|
|
||||||
sp->clipdist = (512) >> 2;
|
actor->spr.clipdist = (512) >> 2;
|
||||||
if (sp->pal == 16)
|
if (actor->spr.pal == 16)
|
||||||
{
|
{
|
||||||
// Mini Sumo
|
// Mini Sumo
|
||||||
sp->xrepeat = 43;
|
actor->spr.xrepeat = 43;
|
||||||
sp->yrepeat = 29;
|
actor->spr.yrepeat = 29;
|
||||||
u->ActorActionSet = &MiniSumoActionSet;
|
u->ActorActionSet = &MiniSumoActionSet;
|
||||||
u->Health = 500;
|
u->Health = 500;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sp->xrepeat = 115;
|
actor->spr.xrepeat = 115;
|
||||||
sp->yrepeat = 75;
|
actor->spr.yrepeat = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
//SET(u->Flags, SPR_XFLIP_TOGGLE);
|
//SET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||||
|
@ -754,7 +754,7 @@ int InitSumoClap(DSWActor* actor)
|
||||||
USER* u = actor->u();
|
USER* u = actor->u();
|
||||||
SPRITEp sp = &actor->s();
|
SPRITEp sp = &actor->s();
|
||||||
|
|
||||||
if (sp->pal == 16 && RandomRange(1000) <= 800)
|
if (actor->spr.pal == 16 && RandomRange(1000) <= 800)
|
||||||
InitMiniSumoClap(actor);
|
InitMiniSumoClap(actor);
|
||||||
else
|
else
|
||||||
InitSumoSkull(actor);
|
InitSumoSkull(actor);
|
||||||
|
@ -772,7 +772,7 @@ int DoSumoDeathMelt(DSWActor* actor)
|
||||||
InitChemBomb(actor);
|
InitChemBomb(actor);
|
||||||
u->ID = 0;
|
u->ID = 0;
|
||||||
|
|
||||||
DoMatchEverything(nullptr, sp->lotag, ON);
|
DoMatchEverything(nullptr, actor->spr.lotag, ON);
|
||||||
if (!SW_SHAREWARE)
|
if (!SW_SHAREWARE)
|
||||||
{
|
{
|
||||||
// Resume the regular music - in a hack-free fashion.
|
// Resume the regular music - in a hack-free fashion.
|
||||||
|
@ -838,7 +838,7 @@ void BossHealthMeter(void)
|
||||||
sp = &actor->s();
|
sp = &actor->s();
|
||||||
u = actor->u();
|
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])
|
if (i == 0 && !bosswasseen[0])
|
||||||
{
|
{
|
||||||
|
|
|
@ -644,7 +644,7 @@ int SetupZilla(DSWActor* actor)
|
||||||
USERp u;
|
USERp u;
|
||||||
ANIMATOR DoActorDecide;
|
ANIMATOR DoActorDecide;
|
||||||
|
|
||||||
if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
|
if (TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
|
||||||
{
|
{
|
||||||
u = actor->u();
|
u = actor->u();
|
||||||
ASSERT(u);
|
ASSERT(u);
|
||||||
|
@ -666,9 +666,9 @@ int SetupZilla(DSWActor* actor)
|
||||||
|
|
||||||
EnemyDefaults(actor, &ZillaActionSet, &ZillaPersonality);
|
EnemyDefaults(actor, &ZillaActionSet, &ZillaPersonality);
|
||||||
|
|
||||||
sp->clipdist = (512) >> 2;
|
actor->spr.clipdist = (512) >> 2;
|
||||||
sp->xrepeat = 97;
|
actor->spr.xrepeat = 97;
|
||||||
sp->yrepeat = 79;
|
actor->spr.yrepeat = 79;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -681,19 +681,19 @@ int NullZilla(DSWActor* actor)
|
||||||
#if 0
|
#if 0
|
||||||
if (u->State == s_ZillaDie)
|
if (u->State == s_ZillaDie)
|
||||||
{
|
{
|
||||||
getzsofslopeptr(sp->sector(), sp->pos.X, sp->y, &u->hiz, &u->loz);
|
getzsofslopeptr(actor->spr.sector(), actor->spr.pos.X, actor->spr.y, &u->hiz, &u->loz);
|
||||||
u->lo_sectp = sp->sector();
|
u->lo_sectp = actor->spr.sector();
|
||||||
u->hi_sectp = sp->sector();
|
u->hi_sectp = actor->spr.sector();
|
||||||
sp->z = u->loz;
|
actor->spr.z = u->loz;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
getzsofslopeptr(sp->sector(), sp->pos.X, sp->pos.Y, &u->hiz, &u->loz);
|
getzsofslopeptr(actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, &u->hiz, &u->loz);
|
||||||
u->lo_sectp = sp->sector();
|
u->lo_sectp = actor->spr.sector();
|
||||||
u->hi_sectp = sp->sector();
|
u->hi_sectp = actor->spr.sector();
|
||||||
u->lowActor = nullptr;
|
u->lowActor = nullptr;
|
||||||
u->highActor = nullptr;
|
u->highActor = nullptr;
|
||||||
sp->pos.Z = u->loz;
|
actor->spr.pos.Z = u->loz;
|
||||||
|
|
||||||
DoActorSectorDamage(actor);
|
DoActorSectorDamage(actor);
|
||||||
|
|
||||||
|
@ -754,7 +754,7 @@ int DoZillaDeathMelt(DSWActor* actor)
|
||||||
u->ID = ZILLA_RUN_R0;
|
u->ID = ZILLA_RUN_R0;
|
||||||
RESET(u->Flags, SPR_JUMPING|SPR_FALLING|SPR_MOVED);
|
RESET(u->Flags, SPR_JUMPING|SPR_FALLING|SPR_MOVED);
|
||||||
|
|
||||||
//DoMatchEverything(nullptr, sp->lotag, ON);
|
//DoMatchEverything(nullptr, actor->spr.lotag, ON);
|
||||||
if (!SW_SHAREWARE)
|
if (!SW_SHAREWARE)
|
||||||
{
|
{
|
||||||
// Resume the regular music - in a hack-free fashion.
|
// Resume the regular music - in a hack-free fashion.
|
||||||
|
@ -762,12 +762,12 @@ int DoZillaDeathMelt(DSWActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
//KeepActorOnFloor(actor);
|
//KeepActorOnFloor(actor);
|
||||||
getzsofslopeptr(sp->sector(), sp->pos.X, sp->pos.Y, &u->hiz, &u->loz);
|
getzsofslopeptr(actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, &u->hiz, &u->loz);
|
||||||
u->lo_sectp = sp->sector();
|
u->lo_sectp = actor->spr.sector();
|
||||||
u->hi_sectp = sp->sector();
|
u->hi_sectp = actor->spr.sector();
|
||||||
u->lowActor = nullptr;
|
u->lowActor = nullptr;
|
||||||
u->highActor = nullptr;
|
u->highActor = nullptr;
|
||||||
sp->pos.Z = u->loz;
|
actor->spr.pos.Z = u->loz;
|
||||||
|
|
||||||
BossSpriteNum[2] = nullptr;
|
BossSpriteNum[2] = nullptr;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -756,8 +756,8 @@ int SetupZombie(DSWActor* actor)
|
||||||
u->Health = 100;
|
u->Health = 100;
|
||||||
u->StateEnd = &s_ZombiePain[0][0];
|
u->StateEnd = &s_ZombiePain[0][0];
|
||||||
u->Rot = sg_ZombieRun;
|
u->Rot = sg_ZombieRun;
|
||||||
sp->xrepeat = PLAYER_NINJA_XREPEAT;
|
actor->spr.xrepeat = PLAYER_NINJA_XREPEAT;
|
||||||
sp->yrepeat = PLAYER_NINJA_YREPEAT;
|
actor->spr.yrepeat = PLAYER_NINJA_YREPEAT;
|
||||||
|
|
||||||
u->Attrib = &ZombieAttrib;
|
u->Attrib = &ZombieAttrib;
|
||||||
EnemyDefaults(actor, &ZombieActionSet, &ZombiePersonality);
|
EnemyDefaults(actor, &ZombieActionSet, &ZombiePersonality);
|
||||||
|
@ -810,8 +810,8 @@ void SpawnZombie2(DSWActor* actor)
|
||||||
SPRITEp sp = &actor->s();
|
SPRITEp sp = &actor->s();
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
auto sectu = sp->sector();
|
auto sectu = actor->spr.sector();
|
||||||
SECTORp sectp = sp->sector();
|
SECTORp sectp = actor->spr.sector();
|
||||||
|
|
||||||
auto ownerActor = GetOwner(actor);
|
auto ownerActor = GetOwner(actor);
|
||||||
|
|
||||||
|
@ -821,19 +821,19 @@ void SpawnZombie2(DSWActor* actor)
|
||||||
if (sectu && (TEST(sectp->extra, SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE))
|
if (sectu && (TEST(sectp->extra, SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (SectorIsUnderwaterArea(sp->sector()))
|
if (SectorIsUnderwaterArea(actor->spr.sector()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (FAF_ConnectArea(sp->sector()))
|
if (FAF_ConnectArea(actor->spr.sector()))
|
||||||
{
|
{
|
||||||
auto newsect = sp->sector();
|
auto newsect = actor->spr.sector();
|
||||||
updatesectorz(sp->pos.X, sp->pos.Y, sp->pos.Z + Z(10), &newsect);
|
updatesectorz(actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z + Z(10), &newsect);
|
||||||
if (SectorIsUnderwaterArea(newsect))
|
if (SectorIsUnderwaterArea(newsect))
|
||||||
return;
|
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();
|
np = &actorNew->s();
|
||||||
nu = actorNew->u();
|
nu = actorNew->u();
|
||||||
nu->Counter3 = 0;
|
nu->Counter3 = 0;
|
||||||
|
|
Loading…
Reference in a new issue