From 45e351e46c747709a392a0924f9a95ff9f654845 Mon Sep 17 00:00:00 2001 From: zicodxx Date: Sat, 7 Apr 2012 10:58:46 +0200 Subject: [PATCH] in choose_drop_segment let fallback correctly check for reactor segment --- CHANGELOG.txt | 4 ++++ main/fireball.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 309a5daa1..ce0c13544 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D2X-Rebirth Changelog +20120407 +-------- +main/fireball.c: in choose_drop_segment let fallback correctly check for reactor segment + 20120405 -------- main/multi.c: variable declarations come first diff --git a/main/fireball.c b/main/fireball.c index 0806b5981..5a099af11 100644 --- a/main/fireball.c +++ b/main/fireball.c @@ -577,8 +577,13 @@ int choose_drop_segment() } if (segnum == -1) { + cur_drop_depth = BASE_NET_DROP_DEPTH; while (cur_drop_depth > 0 && segnum == -1) // before dropping in random segment, try to find ANY segment which is connected to the player responsible for the drop so object will not spawn in inaccessible areas + { segnum = pick_connected_segment(&Objects[Players[Player_num].objnum], --cur_drop_depth); + if (Segment2s[segnum].special == SEGMENT_IS_CONTROLCEN) + segnum = -1; + } return ((segnum == -1)?((d_rand() * Highest_segment_index) >> 15):segnum); // basically it should be impossible segnum == -1 now... but oh well... } else return segnum;