diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index a3a8d68ef..295e36d85 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -490,7 +490,7 @@ void moveplayers(void) act->spr.yrepeat = 36; if (act->sector()->lotag != ST_2_UNDERWATER) 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; } @@ -1031,7 +1031,7 @@ void movewaterdrip(DDukeActor *actor, int drip) ssp(actor, CLIPMASK0); 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; @@ -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 (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->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 (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->floorz = sc->floorz; @@ -4136,7 +4136,7 @@ void handle_se20(DDukeActor* actor) DukeSectIterator it(actor->sector()); 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 }); if (a2->sector()->floorstat & CSTAT_SECTOR_SLOPE) @@ -4657,7 +4657,7 @@ void handle_se31(DDukeActor* actor, bool choosedir) if (a2->isPlayer() && a2->GetOwner()) if (ps[a2->PlayerIndex()].on_ground == 1) 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->floorz = sec->floorz; @@ -4686,7 +4686,7 @@ void handle_se31(DDukeActor* actor, bool choosedir) if (a2->isPlayer() && a2->GetOwner()) if (ps[a2->PlayerIndex()].on_ground == 1) 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->floorz = sec->floorz; @@ -4717,7 +4717,7 @@ void handle_se31(DDukeActor* actor, bool choosedir) if (a2->isPlayer() && a2->GetOwner()) if (ps[a2->PlayerIndex()].on_ground == 1) 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->floorz = sec->floorz; @@ -4745,7 +4745,7 @@ void handle_se31(DDukeActor* actor, bool choosedir) if (a2->isPlayer() && a2->GetOwner()) if (ps[a2->PlayerIndex()].on_ground == 1) 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->floorz = sec->floorz; diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index e42831977..d117badaf 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -473,7 +473,7 @@ int movesprite_ex_d(DDukeActor* actor, int xchange, int ychange, int zchange, un ((actor->actorstayput != nullptr && actor->actorstayput != dasectp) || ((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) || - (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); if (act->float_zvel() > 24) 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) { @@ -2602,7 +2602,7 @@ static void heavyhbomb(DDukeActor *actor) MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14), 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; if (actor->temp_data[5] == 0) @@ -2676,7 +2676,7 @@ DETONATEB: fi.hitradius(actor, m, x >> 2, x >> 1, x - (x >> 2), x); spawn(actor, EXPLOSION2); - if (actor->int_zvel() == 0) spawn(actor, EXPLOSION2BOT); + if (actor->float_zvel() == 0) spawn(actor, EXPLOSION2BOT); S_PlayActorSound(PIPEBOMB_EXPLODE, actor); for (x = 0; x < 8; x++) RANDOMSCRAP(actor); @@ -2836,7 +2836,7 @@ void moveactors_d(void) case HELECOPT: case DUKECAR: - act->add_int_z(act->int_zvel()); + act->spr.pos.Z += act->float_zvel(); act->temp_data[0]++; if (act->temp_data[0] == 4) S_PlayActorSound(WAR_AMBIENCE2, act); diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index 323386d45..0129fbf0b 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -693,7 +693,7 @@ void movefallers_r(void) act->add_int_zvel( x); if (act->float_zvel() > 24) 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) { @@ -2379,7 +2379,7 @@ static void heavyhbomb(DDukeActor *actor) MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14), 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; if (actor->temp_data[5] == 0) @@ -3633,7 +3633,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel) a = badguy(actor); - if (actor->spr.xvel || actor->int_zvel()) + if (actor->spr.xvel || actor->float_zvel() != 0) { if (a) { diff --git a/source/games/exhumed/src/bubbles.cpp b/source/games/exhumed/src/bubbles.cpp index 8dd78d082..1b1b91db9 100644 --- a/source/games/exhumed/src/bubbles.cpp +++ b/source/games/exhumed/src/bubbles.cpp @@ -87,7 +87,7 @@ void AIBubble::Tick(RunListEvent* ev) pActor->nFrame = 0; } - pActor->add_int_z(pActor->int_zvel()); + pActor->spr.pos.Z = pActor->float_zvel(); auto pSector = pActor->sector(); diff --git a/source/games/exhumed/src/items.cpp b/source/games/exhumed/src/items.cpp index 50f6dba58..c07188b5b 100644 --- a/source/games/exhumed/src/items.cpp +++ b/source/games/exhumed/src/items.cpp @@ -422,8 +422,8 @@ void DoRegenerates() pActor->spr.yrepeat = (uint8_t)pActor->spr.xvel; pActor->spr.xrepeat = (uint8_t)pActor->spr.xvel; pActor->spr.pal = (uint8_t)pActor->spr.yvel; - pActor->spr.yvel = pActor->int_zvel(); // setting to 0 - pActor->spr.xvel = pActor->int_zvel(); // setting to 0 + pActor->spr.yvel = 0; + pActor->spr.xvel = 0; if (pActor->spr.statnum == kStatExplodeTrigger) { pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; diff --git a/source/games/exhumed/src/queen.cpp b/source/games/exhumed/src/queen.cpp index d635bee40..ec4fe0694 100644 --- a/source/games/exhumed/src/queen.cpp +++ b/source/games/exhumed/src/queen.cpp @@ -819,7 +819,7 @@ void AIQueenHead::Tick(RunListEvent* ev) pActor->spr.xvel = 0; pActor->spr.yvel = 0; - if (pActor->int_zvel() == 0) + if (pActor->float_zvel() == 0) { QueenHead.nIndex = 120; } diff --git a/source/games/exhumed/src/rat.cpp b/source/games/exhumed/src/rat.cpp index 55958b209..4ec7f658a 100644 --- a/source/games/exhumed/src/rat.cpp +++ b/source/games/exhumed/src/rat.cpp @@ -305,7 +305,7 @@ void AIRat::Tick(RunListEvent* ev) } 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); } diff --git a/source/games/exhumed/src/wasp.cpp b/source/games/exhumed/src/wasp.cpp index 29c3c3dc2..b85b674b2 100644 --- a/source/games/exhumed/src/wasp.cpp +++ b/source/games/exhumed/src/wasp.cpp @@ -333,9 +333,9 @@ void AIWasp::Tick(RunListEvent* ev) { 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) { diff --git a/source/games/sw/src/track.cpp b/source/games/sw/src/track.cpp index 1ddc461fa..4e9cbabcd 100644 --- a/source/games/sw/src/track.cpp +++ b/source/games/sw/src/track.cpp @@ -3490,8 +3490,8 @@ int ActorFollowTrack(DSWActor* actor, short locktics) vec.XY() = actor->spr.angle.ToVector() * actor->spr.xvel * inttoworld; } - if (actor->int_zvel()) - vec.Z = actor->int_zvel() * locktics * zinttoworld; + if (actor->float_zvel() != 0) + vec.Z = actor->float_zvel() * locktics; } actor->user.coll = move_sprite(actor, vec, actor->user.ceiling_dist, actor->user.floor_dist, 0, locktics); diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index c96422ec9..bcc7c7a6c 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -16227,7 +16227,7 @@ int InitEnemyFireball(DSWActor* actor) if (dist != 0) { 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 lastvel = actorNew->int_zvel();