diff --git a/source/core/coreactor.h b/source/core/coreactor.h index 4c54a5447..fd2e1745d 100644 --- a/source/core/coreactor.h +++ b/source/core/coreactor.h @@ -122,11 +122,6 @@ public: vel.Z = v * zinttoworld; } - void add_int_zvel(int v) - { - vel.Z += v * zinttoworld; - } - // Note: Both Duke and SW use Q12.4 for this, Exhumed doesn't seem to treat horizontal velocity with a fixed factor. int int_xvel() const { diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 435e49874..ef093ceee 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -3507,7 +3507,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel) if ((a & jumptoplayer) == jumptoplayer) { if (actor->temp_data[0] < 16) - actor->add_int_zvel(- bcos(actor->temp_data[0] << 4, -5)); + actor->vel.Z += BobVal(512 + (actor->temp_data[0] << 4)) * 2; } if (a & face_player_smart) diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index 47801edc0..d8003ff04 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -805,7 +805,7 @@ static void shootrpg(DDukeActor *actor, int p, int sx, int sy, int sz, int sa, i { spawned->spr.extra >>= 2; spawned->add_int_ang(16 - (krand() & 31)); - spawned->add_int_zvel( 256 - (krand() & 511)); + spawned->vel.Z += 1 - krandf(2); if (ps[p].hbomb_hold_delay) { diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index 10243b8a3..6d3277981 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -716,7 +716,7 @@ static void shootrpg(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, i { spawned->spr.extra >>= 2; spawned->add_int_ang(16 - (krand() & 31)); - spawned->add_int_zvel( 256 - (krand() & 511)); + spawned->vel.Z += 1 - krandf(2); if (ps[p].hbomb_hold_delay) {