From 022a5f88708f17a5d32cd66df356c773e884e787 Mon Sep 17 00:00:00 2001 From: Kp Date: Wed, 18 Dec 2013 00:22:23 +0000 Subject: [PATCH] Fix array overstep in collide_weapon_and_wall This is the same mistake as fixed in ca4f9e8b30, but in a different function. --- similar/main/collide.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/similar/main/collide.cpp b/similar/main/collide.cpp index 7339fd6f9..4b51d97bb 100644 --- a/similar/main/collide.cpp +++ b/similar/main/collide.cpp @@ -753,8 +753,8 @@ static void collide_weapon_and_wall( object * weapon, fix hitspeed, short hitseg int robot_escort; #if defined(DXX_BUILD_DESCENT_II) - if ((weapon->ctype.laser_info.parent_type == OBJ_ROBOT) && (Robot_info[get_robot_id(&Objects[weapon->ctype.laser_info.parent_num])].companion==1)) { - robot_escort = 1; + robot_escort = effect_parent_is_guidebot(weapon); + if (robot_escort) { if (Game_mode & GM_MULTI) {