Skip to content

Commit 801b808

Browse files
committed
Merge pull request #529 from MageKing17/bugfix/objcollide-speed-check
Don't assume non-turning weapons have a fixed velocity.
2 parents 73d12d1 + 54e052b commit 801b808

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/object/objcollide.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,8 +788,8 @@ int weapon_will_never_hit( object *obj_weapon, object *other, obj_pair * current
788788
float max_vel_weapon, max_vel_other;
789789

790790
//SUSHI: Fix bug where additive weapon velocity screws up collisions
791-
//Assumes that weapons which don't home don't change speed, which is currently the case.
792-
if (!(wip->wi_flags & WIF_TURNS))
791+
//If the PF_CONST_VEL flag is set, we can safely assume it doesn't change speed.
792+
if (obj_weapon->phys_info.flags & PF_CONST_VEL)
793793
max_vel_weapon = obj_weapon->phys_info.speed;
794794
else if (wp->lssm_stage==5)
795795
max_vel_weapon = wip->lssm_stage5_vel;

0 commit comments

Comments
 (0)