From fa411af1daab62980d2b77cc73c3fd0723962e6d Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Sun, 18 Jan 2015 09:21:59 -0600 Subject: [PATCH] - Fixed: Reflected projectiles were always changing their angles to 0. --- src/p_mobj.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index fea80f868..bb33a88c4 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -1970,6 +1970,7 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly) { //int dir; //angle_t delta; + angle = R_PointToAngle2(BlockingMobj->x, BlockingMobj->y, mo->x, mo->y); bool dontReflect = (mo->AdjustReflectionAngle(BlockingMobj, angle)); // Change angle for deflection/reflection @@ -1989,7 +1990,7 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly) //dest->x - source->x FVector3 velocity(origin->x - mo->x, origin->y - mo->y, (origin->z + (origin->height/2)) - mo->z); velocity.Resize(speed); - angle = mo->angle >> ANGLETOFINESHIFT; + angle = mo->angle >>= ANGLETOFINESHIFT; mo->velx = (fixed_t)(velocity.X); mo->vely = (fixed_t)(velocity.Y); mo->velz = (fixed_t)(velocity.Z); @@ -2001,6 +2002,7 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly) } else { + mo->angle = angle; angle >>= ANGLETOFINESHIFT; mo->velx = FixedMul(mo->Speed >> 1, finecosine[angle]);