From 5bf3b7113eb3af0a1278a40f76212f4a7b8815a6 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 15 Apr 2012 02:43:37 +0000 Subject: [PATCH] - Fixed: When using CMF_ABSOLUTEPITCH or CMF_OFFSETPITCH, A_CustomMissile could calculate a negative missile speed. SVN r3565 (trunk) --- src/thingdef/thingdef_codeptr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 09c1afe9c..098886ee3 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -919,7 +919,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomMissile) pitch += R_PointToAngle2(0,0, (fixed_t)velocity.Length(), missile->velz); } ang = pitch >> ANGLETOFINESHIFT; - missilespeed = FixedMul(finecosine[ang], missile->Speed); + missilespeed = abs(FixedMul(finecosine[ang], missile->Speed)); missile->velz = FixedMul(finesine[ang], missile->Speed); } else