Add fallback routine from D2 source in wall_frame_process() to automatically set open-flag if wall state is set to opened

This commit is contained in:
zicodxx 2011-07-12 00:08:55 +02:00
parent c4c93e5cf1
commit 387645f7c8
2 changed files with 11 additions and 0 deletions

View file

@ -1,5 +1,9 @@
D1X-Rebirth Changelog
20110712
--------
main/wall.c: Add fallback routine from D2 source in wall_frame_process() to automatically set open-flag if wall state is set to opened
20110710
--------
main/gameseg.c: Added complex error output if illegal segnum passed to get_seg_masks(); Fixed warning about set but unused variables

View file

@ -938,6 +938,13 @@ void wall_frame_process()
do_door_close(i);
else if (w->state == WALL_DOOR_WAITING) {
d->time += FrameTime;
// set flags to fix occasional netgame problem where door is waiting to close but open flag isn't set
// NOTE: Taken from D2 source. Should not be necessary as multi_do_door_open() is more simple than in D2 but add anyways as it's a *good* fallback...
w->flags |= WALL_DOOR_OPENED;
if (d->back_wallnum[0] > -1)
Walls[d->back_wallnum[0]].flags |= WALL_DOOR_OPENED;
if (d->time > DOOR_WAIT_TIME) {
w->state = WALL_DOOR_CLOSING;
d->time = 0;