- more quick replacements

This commit is contained in:
Christoph Oelckers 2022-09-03 10:05:20 +02:00
parent 3e76d49b6e
commit eed7f0806c
16 changed files with 44 additions and 45 deletions

View file

@ -6934,7 +6934,7 @@ void FireballSeqCallback(int, DBloodActor* actor)
auto pFX = gFX.fxSpawnActor(FX_11, actor->sector(), actor->spr.pos, 0);
if (pFX)
{
pFX->set_int_bvel(actor->int_vel());
pFX->vel = actor->vel;
}
}
@ -6943,7 +6943,7 @@ void NapalmSeqCallback(int, DBloodActor* actor)
auto pFX = gFX.fxSpawnActor(FX_12, actor->sector(), actor->spr.pos, 0);
if (pFX)
{
pFX->set_int_bvel(actor->int_vel());
pFX->vel = actor->vel;
}
}
@ -6952,7 +6952,7 @@ void Fx32Callback(int, DBloodActor* actor)
auto pFX = gFX.fxSpawnActor(FX_32, actor->sector(), actor->spr.pos, 0);
if (pFX)
{
pFX->set_int_bvel(actor->int_vel());
pFX->vel = actor->vel;
}
}
@ -6961,7 +6961,7 @@ void Fx33Callback(int, DBloodActor* actor)
auto pFX = gFX.fxSpawnActor(FX_33, actor->sector(), actor->spr.pos, 0);
if (pFX)
{
pFX->set_int_bvel(actor->int_vel());
pFX->vel = actor->vel;
}
}

View file

@ -496,7 +496,7 @@ void moveplayers(void)
if (act->spr.extra < 8)
{
act->set_int_xvel(128);
act->vel.X = 8;
act->spr.angle = p->angle.ang;
act->spr.extra++;
ssp(act, CLIPMASK0);
@ -654,7 +654,7 @@ void movecrane(DDukeActor *actor, int crane)
if (actor->int_xvel() < 184)
{
actor->spr.picnum = crane + 1;
actor->add_int_xvel( 8);
actor->vel.X += 0.5;
}
//IFMOVING; // JBF 20040825: see my rant above about this
ssp(actor, CLIPMASK0);
@ -749,7 +749,7 @@ void movecrane(DDukeActor *actor, int crane)
else if (actor->temp_data[0] == 6)
{
if (actor->int_xvel() < 192)
actor->add_int_xvel( 8);
actor->vel.X += 0.5;
actor->spr.angle = VecToAngle(cpt.pos.XY() - actor->spr.pos.XY());
ssp(actor, CLIPMASK0);
if (((actor->spr.pos.X - cpt.pos.X) * (actor->spr.pos.X - cpt.pos.X) + (actor->spr.pos.Y - cpt.pos.Y) * (actor->spr.pos.Y - cpt.pos.Y)) < (8 * 8))
@ -1530,7 +1530,7 @@ bool queball(DDukeActor *actor, int pocket, int queball, int stripeball)
if (x < 512 && actor->sector() == ps[p].cursector)
{
actor->spr.angle = VecToAngle(actor->spr.pos.XY() - ps[p].pos.XY());
actor->set_int_xvel(48);
actor->vel.X = 3;
}
}
return true;
@ -1638,7 +1638,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
if ((actor->temp_data[2] & 3) == 0) spawn(actor, explosion);
getglobalz(actor);
actor->add_int_ang(96);
actor->set_int_xvel(128);
actor->vel.X = 8;
int j = ssp(actor, CLIPMASK0);
if (j != 1 || actor->spr.pos.Z > actor->floorz)
{
@ -1686,7 +1686,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
else if (actor->temp_data[0] == 2 || actor->temp_data[0] == 3)
{
actor->temp_data[3] = 0;
if(actor->vel.X > 0) actor->add_int_xvel(-16);
if(actor->vel.X > 0) actor->vel.X -= 1;
else actor->vel.X = 0;
if (actor->temp_data[0] == 2)
@ -1733,7 +1733,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
if (l > 1524) { if (actor->int_xvel() < 256) actor->add_int_xvel( 32); }
else
{
if(actor->vel.X > 0) actor->add_int_xvel(-16);
if(actor->vel.X > 0) actor->vel.X -= 1;
else actor->vel.X = 0;
}
}
@ -2957,7 +2957,7 @@ void handle_se30(DDukeActor *actor, int JIBS6)
if (actor->int_xvel() == 0)
operateactivators(actor->spr.hitag + (!actor->temp_data[3]), -1);
if (actor->int_xvel() < 256)
actor->add_int_xvel( 16);
actor->vel.X += 1;
}
}
if (actor->temp_data[4] == 2)
@ -2968,7 +2968,7 @@ void handle_se30(DDukeActor *actor, int JIBS6)
actor->vel.X = 0;
if(actor->vel.X > 0)
actor->add_int_xvel(-16);
actor->vel.X -= 1;
else
{
actor->vel.X = 0;
@ -3708,7 +3708,7 @@ void handle_se15(DDukeActor* actor)
{
if (actor->temp_data[4])
{
actor->set_int_xvel(16);
actor->vel.X = 1;
if (actor->temp_data[4] == 1) //Opening
{
@ -4237,7 +4237,7 @@ void handle_se26(DDukeActor* actor)
auto sc = actor->sector();
double zvel = actor->vel.Z;
actor->set_int_xvel(32);
actor->vel.X = 2;
DVector2 vect = 2 * actor->spr.angle.ToVector(); // was: (32 * bsin) >> 14
actor->spr.shade++;
@ -4786,14 +4786,14 @@ void getglobalz(DDukeActor* actor)
if( actor->spr.statnum != STAT_PROJECTILE)
{
actor->spr.cstat2 |= CSTAT2_SPRITE_NOSHADOW; // No shadows on actors
actor->set_int_xvel(-256);
actor->vel.X = -16;
ssp(actor, CLIPMASK0);
}
}
else if(lz.actor()->isPlayer() && badguy(actor) )
{
actor->spr.cstat2 |= CSTAT2_SPRITE_NOSHADOW; // No shadows on actors
actor->set_int_xvel(-256);
actor->vel.X = -16;
ssp(actor, CLIPMASK0);
}
else if(actor->spr.statnum == STAT_PROJECTILE && lz.actor()->isPlayer() && actor->GetOwner() == actor)

View file

@ -757,7 +757,7 @@ void movefallers_d(void)
{
if (act->int_xvel() > 0)
{
act->add_int_xvel(-8);
act->vel.X -= 0.5;
ssp(act, CLIPMASK0);
}
@ -2372,7 +2372,7 @@ static void greenslime(DDukeActor *actor)
}
else
{
if (actor->int_xvel() < 32) actor->add_int_xvel( 4);
if (actor->int_xvel() < 32) actor->vel.X += 0.25;
actor->set_int_xvel(64 - bcos(actor->temp_data[1], -9));
actor->add_int_ang(getincangle(actor->int_ang(),

View file

@ -2583,7 +2583,7 @@ static int henstand(DDukeActor *actor)
deletesprite(hitact);
if (ns)
{
ns->set_int_xvel(32);
ns->vel.X = 2;
ns->spr.lotag = 40;
ns->spr.angle = actor->spr.angle;
}

View file

@ -297,7 +297,7 @@ static void shootknee(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
{
splash->spr.pos.XY() = hit.hitpos.XY();
splash->spr.angle = ps[p].angle.ang; // Total tweek
splash->set_int_xvel(32);
splash->vel.X = 2;
ssp(actor, CLIPMASK0);
splash->vel.X = 0;
}
@ -442,7 +442,7 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa
if (jib)
{
jib->spr.pos.Z += 4;
jib->set_int_xvel(16);
jib->vel.X = 1;
jib->spr.xrepeat = jib->spr.yrepeat = 24;
jib->add_int_ang(64 - (krand() & 127));
}

View file

@ -187,7 +187,7 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
{
splash->spr.pos.XY() = hit.hitpos.XY();
splash->spr.angle = ps[p].angle.ang; // Total tweek
splash->set_int_xvel(32);
splash->vel.X = 2;
ssp(actor, 0);
splash->vel.X = 0;
}
@ -335,7 +335,7 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
if (l)
{
l->spr.pos.Z += 4;
l->set_int_xvel(16);
l->vel.X = 1;
l->spr.xrepeat = l->spr.yrepeat = 24;
l->add_int_ang(64 - (krand() & 127));
}
@ -891,7 +891,7 @@ void shoot_r(DDukeActor* actor, int atwith)
auto j = spawn(actor, atwith);
if (j)
{
j->set_int_xvel(32);
j->vel.X = 2;
j->spr.angle = actor->spr.angle;
j->spr.pos.Z -= 5;
}

View file

@ -1367,7 +1367,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
if (proj->spr.pal == 6)
spawned->spr.pal = 6;
spawned->spr.pos.Z += 4;
spawned->set_int_xvel(16);
spawned->vel.X = 1;
spawned->spr.xrepeat = spawned->spr.yrepeat = 24;
spawned->add_int_ang(32 - (krand() & 63));
}

View file

@ -2332,7 +2332,7 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
if (proj->spr.pal == 6)
spawned->spr.pal = 6;
spawned->spr.pos.Z += 4;
spawned->set_int_xvel(16);
spawned->vel.X = 1;
spawned->spr.xrepeat = spawned->spr.yrepeat = 24;
spawned->add_int_ang(32 - (krand() & 63));
}

View file

@ -328,7 +328,7 @@ void spawntransporter(DDukeActor *actj, DDukeActor* act, bool beam)
act->spr.cstat = CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_TRANSLUCENT;
act->spr.angle = actj->spr.angle;
act->set_int_xvel(128);
act->vel.X = 8;
ChangeActorStat(act, STAT_MISC);
ssp(act, CLIPMASK0);
SetActor(act, act->spr.pos);
@ -1005,7 +1005,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
{
actor->temp_pos.XY() = actor->spr.pos.XY();
if (actor->spr.shade == sectp->floorshade) //UP
actor->set_int_zvel(-256);
actor->vel.Z = -1;
else
actor->vel.Z = 1;

View file

@ -336,7 +336,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ud.bomb_tag = (ud.bomb_tag + 1) & 32767;
act->spr.hitag = ud.bomb_tag;
act->set_int_xvel(16);
act->vel.X = 1;
ssp(act, CLIPMASK0);
act->temp_data[0] = 17;
act->temp_data[2] = 0;

View file

@ -487,7 +487,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.clipdist = 8;
act->spr.xrepeat = 32;
act->spr.yrepeat = 26;
act->set_int_xvel(32);
act->vel.X = 2;
ChangeActorStat(act, 1);
break;
case RRTILE3120:
@ -495,7 +495,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.clipdist = 8;
act->spr.xrepeat = 12;
act->spr.yrepeat = 10;
act->set_int_xvel(32);
act->vel.X = 2;
ChangeActorStat(act, 1);
break;
case RRTILE3122:
@ -503,7 +503,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.clipdist = 2;
act->spr.xrepeat = 8;
act->spr.yrepeat = 6;
act->set_int_xvel(16);
act->vel.X = 1;
ChangeActorStat(act, 1);
break;
case RRTILE3123:
@ -511,7 +511,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.clipdist = 8;
act->spr.xrepeat = 13;
act->spr.yrepeat = 13;
act->set_int_xvel(16);
act->vel.X = 1;
ChangeActorStat(act, 1);
break;
case RRTILE3124:
@ -519,7 +519,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.clipdist = 8;
act->spr.xrepeat = 17;
act->spr.yrepeat = 12;
act->set_int_xvel(32);
act->vel.X = 2;
ChangeActorStat(act, 1);
break;
case RRTILE3132:
@ -1277,7 +1277,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.xrepeat = 11;
act->spr.yrepeat = 11;
act->spr.yint = 4;
act->set_int_xvel(32);
act->vel.X = 2;
break;
case RPGSPRITE:
act->spr.xrepeat = 16;

View file

@ -198,12 +198,12 @@ void IdleFish(DExhumedActor* pActor, int edx)
if (!edx)
{
if (RandomBit()) {
pActor->set_int_zvel(-pActor->int_zvel());
pActor->vel.Z = -pActor->vel.Z;
}
}
else if (edx < 0)
{
pActor->set_int_zvel(-pActor->int_zvel());
pActor->vel.Z = -pActor->vel.Z;
}
}

View file

@ -1381,7 +1381,7 @@ void AICreatureChunk::Tick(RunListEvent* ev)
{
pActor->vel.X *= 0.5;
pActor->vel.Y *= 0.5;
pActor->set_int_zvel(-pActor->int_zvel());
pActor->vel.Z = -pActor->vel.Z;
return;
}
else if (nVal.type == kHitSprite)

View file

@ -241,14 +241,14 @@ void AIMummy::Tick(RunListEvent* ev)
if (pActor->vel.Y > 0)
{
pActor->add_int_yvel(-1024);
pActor->vel.Y -= 64;
if (pActor->vel.Y < 0) {
pActor->vel.Y = 0;
}
}
else if (pActor->vel.Y < 0)
{
pActor->add_int_yvel(1024);
pActor->vel.Y += 64;
if (pActor->vel.Y > 0) {
pActor->vel.Y = 0;
}

View file

@ -1896,8 +1896,7 @@ void AIObject::Tick(RunListEvent* ev)
if (nMov.exbits & kHitAux2)
{
pActor->add_int_xvel(-pActor->int_xvel() >> 3);
pActor->add_int_yvel(-pActor->int_yvel() >> 3);
pActor->vel.XY() *= 0.875;
}
if (nMov.type == kHitSprite)

View file

@ -9290,7 +9290,7 @@ int SpawnExtraMicroMini(DSWActor* actor)
actorNew->spr.cstat = actor->spr.cstat;
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + RandomRange(64) - 32));
actorNew->set_int_zvel(actor->int_zvel());
actorNew->vel.Z = -actor->vel.Z;
actorNew->add_int_zvel( RandomRange(Z(16)) - Z(8));
UpdateChange(actorNew);
@ -9318,7 +9318,7 @@ int DoMicro(DSWActor* actor)
actorNew->spr.xrepeat = 20;
actorNew->spr.yrepeat = 20;
actorNew->opos = actor->opos;
actorNew->set_int_zvel(actor->int_zvel());
actorNew->vel.Z = -actor->vel.Z;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);