dxx-rebirth/similar/main
Kp 8291391b7f Fix D2 emulation of D1 boss teleport handling
Descent 1 bosses could always teleport, but were only placed in large
areas where free teleporting was always permitted.

Descent 2 boss 1 was placed in a confined segment and not permitted to
teleport out of it until it was opened.  This was implemented by a
two-part change relative to Descent 1 rules:

- Descent 1 bosses were always permitted to teleport to any teleport
  destination segment.  Descent 2 bosses were only permitted to teleport
  if the player was visible or the boss had recently been hit.
- When computing the permitted list of teleport destination segments,
  Descent 1 used directly connected accessible segments, then stopped.
  Descent 2 started with this rule, but if the list had at most 1 entry,
  then it would assume this is the confined boss and recompute the list
  with the first wall ignored.  This recomputed list allowed the boss to
  teleport to any segment in the larger arena outside its starting
  segment.

After D2X-Rebirth support for emulating Descent 1 bosses was enhanced in
28bd4c1650, Descent 1 bosses gained the ability to teleport out of a
confining cube early, but only in D2X-Rebirth when emulating Descent 1.
In D1X-Rebirth, when a boss is placed in a confining cube, it can always
teleport, but only to that confining cube.  In D2X-Rebirth, Descent 1
bosses retain the always-teleport rule of Descent 1, but gained the
Descent 2 rule for expanding its search to the surrounding arena.  It
should only use the expanded search when it also abides by the Descent 2
restriction not to teleport before the first wall is opened.  It did not
abide by that rule.  This commit adds that restriction for Descent 1
bosses.

Reported-by: ef314159 <https://github.com/dxx-rebirth/dxx-rebirth/issues/348>
Fixes: 28bd4c1650 ("Enable D1 boss behavior in d2x build. So we get correct boss behavior when emulating D1, and 3rd party mn2s can include D1 bosses.")
2017-10-06 01:59:09 +00:00
..
ai.cpp Fix D2 emulation of D1 boss teleport handling 2017-10-06 01:59:09 +00:00
aipath.cpp Use reference for robot_info 2017-08-26 19:47:51 +00:00
automap.cpp Make automap PCX optional 2017-09-10 04:28:41 +00:00
bm.cpp Add gcc-7 /*-fallthrough*/ comments for obvious cases 2017-06-07 02:44:54 +00:00
cntrlcen.cpp Always qualify valptridx type/factory 2017-06-10 03:31:02 +00:00
collide.cpp Fix excessive lavafall damage 2017-09-08 00:56:37 +00:00
config.cpp
console.cpp Simplify game log timestamp 2017-06-10 03:31:03 +00:00
controls.cpp Always qualify valptridx type/factory 2017-06-10 03:31:02 +00:00
credits.cpp Cache canvas in credits_handler 2017-03-11 19:56:23 +00:00
digiobj.cpp Pass valptridx factories to static functions 2017-07-26 03:15:59 +00:00
dumpmine.cpp Cache bitset::operator[] result 2017-09-30 18:00:15 +00:00
effects.cpp Always qualify valptridx type/factory 2017-06-10 03:31:02 +00:00
endlevel.cpp Split g3_start_instance_matrix usage 2017-08-26 19:47:51 +00:00
fireball.cpp Use reference for robot_info 2017-08-26 19:47:51 +00:00
fuelcen.cpp Cache player references 2017-08-13 20:38:31 +00:00
fvi.cpp Propagate objects_in arguments 2017-08-13 20:38:31 +00:00
game.cpp Use unsigned for Coop_view_player members 2017-08-13 20:38:31 +00:00
gamecntl.cpp Move menu_number_bias_wrapper bias into type signature 2017-09-26 04:15:50 +00:00
gamefont.cpp Pass canvas to gr_init_font 2017-03-11 19:56:22 +00:00
gamemine.cpp Use valptridx for Vertices 2017-08-11 23:43:54 +00:00
gamerend.cpp Use valptridx for Players 2017-08-13 20:38:32 +00:00
gamesave.cpp Use valptridx for Players 2017-08-13 20:38:32 +00:00
gameseg.cpp Pass vcvertptr to get_seg_masks 2017-08-11 23:43:54 +00:00
gameseq.cpp Allow players to remove thief at level start 2017-08-26 19:47:52 +00:00
gauges.cpp Use valptridx for Players 2017-08-13 20:38:32 +00:00
hostage.cpp Always qualify valptridx type/factory 2017-06-10 03:31:02 +00:00
hud.cpp Rename countarray method count -> size 2017-06-10 03:31:03 +00:00
iff.cpp
inferno.cpp Report compiled/loaded library versions at verbose level 2017-08-26 19:47:51 +00:00
kconfig.cpp Pass canvas &to nm_draw_background 2017-04-08 16:48:20 +00:00
kmatrix.cpp Use valptridx for Players 2017-08-13 20:38:32 +00:00
laser.cpp Use valptridx for Players 2017-08-13 20:38:32 +00:00
lighting.cpp Move marker preservation into object lifeleft update 2017-09-30 18:00:15 +00:00
menu.cpp Allow players to remove thief at level start 2017-08-26 19:47:52 +00:00
mglobal.cpp Fix pch=0 build of similar/main/mglobal.cpp 2017-08-16 01:54:26 +00:00
mission.cpp Move single-file defines out of mission.h 2017-08-11 23:43:52 +00:00
morph.cpp Use array<>+move for draw_model sort_list 2017-09-30 18:00:15 +00:00
multi.cpp Enable PF_USES_THRUST when reseting multiplayer flags 2017-10-03 01:31:33 +00:00
multibot.cpp Use reference for robot_info 2017-08-26 19:47:51 +00:00
net_udp.cpp Move menu_number_bias_wrapper bias into type signature 2017-09-26 04:15:50 +00:00
newdemo.cpp Fix D1 build of similar/main/newdemo.cpp 2017-08-16 01:54:26 +00:00
newmenu.cpp Cache canvas in listbox_create_structure 2017-04-30 16:25:19 +00:00
object.cpp Move marker preservation into object lifeleft update 2017-09-30 18:00:15 +00:00
paging.cpp Propagate objects_in arguments 2017-08-13 20:38:31 +00:00
physics.cpp Pass vcvertptr to get_seg_masks 2017-08-11 23:43:54 +00:00
piggy.cpp Add gcc-7 /*-fallthrough*/ comments for obvious cases 2017-06-07 02:44:54 +00:00
player.cpp Drop useless swaps on obsolete player_rw fields 2017-08-02 02:49:12 +00:00
playsave.cpp Allow players to remove thief at level start 2017-08-26 19:47:52 +00:00
polyobj.cpp Split g3_start_instance_matrix usage 2017-08-26 19:47:51 +00:00
powerup.cpp Use valptridx for Players 2017-08-13 20:38:32 +00:00
render.cpp Drop useless test in render_side 2017-09-26 04:15:50 +00:00
robot.cpp Use reference for robot_info 2017-08-26 19:47:51 +00:00
scores.cpp Cache player references 2017-08-13 20:38:31 +00:00
segment.cpp Rename segment::value to segment::station_idx 2017-07-08 18:17:49 +00:00
slew.cpp Always qualify valptridx type/factory 2017-06-10 03:31:02 +00:00
songs.cpp
state.cpp Use valptridx for Players 2017-08-13 20:38:32 +00:00
switch.cpp Use valptridx for Players 2017-08-13 20:38:32 +00:00
terrain.cpp Cache bitset::operator[] result 2017-09-30 18:00:15 +00:00
texmerge.cpp
text.cpp
titles.cpp Fix crash loading Vertigo briefing 2017-09-08 00:56:37 +00:00
vclip.cpp Expand bomb spin variance 2017-03-11 19:56:26 +00:00
vers_id.cpp
wall.cpp Propagate objects_in arguments 2017-08-13 20:38:31 +00:00
weapon.cpp Replace "compiler-type_traits.h" with <type_traits> 2017-06-25 20:46:03 +00:00