diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 4c30249ff..2faf6a034 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -1004,7 +1004,7 @@ void movetrash(DDukeActor *actor) if (ssp(actor, CLIPMASK0)) { makeitfall(actor); - if (krand() & 1) actor->spr.zvel -= 256; + if (krand() & 1) actor->add_int_zvel(- 256); if (abs(actor->spr.xvel) < 48) actor->spr.xvel += (krand() & 3); } @@ -2382,7 +2382,7 @@ void shell(DDukeActor* actor, bool morecheck) actor->temp_data[0] &= 3; } if (actor->int_zvel() < 128) actor->add_int_zvel( (gs.gravity / 13)); // 8 - else actor->spr.zvel -= 64; + else actor->add_int_zvel(- 64); if (actor->spr.xvel > 0) actor->spr.xvel -= 4; else actor->spr.xvel = 0; diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 8e15e7215..532322640 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -2400,7 +2400,7 @@ static void greenslime(DDukeActor *actor) if (actor->spr.yrepeat < 40) actor->spr.yrepeat += 8; if (actor->spr.xrepeat > 8) actor->spr.xrepeat -= 4; if (actor->int_zvel() > -(2048 + 1024)) - actor->spr.zvel -= 348; + actor->add_int_zvel(- 348); actor->add_int_z(actor->int_zvel()); if (actor->spr.pos.Z < actor->ceilingz + 16) { @@ -3526,7 +3526,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel) if ((a & jumptoplayer) == jumptoplayer) { if (actor->temp_data[0] < 16) - actor->spr.zvel -= bcos(actor->temp_data[0] << 4, -5); + actor->add_int_zvel(- bcos(actor->temp_data[0] << 4, -5)); } if (a & face_player_smart) diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index a3c441b75..6016a494f 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -3533,12 +3533,12 @@ void move_r(DDukeActor *actor, int pnum, int xvel) if (actor->spr.picnum == CHEER) { if (actor->temp_data[0] < 16) - actor->spr.zvel -= bcos(actor->temp_data[0] << 4) / 40; + actor->add_int_zvel(- bcos(actor->temp_data[0] << 4) / 40); } else { if (actor->temp_data[0] < 16) - actor->spr.zvel -= bcos(actor->temp_data[0] << 4, -5); + actor->add_int_zvel(- bcos(actor->temp_data[0] << 4, -5)); } } if (a & justjump1) @@ -3546,12 +3546,12 @@ void move_r(DDukeActor *actor, int pnum, int xvel) if (actor->spr.picnum == RABBIT) { if (actor->temp_data[0] < 8) - actor->spr.zvel -= bcos(actor->temp_data[0] << 4) / 30; + actor->add_int_zvel(- bcos(actor->temp_data[0] << 4) / 30); } else if (actor->spr.picnum == MAMA) { if (actor->temp_data[0] < 8) - actor->spr.zvel -= bcos(actor->temp_data[0] << 4) / 35; + actor->add_int_zvel(- bcos(actor->temp_data[0] << 4) / 35); } } if (a & justjump2) @@ -3559,24 +3559,24 @@ void move_r(DDukeActor *actor, int pnum, int xvel) if (actor->spr.picnum == RABBIT) { if (actor->temp_data[0] < 8) - actor->spr.zvel -= bcos(actor->temp_data[0] << 4) / 24; + actor->add_int_zvel(- bcos(actor->temp_data[0] << 4) / 24); } else if (actor->spr.picnum == MAMA) { if (actor->temp_data[0] < 8) - actor->spr.zvel -= bcos(actor->temp_data[0] << 4) / 28; + actor->add_int_zvel(- bcos(actor->temp_data[0] << 4) / 28); } } if (a & windang) { if (actor->temp_data[0] < 8) - actor->spr.zvel -= bcos(actor->temp_data[0] << 4) / 24; + actor->add_int_zvel(- bcos(actor->temp_data[0] << 4) / 24); } } else if ((a & jumptoplayer) == jumptoplayer) { if (actor->temp_data[0] < 16) - actor->spr.zvel -= bcos(actor->temp_data[0] << 4, -5); + actor->add_int_zvel(- bcos(actor->temp_data[0] << 4, -5)); } diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index 70b989f87..10cfddde8 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -743,7 +743,7 @@ static void shootrpg(DDukeActor *actor, int p, int sx, int sy, int sz, int sa, i spawned->spr.yvel = gs.numfreezebounces; spawned->spr.xrepeat >>= 1; spawned->spr.yrepeat >>= 1; - spawned->spr.zvel -= (2 << 4); + spawned->add_int_zvel(- (2 << 4)); } if (p == -1) diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index 1d5d733b0..cc545c3e3 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -695,7 +695,7 @@ static void shootrpg(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, i spawned->spr.yvel = gs.numfreezebounces; spawned->spr.xrepeat >>= 1; spawned->spr.yrepeat >>= 1; - spawned->spr.zvel -= (2 << 4); + spawned->add_int_zvel(- (2 << 4)); } if (p == -1) diff --git a/source/games/exhumed/src/move.cpp b/source/games/exhumed/src/move.cpp index e245cf668..4c944f3e6 100644 --- a/source/games/exhumed/src/move.cpp +++ b/source/games/exhumed/src/move.cpp @@ -580,14 +580,14 @@ void Gravity(DExhumedActor* pActor) } else { - pActor->spr.zvel -= 64; + pActor->add_int_zvel(- 64); } } else { if (pActor->int_zvel() > 0) { - pActor->spr.zvel -= 64; + pActor->add_int_zvel(- 64); if (pActor->int_zvel() < 0) { pActor->set_int_zvel(0); } diff --git a/source/games/exhumed/src/runlist.cpp b/source/games/exhumed/src/runlist.cpp index 4ba5ccd04..d48071c17 100644 --- a/source/games/exhumed/src/runlist.cpp +++ b/source/games/exhumed/src/runlist.cpp @@ -1657,7 +1657,7 @@ int runlist_CheckRadialDamage(DExhumedActor* pActor) pActor->spr.xvel += (edi * bcos(nAngle)) >> 3; pActor->spr.yvel += (edi * bsin(nAngle)) >> 3; - pActor->spr.zvel -= edi * 24; + pActor->add_int_zvel(- edi * 24); if (pActor->int_zvel() < -3584) { pActor->set_int_zvel(-3584);