From 1b0e3f4aa55fac234eeefaf1f50d7f3dec38c2f5 Mon Sep 17 00:00:00 2001 From: Kp Date: Thu, 28 May 2015 03:08:39 +0000 Subject: [PATCH] Pass vsegptr to multibot compute_segment_center --- similar/main/multibot.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/similar/main/multibot.cpp b/similar/main/multibot.cpp index 8673a93de..d713f2342 100644 --- a/similar/main/multibot.cpp +++ b/similar/main/multibot.cpp @@ -945,13 +945,8 @@ void multi_do_boss_teleport(const playernum_t pnum, const ubyte *buf) Int3(); // Got boss actions for a robot who's not a boss? return; } - auto teleport_segnum = b.where; - if ((teleport_segnum < 0) || (teleport_segnum > Highest_segment_index)) - { - Int3(); // See Rob - return; - } - compute_segment_center(boss_obj->pos, &Segments[teleport_segnum]); + const auto &&teleport_segnum = vsegptridx(b.where); + compute_segment_center(boss_obj->pos, teleport_segnum); obj_relink(boss_obj, teleport_segnum); Last_teleport_time = GameTime64;