From c0cc2b0760f36be29090a0271b4356afc1664322 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 6 Sep 2022 19:42:45 +0200 Subject: [PATCH] - some remaining angle stuff in ripper code --- source/games/sw/src/ripper.cpp | 2 +- source/games/sw/src/ripper2.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/games/sw/src/ripper.cpp b/source/games/sw/src/ripper.cpp index e5f7cf942..223e7b33a 100644 --- a/source/games/sw/src/ripper.cpp +++ b/source/games/sw/src/ripper.cpp @@ -1023,7 +1023,7 @@ int DoRipperMoveHang(DSWActor* actor) actor->user.WaitTics = 2 + ((RANDOM_P2(4 << 8) >> 8) * 120); // hang flush with the wall - actor->set_int_ang(NORM_ANGLE(getangle(actor->user.coll.hitWall->delta()) - 512)); + actor->spr.angle = VecToAngle(actor->user.coll.hitWall->delta()) - DAngle90; return 0; } diff --git a/source/games/sw/src/ripper2.cpp b/source/games/sw/src/ripper2.cpp index 52d3da8f3..4aba6f5ba 100644 --- a/source/games/sw/src/ripper2.cpp +++ b/source/games/sw/src/ripper2.cpp @@ -1019,7 +1019,7 @@ int DoRipper2MoveHang(DSWActor* actor) short w, nw; // Don't keep clinging and going ever higher! - if (abs(actor->int_pos().Z - actor->user.targetActor->int_pos().Z) > (4000<<4)) + if (abs(actor->spr.pos.Z - actor->user.targetActor->spr.pos.Z) > 250) return 0; NewStateGroup(actor, actor->user.ActorActionSet->Special[1]); @@ -1029,7 +1029,7 @@ int DoRipper2MoveHang(DSWActor* actor) actor->user.WaitTics = 0; // Double jump // hang flush with the wall - actor->set_int_ang(NORM_ANGLE(getangle(actor->user.coll.hitWall->delta()) - 512)); + actor->spr.angle = VecToAngle(actor->user.coll.hitWall->delta()) - DAngle90; return 0; }