- added a SetScale method to spritetype and used it for all places setting x/yrepeat to 0.

This commit is contained in:
Christoph Oelckers 2022-10-05 18:55:33 +02:00
parent 35fbc634de
commit c7c3b2a20c
15 changed files with 73 additions and 64 deletions

View file

@ -473,6 +473,12 @@ struct spritetypebase
{
pos = { x * maptoworld, y * maptoworld, z * zmaptoworld };
}
void SetScale(double x, double y)
{
xrepeat = uint8_t(x * (1 / REPEAT_SCALE));
yrepeat = uint8_t(y * (1 / REPEAT_SCALE));
}
};

View file

@ -2304,7 +2304,8 @@ bool genDudePrepare(DBloodActor* actor, int propId)
case kGenDudePropertyMass: {
// to ensure mass gets updated, let's clear all cache
SPRITEMASS* pMass = &actor->spriteMass;
pMass->seqId = pMass->picnum = pMass->xrepeat = pMass->yrepeat = 0;
pMass->seqId = pMass->picnum = 0;
pMass->xrepeat = pMass->yrepeat = 0;
pMass->clipDist = 0;
pMass->mass = pMass->airVel = pMass->fraction = 0;
getSpriteMassBySize(actor);

View file

@ -719,7 +719,7 @@ void viewProcessSprites(tspriteArray& tsprites, const DVector3& cPos, DAngle cA,
}
else
{
pTSprite->xrepeat = pTSprite->yrepeat = 0;
pTSprite->SetScale(0, 0);
}
}
if (owneractor->hasX() && owneractor->xspr.burnTime > 0)

View file

@ -254,7 +254,7 @@ void insertspriteq(DDukeActor* const actor)
spriteq[spriteqloc] = actor;
spriteqloc = (spriteqloc + 1) % spriteqamount;
}
else actor->spr.xrepeat = actor->spr.yrepeat = 0;
else actor->spr.SetScale(0, 0);
}
//---------------------------------------------------------------------------
@ -4352,7 +4352,7 @@ void handle_se24(DDukeActor *actor, bool scroll, double mult)
case STAT_DEFAULT:
if (actorflag(a2, SFLAG_SE24_REMOVE))
{
a2->spr.xrepeat = a2->spr.yrepeat = 0;
a2->spr.SetScale(0, 0);
continue;
}

View file

@ -840,7 +840,7 @@ static void movetripbomb(DDukeActor *actor)
while (auto a1 = it.Next())
{
if (a1->spr.picnum == LASERLINE && actor->spr.hitag == a1->spr.hitag)
a1->spr.xrepeat = a1->spr.yrepeat = 0;
a1->spr.SetScale(0, 0);
}
deletesprite(actor);
}
@ -1092,7 +1092,7 @@ CLEAR_THE_BOLT2:
actor->temp_data[0] = actor->spr.xrepeat;
actor->temp_data[1] = actor->spr.yrepeat;
actor->temp_data[2] = global_random & 4;
actor->spr.xrepeat = actor->spr.yrepeat = 0;
actor->spr.SetScale(0, 0);
goto CLEAR_THE_BOLT2;
}
actor->spr.picnum++;
@ -1138,7 +1138,7 @@ CLEAR_THE_BOLT:
actor->temp_data[0] = actor->spr.xrepeat;
actor->temp_data[1] = actor->spr.yrepeat;
actor->temp_data[2] = global_random & 4;
actor->spr.xrepeat = actor->spr.yrepeat = 0;
actor->spr.SetScale(0, 0);
goto CLEAR_THE_BOLT;
}
actor->spr.picnum++;

View file

@ -777,7 +777,7 @@ CLEAR_THE_BOLT:
actor->temp_data[0] = actor->spr.xrepeat;
actor->temp_data[1] = actor->spr.yrepeat;
actor->temp_data[2] = global_random & 4;
actor->spr.xrepeat = actor->spr.yrepeat = 0;
actor->spr.SetScale(0, 0);
goto CLEAR_THE_BOLT;
}
actor->spr.picnum++;

View file

@ -63,7 +63,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
case DEVELOPERCOMMENTARY:
case DEVELOPERCOMMENTARY + 1:
if (isWorldTour() && !wt_commentary)
t->xrepeat = t->yrepeat = 0;
t->SetScale(0, 0);
break;
case BLOODPOOL:
case PUKE:
@ -77,7 +77,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
case RESPAWNMARKERYELLOW:
case RESPAWNMARKERGREEN:
if (ud.marker == 0)
t->xrepeat = t->yrepeat = 0;
t->SetScale(0, 0);
continue;
case CHAIR3:
if (hw_models && modelManager.CheckModel(t->picnum, t->pal))
@ -154,7 +154,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
t->cstat |= CSTAT_SPRITE_YCENTER;
}
else
t->xrepeat = t->yrepeat = 0;
t->SetScale(0, 0);
break;
case NATURALLIGHTNING:
t->shade = -127;
@ -211,7 +211,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
double dist1 = (OwnerAc->spr.pos.XY() - t->pos.XY()).LengthSquared();
double dist2 = (OwnerAc->spr.pos.XY() - ps[screenpeek].GetActor()->spr.pos.XY()).LengthSquared();
if (dist1 < dist2)
t->xrepeat = t->yrepeat = 0;
t->SetScale(0, 0);
}
}
continue;
@ -409,7 +409,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
if (ud.multimode < 2 || (ud.multimode > 1 && p == screenpeek))
{
t->ownerActor = nullptr;
t->xrepeat = t->yrepeat = 0;
t->SetScale(0, 0);
continue;
}
@ -730,7 +730,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
h->dispicnum = t->picnum;
if (t->sectp->floorpicnum == MIRROR)
t->xrepeat = t->yrepeat = 0;
t->SetScale(0, 0);
}
}

View file

@ -138,7 +138,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
t->cstat |= CSTAT_SPRITE_YCENTER;
}
else
t->xrepeat = t->yrepeat = 0;
t->SetScale(0, 0);
break;
default:
break;
@ -175,7 +175,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
else
t->pal = 2;
if (ud.marker == 0)
t->xrepeat = t->yrepeat = 0;
t->SetScale(0, 0);
break;
case DUKELYINGDEAD:
h->spr.xrepeat = 24;
@ -206,7 +206,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
double dist1 = (OwnerAc->spr.pos.XY() - t->pos.XY()).LengthSquared();
double dist2 = (OwnerAc->spr.pos.XY() - ps[screenpeek].GetActor()->spr.pos.XY()).LengthSquared();
if (dist1 < dist2)
t->xrepeat = t->yrepeat = 0;
t->SetScale(0, 0);
}
}
continue;
@ -453,7 +453,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
if (ud.multimode < 2 || (ud.multimode > 1 && p == screenpeek))
{
t->ownerActor = nullptr;
t->xrepeat = t->yrepeat = 0;
t->SetScale(0, 0);
continue;
}
@ -695,7 +695,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
if (t->picnum < 0 || t->picnum >= MAXTILES)
{
t->picnum = 0;
t->xrepeat = t->yrepeat = 0;
t->SetScale(0, 0);
}
if (h->dispicnum >= 0)
@ -958,7 +958,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
h->dispicnum = t->picnum;
if (t->sectp->floorpicnum == MIRROR)
t->xrepeat = t->yrepeat = 0;
t->SetScale(0, 0);
}
}
END_DUKE_NS

View file

@ -445,7 +445,7 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
fi.checkhitsprite(hit.actor(), spark);
if (hit.actor()->isPlayer() && (ud.coop != 1 || ud.ffire == 1))
{
spark->spr.xrepeat = spark->spr.yrepeat = 0;
spark->spr.SetScale(0, 0);
auto jib = spawn(spark, JIBS6);
if (jib)
{
@ -549,7 +549,7 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
fi.checkhitsprite(hit.actor(), spark);
if (!hit.actor()->isPlayer())
spawn(spark, SMALLSMOKE);
else spark->spr.xrepeat = spark->spr.yrepeat = 0;
else spark->spr.SetScale(0, 0);
}
else if (hit.hitWall)
fi.checkhitwall(spark, hit.hitWall, hit.hitpos, SHOTSPARK1);

View file

@ -331,7 +331,7 @@ static void shootweapon(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int
if (hit.actor()->isPlayer() && (ud.coop != 1 || ud.ffire == 1))
{
auto jib = spawn(spark, JIBS6);
spark->spr.xrepeat = spark->spr.yrepeat = 0;
spark->spr.SetScale(0, 0);
if (jib)
{
jib->spr.pos.Z += 4;
@ -437,7 +437,7 @@ static void shootweapon(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int
fi.checkhitsprite(hit.actor(), spark);
if (!hit.actor()->isPlayer())
spawn(spark, SMALLSMOKE);
else spark->spr.xrepeat = spark->spr.yrepeat = 0;
else spark->spr.SetScale(0, 0);
}
else if (hit.hitWall != nullptr)
fi.checkhitwall(spark, hit.hitWall, hit.hitpos, SHOTSPARK1);

View file

@ -151,7 +151,7 @@ bool initspriteforspawn(DDukeActor* act)
{
if ((ud.multimode < 2) || (ud.multimode > 1 && ud.coop == 1))
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
act->spr.cstat = 0;
act->spr.lotag = act->spr.hitag = 0;
return false;
@ -226,7 +226,7 @@ void spawninitdefault(DDukeActor* actj, DDukeActor *act)
if (actj == nullptr && act->spr.lotag > ud.player_skill)
{
// make it go away...
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
return;
}
@ -239,7 +239,7 @@ void spawninitdefault(DDukeActor* actj, DDukeActor *act)
{
if (ud.monsters_off == 1)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
return;
}
@ -328,7 +328,9 @@ int spawnbloodpoolpart1(DDukeActor* act)
if (!away)
{
act->spr.xrepeat = act->spr.yrepeat = 0; ChangeActorStat(act, STAT_MISC); return true;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
return true;
}
if (act->sector()->lotag == 1)
@ -353,7 +355,7 @@ void initfootprint(DDukeActor* actj, DDukeActor* act)
bool away = isAwayFromWall(act, 5.25);
if (!away)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
return;
}
@ -511,7 +513,7 @@ int initreactor(DDukeActor* actj, DDukeActor* actor, bool isrecon)
{
if (actor->spr.lotag > ud.player_skill)
{
actor->spr.xrepeat = actor->spr.yrepeat = 0;
actor->spr.SetScale(0, 0);
ChangeActorStat(actor, STAT_MISC);
return true;
}
@ -520,7 +522,7 @@ int initreactor(DDukeActor* actj, DDukeActor* actor, bool isrecon)
actor->temp_data[5] = 0;
if (ud.monsters_off == 1)
{
actor->spr.xrepeat = actor->spr.yrepeat = 0;
actor->spr.SetScale(0, 0);
ChangeActorStat(actor, STAT_MISC);
return false;
}
@ -533,7 +535,7 @@ int initreactor(DDukeActor* actj, DDukeActor* actor, bool isrecon)
if (ud.multimode < 2 && actor->spr.pal != 0)
{
actor->spr.xrepeat = actor->spr.yrepeat = 0;
actor->spr.SetScale(0, 0);
ChangeActorStat(actor, STAT_MISC);
return false;
}
@ -557,7 +559,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
actor->spr.yint = sectp->extra;
actor->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
actor->spr.xrepeat = actor->spr.yrepeat = 0;
actor->spr.SetScale(0, 0);
switch (actor->spr.lotag)
{

View file

@ -85,7 +85,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if ((act->spr.lotag > ud.player_skill) || ud.monsters_off)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -142,7 +142,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
spawninitdefault(actj, act);
break;
case FOF:
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
case WATERSPLASH2:
@ -225,7 +225,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.yrepeat = actj->spr.yrepeat;
act->temp_data[1] = actj->spr.picnum;
}
else act->spr.xrepeat = act->spr.yrepeat = 0;
else act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
@ -323,7 +323,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case TRIPBOMB:
if (act->spr.lotag > ud.player_skill)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -432,7 +432,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case SIGN2:
if (ud.multimode < 2 && act->spr.pal)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
}
else act->spr.pal = 0;
@ -580,7 +580,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case MUSICANDSFX:
if (ud.multimode < 2 && act->spr.pal == 1)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -665,7 +665,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case APLAYER:
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
int j = ud.coop;
if (j == 2) j = 0;
@ -723,7 +723,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{
if (act->spr.pal && ud.multimode > 1)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -733,7 +733,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|| (act->spr.pal == 2 && (ud.multimode == 1 || (ud.multimode > 1 && ud.coop != 1))) // Co-op Only
|| (act->spr.pal == 3 && (ud.multimode == 1 || (ud.multimode > 1 && ud.coop == 1)))) // Dukematch Only
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -864,7 +864,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if ((act->spr.lotag > ud.player_skill) || ud.monsters_off == 1)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -1011,7 +1011,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if ((ud.multimode < 2 && act->spr.pal != 0) || (act->spr.lotag > ud.player_skill))
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -1026,7 +1026,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (ud.multimode > 1 && ud.coop != 1 && act->spr.picnum == ACCESSCARD)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -1091,7 +1091,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (ud.multimode < 2 && act->spr.pal != 0)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -1127,7 +1127,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (act->spr.xrepeat <= 8)
{
act->spr.cstat = CSTAT_SPRITE_INVISIBLE;
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
}
else act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->spr.extra = gs.impact_damage << 2;
@ -1153,7 +1153,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (ud.multimode < 2 && act->spr.pal != 0)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -1199,7 +1199,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case EGG:
if (ud.monsters_off == 1 && act->spr.picnum == EGG)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
}
else

View file

@ -304,7 +304,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
else
act->temp_data[1] = actj->spr.picnum;
}
else act->spr.xrepeat = act->spr.yrepeat = 0;
else act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
@ -596,7 +596,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case MUSICANDSFX:
if (ud.multimode < 2 && act->spr.pal == 1)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -670,7 +670,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case APLAYER:
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
int j = ud.coop;
if (j == 2) j = 0;
@ -718,7 +718,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
sectp->setfloorz(act->spr.pos.Z);
if (act->spr.pal && ud.multimode > 1)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -1024,7 +1024,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if ((act->spr.lotag > ud.player_skill) || ud.monsters_off == 1)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -1173,7 +1173,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if ((ud.multimode < 2 && act->spr.pal != 0) || (act->spr.lotag > ud.player_skill))
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -1188,7 +1188,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (ud.multimode > 1 && ud.coop != 1 && act->spr.picnum == ACCESSCARD)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -1343,7 +1343,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (ud.multimode < 2 && act->spr.pal != 0)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -1376,7 +1376,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (act->spr.xrepeat <= 8)
{
act->spr.cstat = CSTAT_SPRITE_INVISIBLE;
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
}
else act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->spr.extra = gs.impact_damage << 2;
@ -1392,7 +1392,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.extra = 1;
if (ud.multimode < 2 && act->spr.pal != 0)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
break;
}
@ -1408,7 +1408,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (!isRRRA()) goto default_case;
if (ud.multimode < 2 && act->spr.pal == 1)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
break;
}
act->spr.pal = 0;
@ -1424,7 +1424,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (!isRRRA()) goto default_case;
if (ud.multimode < 2 && act->spr.pal == 1)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
break;
}
act->spr.pal = 0;
@ -1470,7 +1470,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case EGG:
if (ud.monsters_off == 1 && act->spr.picnum == EGG)
{
act->spr.xrepeat = act->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
ChangeActorStat(act, STAT_MISC);
}
else

View file

@ -2640,7 +2640,7 @@ void SpriteSetup(void)
SpawnUser(actor, ST1, nullptr);
if (actor->spr.xrepeat == 64 && actor->spr.yrepeat == 64) // clear default xrepeat.
actor->spr.xrepeat = actor->spr.yrepeat = 0;
actor->spr.SetScale(0, 0);
change_actor_stat(actor, STAT_SPAWN_SPOT);
break;

View file

@ -4134,7 +4134,7 @@ int SpawnBlood(DSWActor* actor, DSWActor* weapActor, DAngle hit_angle, const DVe
// Don't do central blood splats for every hitscan
if (RANDOM_P2(1024) < 950)
{
actorNew->spr.xrepeat = actorNew->spr.yrepeat = 0;
actorNew->spr.SetScale(0, 0);
}
if (RANDOM_P2(1024) < 512)
actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP);