From d2818322b0c6d31e1141b1fb8fdcf0d6f712d25a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 21 Aug 2022 10:16:56 +0200 Subject: [PATCH] - 2x int_hiz --- source/games/sw/src/actor.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/games/sw/src/actor.cpp b/source/games/sw/src/actor.cpp index 2c79c536c..cacb87ea8 100644 --- a/source/games/sw/src/actor.cpp +++ b/source/games/sw/src/actor.cpp @@ -663,11 +663,11 @@ int DoActorJump(DSWActor* actor) actor->add_int_z(actor->user.jump_speed * ACTORMOVETICS); // if player gets to close the ceiling while jumping - int minh = actor->user.int_hiz() + (tileHeight(actor->spr.picnum) << 8); - if (actor->int_pos().Z < minh) + double minh = actor->user.hiz + tileHeight(actor->spr.picnum); + if (actor->spr.pos.Z < minh) { // put player at the ceiling - actor->set_int_z(minh); + actor->spr.pos.Z = minh; // reverse your speed to falling actor->user.jump_speed = -actor->user.jump_speed; @@ -829,11 +829,11 @@ int DoJump(DSWActor* actor) actor->add_int_z(actor->user.jump_speed * ACTORMOVETICS); // if player gets to close the ceiling while jumping - int minh = actor->user.int_hiz() + (tileHeight(actor->spr.picnum) << 8); - if (actor->int_pos().Z < minh) + double minh = actor->user.hiz + tileHeight(actor->spr.picnum); + if (actor->spr.pos.Z < minh) { // put player at the ceiling - actor->set_int_z(minh); + actor->spr.pos.Z = minh; // reverse your speed to falling actor->user.jump_speed = -actor->user.jump_speed;