mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- this concludes all trivial int_zvel replacements.
This commit is contained in:
parent
a98e37b345
commit
a006482c07
10 changed files with 27 additions and 27 deletions
|
@ -490,7 +490,7 @@ void moveplayers(void)
|
||||||
act->spr.yrepeat = 36;
|
act->spr.yrepeat = 36;
|
||||||
if (act->sector()->lotag != ST_2_UNDERWATER)
|
if (act->sector()->lotag != ST_2_UNDERWATER)
|
||||||
makeitfall(act);
|
makeitfall(act);
|
||||||
if (act->int_zvel() == 0 && act->sector()->lotag == ST_1_ABOVE_WATER)
|
if (act->float_zvel() == 0 && act->sector()->lotag == ST_1_ABOVE_WATER)
|
||||||
act->spr.pos.Z += 32;
|
act->spr.pos.Z += 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1031,7 +1031,7 @@ void movewaterdrip(DDukeActor *actor, int drip)
|
||||||
ssp(actor, CLIPMASK0);
|
ssp(actor, CLIPMASK0);
|
||||||
if (actor->spr.xvel > 0) actor->spr.xvel -= 2;
|
if (actor->spr.xvel > 0) actor->spr.xvel -= 2;
|
||||||
|
|
||||||
if (actor->int_zvel() == 0)
|
if (actor->float_zvel() == 0)
|
||||||
{
|
{
|
||||||
actor->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
actor->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||||
|
|
||||||
|
@ -3926,7 +3926,7 @@ void handle_se18(DDukeActor *actor, bool morecheck)
|
||||||
{
|
{
|
||||||
if (ps[a2->PlayerIndex()].on_ground == 1) ps[a2->PlayerIndex()].pos.Z += extra;
|
if (ps[a2->PlayerIndex()].on_ground == 1) ps[a2->PlayerIndex()].pos.Z += extra;
|
||||||
}
|
}
|
||||||
if (a2->int_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE)
|
if (a2->float_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE)
|
||||||
{
|
{
|
||||||
a2->spr.pos.Z += extra;
|
a2->spr.pos.Z += extra;
|
||||||
a2->floorz = sc->floorz;
|
a2->floorz = sc->floorz;
|
||||||
|
@ -3965,7 +3965,7 @@ void handle_se18(DDukeActor *actor, bool morecheck)
|
||||||
{
|
{
|
||||||
if (ps[a2->PlayerIndex()].on_ground == 1) ps[a2->PlayerIndex()].pos.Z -= extra;
|
if (ps[a2->PlayerIndex()].on_ground == 1) ps[a2->PlayerIndex()].pos.Z -= extra;
|
||||||
}
|
}
|
||||||
if (a2->int_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE)
|
if (a2->float_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE)
|
||||||
{
|
{
|
||||||
a2->spr.pos.Z -= extra;
|
a2->spr.pos.Z -= extra;
|
||||||
a2->floorz = sc->floorz;
|
a2->floorz = sc->floorz;
|
||||||
|
@ -4136,7 +4136,7 @@ void handle_se20(DDukeActor* actor)
|
||||||
DukeSectIterator it(actor->sector());
|
DukeSectIterator it(actor->sector());
|
||||||
while (auto a2 = it.Next())
|
while (auto a2 = it.Next())
|
||||||
{
|
{
|
||||||
if (a2->spr.statnum != 3 && a2->int_zvel() == 0)
|
if (a2->spr.statnum != 3 && a2->float_zvel() == 0)
|
||||||
{
|
{
|
||||||
a2->add_int_pos({ x, l, 0 });
|
a2->add_int_pos({ x, l, 0 });
|
||||||
if (a2->sector()->floorstat & CSTAT_SECTOR_SLOPE)
|
if (a2->sector()->floorstat & CSTAT_SECTOR_SLOPE)
|
||||||
|
@ -4657,7 +4657,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
|
||||||
if (a2->isPlayer() && a2->GetOwner())
|
if (a2->isPlayer() && a2->GetOwner())
|
||||||
if (ps[a2->PlayerIndex()].on_ground == 1)
|
if (ps[a2->PlayerIndex()].on_ground == 1)
|
||||||
ps[a2->PlayerIndex()].player_add_int_z(l);
|
ps[a2->PlayerIndex()].player_add_int_z(l);
|
||||||
if (a2->int_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
|
if (a2->float_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
|
||||||
{
|
{
|
||||||
a2->add_int_z(l);
|
a2->add_int_z(l);
|
||||||
a2->floorz = sec->floorz;
|
a2->floorz = sec->floorz;
|
||||||
|
@ -4686,7 +4686,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
|
||||||
if (a2->isPlayer() && a2->GetOwner())
|
if (a2->isPlayer() && a2->GetOwner())
|
||||||
if (ps[a2->PlayerIndex()].on_ground == 1)
|
if (ps[a2->PlayerIndex()].on_ground == 1)
|
||||||
ps[a2->PlayerIndex()].player_add_int_z(l);
|
ps[a2->PlayerIndex()].player_add_int_z(l);
|
||||||
if (a2->int_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
|
if (a2->float_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
|
||||||
{
|
{
|
||||||
a2->add_int_z(l);
|
a2->add_int_z(l);
|
||||||
a2->floorz = sec->floorz;
|
a2->floorz = sec->floorz;
|
||||||
|
@ -4717,7 +4717,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
|
||||||
if (a2->isPlayer() && a2->GetOwner())
|
if (a2->isPlayer() && a2->GetOwner())
|
||||||
if (ps[a2->PlayerIndex()].on_ground == 1)
|
if (ps[a2->PlayerIndex()].on_ground == 1)
|
||||||
ps[a2->PlayerIndex()].player_add_int_z(l);
|
ps[a2->PlayerIndex()].player_add_int_z(l);
|
||||||
if (a2->int_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
|
if (a2->float_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
|
||||||
{
|
{
|
||||||
a2->add_int_z(l);
|
a2->add_int_z(l);
|
||||||
a2->floorz = sec->floorz;
|
a2->floorz = sec->floorz;
|
||||||
|
@ -4745,7 +4745,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
|
||||||
if (a2->isPlayer() && a2->GetOwner())
|
if (a2->isPlayer() && a2->GetOwner())
|
||||||
if (ps[a2->PlayerIndex()].on_ground == 1)
|
if (ps[a2->PlayerIndex()].on_ground == 1)
|
||||||
ps[a2->PlayerIndex()].player_add_int_z(-l);
|
ps[a2->PlayerIndex()].player_add_int_z(-l);
|
||||||
if (a2->int_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
|
if (a2->float_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
|
||||||
{
|
{
|
||||||
a2->add_int_z(-l);
|
a2->add_int_z(-l);
|
||||||
a2->floorz = sec->floorz;
|
a2->floorz = sec->floorz;
|
||||||
|
|
|
@ -473,7 +473,7 @@ int movesprite_ex_d(DDukeActor* actor, int xchange, int ychange, int zchange, un
|
||||||
((actor->actorstayput != nullptr && actor->actorstayput != dasectp) ||
|
((actor->actorstayput != nullptr && actor->actorstayput != dasectp) ||
|
||||||
((actor->spr.picnum == BOSS2) && actor->spr.pal == 0 && dasectp->lotag != 3) ||
|
((actor->spr.picnum == BOSS2) && actor->spr.pal == 0 && dasectp->lotag != 3) ||
|
||||||
((actor->spr.picnum == BOSS1 || actor->spr.picnum == BOSS2) && dasectp->lotag == ST_1_ABOVE_WATER) ||
|
((actor->spr.picnum == BOSS1 || actor->spr.picnum == BOSS2) && dasectp->lotag == ST_1_ABOVE_WATER) ||
|
||||||
(dasectp->lotag == ST_1_ABOVE_WATER && (actor->spr.picnum == LIZMAN || (actor->spr.picnum == LIZTROOP && actor->int_zvel() == 0)))
|
(dasectp->lotag == ST_1_ABOVE_WATER && (actor->spr.picnum == LIZMAN || (actor->spr.picnum == LIZTROOP && actor->float_zvel() == 0)))
|
||||||
))
|
))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -775,7 +775,7 @@ void movefallers_d(void)
|
||||||
act->add_int_zvel( x);
|
act->add_int_zvel( x);
|
||||||
if (act->float_zvel() > 24)
|
if (act->float_zvel() > 24)
|
||||||
act->set_int_zvel(6144);
|
act->set_int_zvel(6144);
|
||||||
act->add_int_z(act->int_zvel());
|
act->spr.pos.Z += act->float_zvel();
|
||||||
}
|
}
|
||||||
if ((sectp->floorz - act->spr.pos.Z) < 16)
|
if ((sectp->floorz - act->spr.pos.Z) < 16)
|
||||||
{
|
{
|
||||||
|
@ -2602,7 +2602,7 @@ static void heavyhbomb(DDukeActor *actor)
|
||||||
MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14),
|
MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14),
|
||||||
actor->int_zvel(), CLIPMASK0, coll);
|
actor->int_zvel(), CLIPMASK0, coll);
|
||||||
|
|
||||||
if (actor->sector()->lotag == 1 && actor->int_zvel() == 0)
|
if (actor->sector()->lotag == 1 && actor->float_zvel() == 0)
|
||||||
{
|
{
|
||||||
actor->spr.pos.Z += 32;
|
actor->spr.pos.Z += 32;
|
||||||
if (actor->temp_data[5] == 0)
|
if (actor->temp_data[5] == 0)
|
||||||
|
@ -2676,7 +2676,7 @@ DETONATEB:
|
||||||
|
|
||||||
fi.hitradius(actor, m, x >> 2, x >> 1, x - (x >> 2), x);
|
fi.hitradius(actor, m, x >> 2, x >> 1, x - (x >> 2), x);
|
||||||
spawn(actor, EXPLOSION2);
|
spawn(actor, EXPLOSION2);
|
||||||
if (actor->int_zvel() == 0) spawn(actor, EXPLOSION2BOT);
|
if (actor->float_zvel() == 0) spawn(actor, EXPLOSION2BOT);
|
||||||
S_PlayActorSound(PIPEBOMB_EXPLODE, actor);
|
S_PlayActorSound(PIPEBOMB_EXPLODE, actor);
|
||||||
for (x = 0; x < 8; x++)
|
for (x = 0; x < 8; x++)
|
||||||
RANDOMSCRAP(actor);
|
RANDOMSCRAP(actor);
|
||||||
|
@ -2836,7 +2836,7 @@ void moveactors_d(void)
|
||||||
case HELECOPT:
|
case HELECOPT:
|
||||||
case DUKECAR:
|
case DUKECAR:
|
||||||
|
|
||||||
act->add_int_z(act->int_zvel());
|
act->spr.pos.Z += act->float_zvel();
|
||||||
act->temp_data[0]++;
|
act->temp_data[0]++;
|
||||||
|
|
||||||
if (act->temp_data[0] == 4) S_PlayActorSound(WAR_AMBIENCE2, act);
|
if (act->temp_data[0] == 4) S_PlayActorSound(WAR_AMBIENCE2, act);
|
||||||
|
|
|
@ -693,7 +693,7 @@ void movefallers_r(void)
|
||||||
act->add_int_zvel( x);
|
act->add_int_zvel( x);
|
||||||
if (act->float_zvel() > 24)
|
if (act->float_zvel() > 24)
|
||||||
act->set_int_zvel(6144);
|
act->set_int_zvel(6144);
|
||||||
act->add_int_z(act->int_zvel());
|
act->spr.pos.Z += act->float_zvel();
|
||||||
}
|
}
|
||||||
if ((sectp->floorz - act->spr.pos.Z) < 16)
|
if ((sectp->floorz - act->spr.pos.Z) < 16)
|
||||||
{
|
{
|
||||||
|
@ -2379,7 +2379,7 @@ static void heavyhbomb(DDukeActor *actor)
|
||||||
MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14),
|
MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14),
|
||||||
actor->int_zvel(), CLIPMASK0, coll);
|
actor->int_zvel(), CLIPMASK0, coll);
|
||||||
|
|
||||||
if (actor->sector()->lotag == 1 && actor->int_zvel() == 0)
|
if (actor->sector()->lotag == 1 && actor->float_zvel() == 0)
|
||||||
{
|
{
|
||||||
actor->spr.pos.Z += 32;
|
actor->spr.pos.Z += 32;
|
||||||
if (actor->temp_data[5] == 0)
|
if (actor->temp_data[5] == 0)
|
||||||
|
@ -3633,7 +3633,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
||||||
|
|
||||||
a = badguy(actor);
|
a = badguy(actor);
|
||||||
|
|
||||||
if (actor->spr.xvel || actor->int_zvel())
|
if (actor->spr.xvel || actor->float_zvel() != 0)
|
||||||
{
|
{
|
||||||
if (a)
|
if (a)
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,7 +87,7 @@ void AIBubble::Tick(RunListEvent* ev)
|
||||||
pActor->nFrame = 0;
|
pActor->nFrame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
pActor->add_int_z(pActor->int_zvel());
|
pActor->spr.pos.Z = pActor->float_zvel();
|
||||||
|
|
||||||
auto pSector = pActor->sector();
|
auto pSector = pActor->sector();
|
||||||
|
|
||||||
|
|
|
@ -422,8 +422,8 @@ void DoRegenerates()
|
||||||
pActor->spr.yrepeat = (uint8_t)pActor->spr.xvel;
|
pActor->spr.yrepeat = (uint8_t)pActor->spr.xvel;
|
||||||
pActor->spr.xrepeat = (uint8_t)pActor->spr.xvel;
|
pActor->spr.xrepeat = (uint8_t)pActor->spr.xvel;
|
||||||
pActor->spr.pal = (uint8_t)pActor->spr.yvel;
|
pActor->spr.pal = (uint8_t)pActor->spr.yvel;
|
||||||
pActor->spr.yvel = pActor->int_zvel(); // setting to 0
|
pActor->spr.yvel = 0;
|
||||||
pActor->spr.xvel = pActor->int_zvel(); // setting to 0
|
pActor->spr.xvel = 0;
|
||||||
|
|
||||||
if (pActor->spr.statnum == kStatExplodeTrigger) {
|
if (pActor->spr.statnum == kStatExplodeTrigger) {
|
||||||
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||||
|
|
|
@ -819,7 +819,7 @@ void AIQueenHead::Tick(RunListEvent* ev)
|
||||||
pActor->spr.xvel = 0;
|
pActor->spr.xvel = 0;
|
||||||
pActor->spr.yvel = 0;
|
pActor->spr.yvel = 0;
|
||||||
|
|
||||||
if (pActor->int_zvel() == 0)
|
if (pActor->float_zvel() == 0)
|
||||||
{
|
{
|
||||||
QueenHead.nIndex = 120;
|
QueenHead.nIndex = 120;
|
||||||
}
|
}
|
||||||
|
|
|
@ -305,7 +305,7 @@ void AIRat::Tick(RunListEvent* ev)
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
if (pActor->spr.xvel || pActor->spr.yvel || pActor->int_zvel()) {
|
if (pActor->spr.xvel || pActor->spr.yvel || pActor->float_zvel() != 0) {
|
||||||
MoveCreature(pActor);
|
MoveCreature(pActor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -333,9 +333,9 @@ void AIWasp::Tick(RunListEvent* ev)
|
||||||
{
|
{
|
||||||
auto pSector =pActor->sector();
|
auto pSector =pActor->sector();
|
||||||
|
|
||||||
pActor->add_int_z(pActor->int_zvel());
|
pActor->spr.pos.Z = pActor->float_zvel();
|
||||||
|
|
||||||
if (pActor->int_pos().Z >= pSector->int_floorz())
|
if (pActor->spr.pos.Z >= pSector->floorz)
|
||||||
{
|
{
|
||||||
if (pSector->pBelow != nullptr)
|
if (pSector->pBelow != nullptr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3490,8 +3490,8 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
|
||||||
vec.XY() = actor->spr.angle.ToVector() * actor->spr.xvel * inttoworld;
|
vec.XY() = actor->spr.angle.ToVector() * actor->spr.xvel * inttoworld;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actor->int_zvel())
|
if (actor->float_zvel() != 0)
|
||||||
vec.Z = actor->int_zvel() * locktics * zinttoworld;
|
vec.Z = actor->float_zvel() * locktics;
|
||||||
}
|
}
|
||||||
|
|
||||||
actor->user.coll = move_sprite(actor, vec, actor->user.ceiling_dist, actor->user.floor_dist, 0, locktics);
|
actor->user.coll = move_sprite(actor, vec, actor->user.ceiling_dist, actor->user.floor_dist, 0, locktics);
|
||||||
|
|
|
@ -16227,7 +16227,7 @@ int InitEnemyFireball(DSWActor* actor)
|
||||||
if (dist != 0)
|
if (dist != 0)
|
||||||
{
|
{
|
||||||
actorNew->set_int_zvel((GORO_FIREBALL_VELOCITY * (targ_z - actorNew->int_pos().Z)) / dist);
|
actorNew->set_int_zvel((GORO_FIREBALL_VELOCITY * (targ_z - actorNew->int_pos().Z)) / dist);
|
||||||
actorNew->user.set_int_change_z(actorNew->int_zvel());
|
actorNew->user.change.Z = actorNew->float_zvel();
|
||||||
}
|
}
|
||||||
// back up first one
|
// back up first one
|
||||||
lastvel = actorNew->int_zvel();
|
lastvel = actorNew->int_zvel();
|
||||||
|
|
Loading…
Reference in a new issue