dxx-rebirth/similar/main
Kp b0185e44ad Fix displacing players when synthesizing player start positions
TORRaven reported an issue where `Descent: First Strike` level 4 in
cooperative games would cause the player 0 ship to be unable to move.
On investigation, this occurs when the host has enabled extra player
starts, and the resulting synthesis of new player start positions moves
the player 0 start out of its origin segment.  The physics engine reacts
poorly to this situation, causing the object to be unable to move and to
report HIT_BAD_P0 in debug builds.  Add a test to cancel the
displacement if get_seg_masks reports that the center point would move
outside the origin segment.  More clever logic might be appropriate, but
since this is the first report of problems with the feature since its
introduction in 5a64ee5132, this commit just eliminates the
immediate problem.  Possible future improvements if the existing
displacement causes collisions:

- Reduce the magnitude of the existing displacement, instead of
  abandoning it entirely.
- Move the player start to the segment's center before displacing it.
- Add logic to move the player into a nearby logically connected
  segment.

Reported-by: TORRaven <https://github.com/dxx-rebirth/dxx-rebirth/issues/483>
Fixes: 5a64ee5132 ("Add experimental support for larger cooperative games")
2020-01-06 01:25:35 +00:00
..
ai.cpp Use susegment for WALL_IS_DOORWAY 2019-12-27 02:02:23 +00:00
aipath.cpp Use susegment for WALL_IS_DOORWAY 2019-12-27 02:02:23 +00:00
automap.cpp Use susegment for WALL_IS_DOORWAY 2019-12-27 02:02:23 +00:00
bm.cpp revert to old load behavior when emulating D1 2019-12-21 23:42:04 +02:00
bmread.cpp Remove test for unconverted characters after a superx= line 2019-11-18 00:22:34 +00:00
cntrlcen.cpp Simplify valptridx types where possible 2019-12-22 05:34:08 +00:00
collide.cpp Use susegment for WALL_IS_DOORWAY 2019-12-27 02:02:23 +00:00
config.cpp initial version of this, trying to catch MCI events 2019-10-27 02:47:45 +03:00
console.cpp
controls.cpp Move Seismic_tremor_magnitude to d_level_unique_seismic_state 2019-08-06 02:59:41 +00:00
credits.cpp Downgrade PCX failures from Error to CON_URGENT 2019-07-07 22:00:02 +00:00
digiobj.cpp Simplify valptridx types where possible 2019-12-22 05:34:08 +00:00
dumpmine.cpp Use susegment for dumpmine iteration 2019-12-27 02:02:23 +00:00
effects.cpp Move Control_center_destroyed to d_level_unique_control_center_state 2019-08-15 01:34:22 +00:00
endlevel.cpp Split object_move_all for game/endlevel 2019-12-22 05:34:08 +00:00
fireball.cpp Simplify valptridx types where possible 2019-12-22 05:34:08 +00:00
fuelcen.cpp Convert segment & to susegment where possible 2019-12-22 05:34:08 +00:00
fvi.cpp Use susegment for WALL_IS_DOORWAY 2019-12-27 02:02:23 +00:00
game.cpp Use susegment for WALL_IS_DOORWAY 2019-12-27 02:02:23 +00:00
gamecntl.cpp Make del+shift+b do fatal damage to every robot it explodes 2019-09-01 00:20:28 +00:00
gamefont.cpp
gamemine.cpp Use susegment for segment2_read 2019-12-27 02:02:23 +00:00
gamerend.cpp Move Countdown_seconds_left to d_level_unique_control_center_state 2019-08-15 01:34:22 +00:00
gamesave.cpp Move object::last_pos to LevelUniqueObjectState 2019-12-22 05:34:08 +00:00
gameseg.cpp Use susegment for WALL_IS_DOORWAY 2019-12-27 02:02:23 +00:00
gameseq.cpp Fix displacing players when synthesizing player start positions 2020-01-06 01:25:35 +00:00
gauges.cpp Hide lives-remaining count during demo playback 2019-08-24 18:14:16 +00:00
generate-kconfig-udlr.py Make kconfig.ui-table.cpp compile when freestanding 2019-12-22 05:34:08 +00:00
hostage.cpp Track headlights in d_level_unique_light_state 2019-04-13 18:00:07 +00:00
hud.cpp
iff.cpp
inferno.cpp Call arch_close before atexit hooks begin 2020-01-06 01:25:35 +00:00
kconfig.cpp Make kconfig.ui-table.cpp compile when freestanding 2019-12-22 05:34:08 +00:00
kconfig.ui-table.cpp Make kconfig.ui-table.cpp compile when freestanding 2019-12-22 05:34:08 +00:00
kmatrix.cpp Move Countdown_seconds_left to d_level_unique_control_center_state 2019-08-15 01:34:22 +00:00
laser.cpp Simplify valptridx types where possible 2019-12-22 05:34:08 +00:00
lighting.cpp Use xrange for render loops 2019-05-04 18:27:37 +00:00
menu.cpp initial version of this, trying to catch MCI events 2019-10-27 02:47:45 +03:00
mglobal.cpp Move transition_segnum to d_player_unique_endlevel_state 2019-08-15 01:34:22 +00:00
mission.cpp Report failure when a mission is not found in the mission list 2020-01-06 01:25:35 +00:00
morph.cpp Change object::signature to be a generation counter 2019-07-07 22:00:02 +00:00
multi.cpp Move object::last_pos to LevelUniqueObjectState 2019-12-22 05:34:08 +00:00
multibot.cpp Simplify valptridx types where possible 2019-12-22 05:34:08 +00:00
net_udp.cpp Move Countdown_seconds_left to d_level_unique_control_center_state 2019-08-15 01:34:22 +00:00
newdemo.cpp Move object::last_pos to LevelUniqueObjectState 2019-12-22 05:34:08 +00:00
newmenu.cpp Downgrade PCX failures from Error to CON_URGENT 2019-07-07 22:00:02 +00:00
object.cpp Split object_move_all for game/endlevel 2019-12-22 05:34:08 +00:00
paging.cpp Use susegment for WALL_IS_DOORWAY 2019-12-27 02:02:23 +00:00
physics.cpp Use susegment for WALL_IS_DOORWAY 2019-12-27 02:02:23 +00:00
piggy.cpp Make read_sndfile static for D1 2019-08-15 01:34:22 +00:00
player.cpp Add experimental support for guidebot in multiplayer 2019-06-27 03:26:20 +00:00
playsave.cpp Avoid reducing player's highest-level when replaying a non-MRU level 2019-08-24 04:32:24 +00:00
polyobj.cpp some changes as per comments in #479 2019-12-18 13:44:43 +02:00
powerup.cpp Move Difficulty_level to GameUniqueState 2019-06-27 03:26:20 +00:00
render.cpp Use susegment for WALL_IS_DOORWAY 2019-12-27 02:02:23 +00:00
robot.cpp
scores.cpp Fix Win32 build of scores.cpp 2019-11-19 02:42:24 +00:00
segment.cpp Use susegment for references introduced by valptridx conversion 2019-12-22 05:34:08 +00:00
slew.cpp Move object::last_pos to LevelUniqueObjectState 2019-12-22 05:34:08 +00:00
songs.cpp Fix crash entering secret level with music on, and no songs 2019-11-02 04:36:15 +00:00
state.cpp Move object::last_pos to LevelUniqueObjectState 2019-12-22 05:34:08 +00:00
switch.cpp Convert segment & to susegment where possible 2019-12-22 05:34:08 +00:00
terrain.cpp Include segment.h for terrain.cpp to handle over-eager instantiation 2019-12-16 01:56:59 +00:00
texmerge.cpp
text.cpp
titles.cpp Avoid copying background to itself 2019-07-07 22:00:02 +00:00
vclip.cpp is_proximity_bomb_or_smart_mine*: s/smart/player_smart/g 2019-08-15 01:34:22 +00:00
vers_id.cpp
wall.cpp Use susegment for WALL_IS_DOORWAY 2019-12-27 02:02:23 +00:00
weapon.cpp Move Seismic_tremor_magnitude to d_level_unique_seismic_state 2019-08-06 02:59:41 +00:00