File tree 2 files changed +4
-20
lines changed
2 files changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -534,16 +534,8 @@ boolean P_LookForPlayers(mobj_t * actor, boolean allaround)
534
534
return (P_LookForMonsters (actor ));
535
535
}
536
536
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 )
547
539
{
548
540
if (!playeringame [actor -> lastlook ])
549
541
continue ;
Original file line number Diff line number Diff line change @@ -787,17 +787,9 @@ P_LookForPlayers
787
787
}
788
788
789
789
c = 0 ;
790
+ stop = (actor -> lastlook - 1 )& 3 ;
790
791
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 )
801
793
{
802
794
if (!playeringame [actor -> lastlook ])
803
795
continue ;
You can’t perform that action at this time.
0 commit comments