Skip to content

Commit 93fd437

Browse files
committed
Revert "Fix lockups in Hexen and Strife when playing with more than four"
This reverts commit d6693cc.
1 parent 3ce5035 commit 93fd437

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed

src/hexen/p_enemy.c

+2-10
Original file line numberDiff line numberDiff line change
@@ -534,16 +534,8 @@ boolean P_LookForPlayers(mobj_t * actor, boolean allaround)
534534
return (P_LookForMonsters(actor));
535535
}
536536
c = 0;
537-
538-
// NOTE: This behavior has been changed from the Vanilla behavior, where
539-
// an infinite loop can occur if players 0-3 all quit the game. Although
540-
// technically this is not what Vanilla does, fixing this is highly
541-
// desirable, and having the game simply lock up is not acceptable.
542-
// stop = (actor->lastlook - 1) & 3;
543-
// for (;; actor->lastlook = (actor->lastlook + 1) & 3)
544-
545-
stop = (actor->lastlook + maxplayers - 1) % maxplayers;
546-
for (;; actor->lastlook = (actor->lastlook + 1) % maxplayers)
537+
stop = (actor->lastlook - 1) & 3;
538+
for (;; actor->lastlook = (actor->lastlook + 1) & 3)
547539
{
548540
if (!playeringame[actor->lastlook])
549541
continue;

src/strife/p_enemy.c

+2-10
Original file line numberDiff line numberDiff line change
@@ -787,17 +787,9 @@ P_LookForPlayers
787787
}
788788

789789
c = 0;
790+
stop = (actor->lastlook-1)&3;
790791

791-
// NOTE: This behavior has been changed from the Vanilla behavior, where
792-
// an infinite loop can occur if players 0-3 all quit the game. Although
793-
// technically this is not what Vanilla does, fixing this is highly
794-
// desirable, and having the game simply lock up is not acceptable.
795-
// stop = (actor->lastlook - 1) & 3;
796-
// for (;; actor->lastlook = (actor->lastlook + 1) & 3)
797-
798-
stop = (actor->lastlook + MAXPLAYERS - 1) % MAXPLAYERS;
799-
800-
for ( ; ; actor->lastlook = (actor->lastlook + 1) % MAXPLAYERS)
792+
for ( ; ; actor->lastlook = (actor->lastlook+1)&3 )
801793
{
802794
if (!playeringame[actor->lastlook])
803795
continue;

0 commit comments

Comments
 (0)