From bf8d29b348a262c4e6dc7b69de8e4d8cb703add8 Mon Sep 17 00:00:00 2001 From: Kp Date: Wed, 13 Aug 2014 22:17:38 +0000 Subject: [PATCH] Remove useless buddy bot checks These are only hit after the condition is assumed true. --- d2x-rebirth/main/escort.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2x-rebirth/main/escort.cpp b/d2x-rebirth/main/escort.cpp index e7ff5fc47..75b2f889f 100644 --- a/d2x-rebirth/main/escort.cpp +++ b/d2x-rebirth/main/escort.cpp @@ -254,7 +254,7 @@ static int ok_for_buddy_to_talk(void) if (Buddy_allowed_to_talk) return 1; - if ((Objects[Buddy_objnum].type == OBJ_ROBOT) && (Buddy_objnum <= Highest_object_index) && !Robot_info[get_robot_id(&Objects[Buddy_objnum])].companion) { + if (!Robot_info[get_robot_id(&Objects[Buddy_objnum])].companion) { for (objnum_t i=object_first;; i++) { if (!(i<=Highest_object_index))