- some automatic replacements.

This commit is contained in:
Christoph Oelckers 2022-10-06 00:46:20 +02:00
parent 730c0ef66d
commit a11a366697
12 changed files with 30 additions and 30 deletions

View file

@ -421,7 +421,7 @@ void moveplayers(void)
auto psp = ps[otherp].GetActor(); auto psp = ps[otherp].GetActor();
if (psp->spr.extra > 0) if (psp->spr.extra > 0)
{ {
if (act->spr.yrepeat > 32 && psp->spr.yrepeat < 32) if (act->spr.yrepeat > 32 && psp->spr.ScaleY() < 0.5)
{ {
if (other < 1400/16. && p->knee_incs == 0) if (other < 1400/16. && p->knee_incs == 0)
{ {
@ -2289,7 +2289,7 @@ bool bloodpool(DDukeActor* actor, bool puke)
actor->temp_data[2]++; actor->temp_data[2]++;
if (attackerflag(actor, SFLAG_FLAMMABLEPOOLEFFECT)) if (attackerflag(actor, SFLAG_FLAMMABLEPOOLEFFECT))
{ {
if (actor->spr.xrepeat < 64 && actor->spr.yrepeat < 64) if (actor->spr.ScaleX() < 1 && actor->spr.ScaleY() < 1)
{ {
actor->spr.xrepeat += krand() & 3; actor->spr.xrepeat += krand() & 3;
actor->spr.yrepeat += krand() & 3; actor->spr.yrepeat += krand() & 3;
@ -2297,7 +2297,7 @@ bool bloodpool(DDukeActor* actor, bool puke)
} }
else else
{ {
if (actor->spr.xrepeat < 32 && actor->spr.yrepeat < 32) if (actor->spr.ScaleX() < 0.5 && actor->spr.ScaleY() < 0.5)
{ {
actor->spr.xrepeat += krand() & 3; actor->spr.xrepeat += krand() & 3;
actor->spr.yrepeat += krand() & 3; actor->spr.yrepeat += krand() & 3;
@ -2509,7 +2509,7 @@ void gutsdir(DDukeActor* actor, int gtype, int n, int p)
{ {
int sx, sy; int sx, sy;
if (badguy(actor) && actor->spr.xrepeat < 16) if (badguy(actor) && actor->spr.ScaleX() < 0.25)
sx = sy = 8; sx = sy = 8;
else sx = sy = 32; else sx = sy = 32;

View file

@ -439,7 +439,7 @@ int movesprite_ex_d(DDukeActor* actor, const DVector3& change, unsigned int clip
{ {
int bg = badguy(actor); int bg = badguy(actor);
if (actor->spr.statnum == STAT_MISC || (bg && actor->spr.xrepeat < 4)) if (actor->spr.statnum == STAT_MISC || (bg && actor->spr.ScaleX() < 0.0625))
{ {
actor->spr.pos += change; actor->spr.pos += change;
if (bg) if (bg)
@ -540,7 +540,7 @@ void guts_d(DDukeActor* actor, int gtype, int n, int p)
int sx, sy; int sx, sy;
uint8_t pal; uint8_t pal;
if (badguy(actor) && actor->spr.xrepeat < 16) if (badguy(actor) && actor->spr.ScaleX() < 0.25)
sx = sy = 8; sx = sy = 8;
else sx = sy = 32; else sx = sy = 32;
@ -2300,10 +2300,10 @@ static void greenslime(DDukeActor *actor)
actor->spr.pos = s5->spr.pos + s5->spr.angle.ToVector() * 0.5; actor->spr.pos = s5->spr.pos + s5->spr.angle.ToVector() * 0.5;
actor->spr.picnum = GREENSLIME + 2 + (global_random & 1); actor->spr.picnum = GREENSLIME + 2 + (global_random & 1);
if (actor->spr.yrepeat < 64) actor->spr.yrepeat += 2; if (actor->spr.ScaleY() < 1) actor->spr.yrepeat += 2;
else else
{ {
if (actor->spr.xrepeat < 32) actor->spr.xrepeat += 4; if (actor->spr.ScaleX() < 0.5) actor->spr.xrepeat += 4;
else else
{ {
actor->temp_data[0] = -1; actor->temp_data[0] = -1;
@ -2458,7 +2458,7 @@ static void flamethrowerflame(DDukeActor *actor)
getglobalz(actor); getglobalz(actor);
int ds = actor->temp_data[0] / 6; int ds = actor->temp_data[0] / 6;
if (actor->spr.xrepeat < 80) if (actor->spr.ScaleX() < 0.1250)
actor->spr.yrepeat = actor->spr.xrepeat += ds; actor->spr.yrepeat = actor->spr.xrepeat += ds;
actor->clipdist += ds * 0.25; actor->clipdist += ds * 0.25;
if (actor->temp_data[0] <= 2) if (actor->temp_data[0] <= 2)

View file

@ -367,7 +367,7 @@ int movesprite_ex_r(DDukeActor* actor, const DVector3& change, unsigned int clip
{ {
int bg = badguy(actor); int bg = badguy(actor);
if (actor->spr.statnum == 5 || (bg && actor->spr.xrepeat < 4)) if (actor->spr.statnum == 5 || (bg && actor->spr.ScaleX() < 0.0625))
{ {
actor->spr.pos += change; actor->spr.pos += change;
if (bg) if (bg)
@ -446,7 +446,7 @@ void guts_r(DDukeActor* actor, int gtype, int n, int p)
int sx, sy; int sx, sy;
uint8_t pal; uint8_t pal;
if (badguy(actor) && actor->spr.xrepeat < 16) if (badguy(actor) && actor->spr.ScaleX() < 0.25)
sx = sy = 4; sx = sy = 4;
else sx = sy = 16; else sx = sy = 16;

View file

@ -323,7 +323,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
newtspr->statnum = 99; newtspr->statnum = 99;
newtspr->yrepeat = (t->yrepeat >> 3); newtspr->yrepeat = (t->yrepeat >> 3);
if (t->yrepeat < 4) t->yrepeat = 4; if (t->ScaleY() < 0.0625) t->yrepeat = 4;
newtspr->shade = t->shade; newtspr->shade = t->shade;
newtspr->cstat = 0; newtspr->cstat = 0;
@ -418,7 +418,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
if (!h->GetOwner()) continue; if (!h->GetOwner()) continue;
if (t->pos.Z > h->floorz && t->xrepeat < 32) if (t->pos.Z > h->floorz && t->ScaleX() < 0.5)
t->pos.Z = h->floorz; t->pos.Z = h->floorz;
break; break;
@ -574,7 +574,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
shadowspr->statnum = 99; shadowspr->statnum = 99;
shadowspr->yrepeat = (t->yrepeat >> 3); shadowspr->yrepeat = (t->yrepeat >> 3);
if (t->yrepeat < 4) t->yrepeat = 4; if (t->ScaleY() < 0.0625) t->yrepeat = 4;
shadowspr->shade = 127; shadowspr->shade = 127;
shadowspr->cstat |= CSTAT_SPRITE_TRANSLUCENT; shadowspr->cstat |= CSTAT_SPRITE_TRANSLUCENT;

View file

@ -363,7 +363,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
newtspr->statnum = 99; newtspr->statnum = 99;
newtspr->yrepeat = (t->yrepeat >> 3); newtspr->yrepeat = (t->yrepeat >> 3);
if (t->yrepeat < 4) t->yrepeat = 4; if (t->ScaleY() < 0.0625) t->yrepeat = 4;
newtspr->shade = t->shade; newtspr->shade = t->shade;
newtspr->cstat = 0; newtspr->cstat = 0;
@ -459,7 +459,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
if (!h->GetOwner()) continue; if (!h->GetOwner()) continue;
if (t->pos.Z > h->floorz && t->xrepeat < 32) if (t->pos.Z > h->floorz && t->ScaleX() < 0.5)
t->pos.Z = h->floorz; t->pos.Z = h->floorz;
if (ps[p].OnMotorcycle && p == screenpeek) if (ps[p].OnMotorcycle && p == screenpeek)
@ -723,7 +723,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
shadowspr->statnum = 99; shadowspr->statnum = 99;
shadowspr->yrepeat = (t->yrepeat >> 3); shadowspr->yrepeat = (t->yrepeat >> 3);
if (t->yrepeat < 4) t->yrepeat = 4; if (t->ScaleY() < 0.0625) t->yrepeat = 4;
shadowspr->shade = 127; shadowspr->shade = 127;
shadowspr->cstat |= CSTAT_SPRITE_TRANSLUCENT; shadowspr->cstat |= CSTAT_SPRITE_TRANSLUCENT;

View file

@ -236,7 +236,7 @@ void displayweapon_d(int snum, double interpfrac)
looking_arc = p->angle.looking_arc(interpfrac); looking_arc = p->angle.looking_arc(interpfrac);
hard_landing *= 8.; hard_landing *= 8.;
gun_pos -= fabs(p->GetActor()->spr.xrepeat < 32 ? BobVal(weapon_sway * 4.) * 32 : BobVal(weapon_sway * 0.5) * 16); gun_pos -= fabs(p->GetActor()->spr.ScaleX() < 0.5 ? BobVal(weapon_sway * 4.) * 32 : BobVal(weapon_sway * 0.5) * 16);
gun_pos -= hard_landing; gun_pos -= hard_landing;
weapon_xoffset = (160)-90; weapon_xoffset = (160)-90;

View file

@ -137,7 +137,7 @@ void displayweapon_r(int snum, double interpfrac)
looking_arc = p->angle.looking_arc(interpfrac); looking_arc = p->angle.looking_arc(interpfrac);
hard_landing *= 8.; hard_landing *= 8.;
gun_pos -= fabs(p->GetActor()->spr.xrepeat < 8 ? BobVal(weapon_sway * 4.) * 32 : BobVal(weapon_sway * 0.5) * 16); gun_pos -= fabs(p->GetActor()->spr.ScaleX() < 0.125 ? BobVal(weapon_sway * 4.) * 32 : BobVal(weapon_sway * 0.5) * 16);
gun_pos -= hard_landing; gun_pos -= hard_landing;
weapon_xoffset = (160)-90; weapon_xoffset = (160)-90;
@ -289,7 +289,7 @@ void displayweapon_r(int snum, double interpfrac)
return; return;
} }
if (p->GetActor()->spr.xrepeat < 8) if (p->GetActor()->spr.ScaleX() < 0.125)
{ {
animateshrunken(p, weapon_xoffset, looking_arc, look_anghalf, FIST, shade, o, interpfrac); animateshrunken(p, weapon_xoffset, looking_arc, look_anghalf, FIST, shade, o, interpfrac);
} }

View file

@ -2562,7 +2562,7 @@ static void operateweapon(int snum, ESyncBits actions)
fi.shoot(pact, FREEZEBLAST); fi.shoot(pact, FREEZEBLAST);
checkavailweapon(p); checkavailweapon(p);
} }
if (pact->spr.xrepeat < 32) if (pact->spr.ScaleX() < 0.5)
{ {
p->okickback_pic = p->kickback_pic = 0; break; p->okickback_pic = p->kickback_pic = 0; break;
} }
@ -2660,7 +2660,7 @@ static void processweapon(int snum, ESyncBits actions)
{ {
auto p = &ps[snum]; auto p = &ps[snum];
auto pact = p->GetActor(); auto pact = p->GetActor();
int shrunk = (pact->spr.yrepeat < 32); int shrunk = (pact->spr.ScaleY() < 0.5);
if (isNamWW2GI() && (actions & SB_HOLSTER)) // 'Holster Weapon if (isNamWW2GI() && (actions & SB_HOLSTER)) // 'Holster Weapon
{ {
@ -2770,7 +2770,7 @@ void processinput_d(int snum)
psectlotag = psectp->lotag; psectlotag = psectp->lotag;
p->spritebridge = 0; p->spritebridge = 0;
shrunk = (pact->spr.yrepeat < 32); shrunk = (pact->spr.ScaleY() < 0.5);
getzrange(p->pos, psectp, &ceilingz, chz, &floorz, clz, 10.1875, CLIPMASK0); getzrange(p->pos, psectp, &ceilingz, chz, &floorz, clz, 10.1875, CLIPMASK0);
p->truefz = getflorzofslopeptr(psectp, p->pos); p->truefz = getflorzofslopeptr(psectp, p->pos);

View file

@ -3274,7 +3274,7 @@ static void processweapon(int snum, ESyncBits actions, sectortype* psectp)
{ {
auto p = &ps[snum]; auto p = &ps[snum];
auto pact = p->GetActor(); auto pact = p->GetActor();
int shrunk = (pact->spr.yrepeat < 8); int shrunk = (pact->spr.ScaleY() < 0.125);
if (p->detonate_count > 0) if (p->detonate_count > 0)
{ {
@ -3388,7 +3388,7 @@ void processinput_r(int snum)
p->spritebridge = 0; p->spritebridge = 0;
shrunk = (pact->spr.yrepeat < 8); shrunk = (pact->spr.ScaleY() < 0.125);
double tempfz; double tempfz;
if (pact->clipdist == 16) if (pact->clipdist == 16)
{ {
@ -3533,7 +3533,7 @@ void processinput_r(int snum)
return; return;
} }
if (p->GetActor()->spr.xrepeat < 8 && p->jetpack_on == 0) if (p->GetActor()->spr.ScaleX() < 0.125 && p->jetpack_on == 0)
{ {
p->ofistsign = p->fistsign; p->ofistsign = p->fistsign;
p->fistsign += p->GetActor()->vel.X * 16; p->fistsign += p->GetActor()->vel.X * 16;

View file

@ -146,7 +146,7 @@ void AISoul::Tick(RunListEvent* ev)
seq_MoveSequence(pActor, SeqOffsets[kSeqSet] + 75, 0); seq_MoveSequence(pActor, SeqOffsets[kSeqSet] + 75, 0);
if (pActor->spr.xrepeat < 32) if (pActor->spr.ScaleX() < 0.5)
{ {
pActor->spr.xrepeat++; pActor->spr.xrepeat++;
pActor->spr.yrepeat++; pActor->spr.yrepeat++;

View file

@ -873,7 +873,7 @@ int DoCoolgMove(DSWActor* actor)
{ {
actor->spr.xrepeat--; actor->spr.xrepeat--;
actor->spr.shade++; actor->spr.shade++;
if (actor->spr.xrepeat < 4) actor->spr.xrepeat = 4; if (actor->spr.ScaleX() < 0.0625) actor->spr.xrepeat = 4;
if (actor->spr.shade > 126) if (actor->spr.shade > 126)
{ {
actor->spr.shade = 127; actor->spr.shade = 127;

View file

@ -10919,7 +10919,7 @@ void SpawnMeteorExp(DSWActor* actor)
expActor->spr.hitag = LUMINOUS; //Always full brightness expActor->spr.hitag = LUMINOUS; //Always full brightness
expActor->spr.shade = -40; expActor->spr.shade = -40;
if (actor->spr.yrepeat < 64) if (actor->spr.ScaleY() < 1)
{ {
// small // small
expActor->spr.SetScale(1, 1); expActor->spr.SetScale(1, 1);
@ -18364,7 +18364,7 @@ int DoFloorBlood(DSWActor* actor)
int DoWallBlood(DSWActor* actor) int DoWallBlood(DSWActor* actor)
{ {
// Make blood drip down the wall // Make blood drip down the wall
if (actor->spr.yrepeat < 80) if (actor->spr.ScaleY() < 1.25)
{ {
actor->spr.yrepeat++; actor->spr.yrepeat++;
actor->spr.pos.Z += 0.5; actor->spr.pos.Z += 0.5;