Revert "Try to fix P_LookForPlayers lock up on empty servers"

I did a better fix and this does nothing but break player 32
This reverts commit d621a0f0c4.
This commit is contained in:
NepDisk 2025-12-15 10:40:59 -05:00
parent cbc895a3a7
commit 328aca3d28
3 changed files with 4 additions and 5 deletions

View file

@ -196,7 +196,6 @@ extern char logfilename[1024];
// NOTE: it needs more than this to increase the number of players...
#define MAXPLAYERS 32 // 32 + host slot
#define PLAYERSMASK (MAXPLAYERS-1)
#define MAXPLAYERNAME 21
#define MAXSPLITSCREENPLAYERS 4 // Max number of players on a single computer
#define MAXGAMEPADS (MAXSPLITSCREENPLAYERS * 2) // Number of gamepads we'll be allowing

View file

@ -452,7 +452,7 @@ boolean P_LookForPlayers(mobj_t *actor, boolean allaround, boolean tracer, fixed
actor->lastlook %= MAXPLAYERS;
stop = (actor->lastlook - 1) % PLAYERSMASK;
stop = (actor->lastlook - 1) % MAXPLAYERS;
// No players? Don't bother.
for (i = 0; i < MAXPLAYERS; i++)
@ -466,7 +466,7 @@ boolean P_LookForPlayers(mobj_t *actor, boolean allaround, boolean tracer, fixed
if (!pcount)
return false;
for (; ; actor->lastlook = (actor->lastlook + 1) % PLAYERSMASK)
for (; ; actor->lastlook = (actor->lastlook + 1) % MAXPLAYERS)
{
// done looking
if (actor->lastlook == stop)

View file

@ -4278,7 +4278,7 @@ boolean P_BossTargetPlayer(mobj_t *actor, boolean closest)
// first time init, this allow minimum lastlook changes
if (actor->lastlook < 0)
actor->lastlook = P_RandomByte();
actor->lastlook %= PLAYERSMASK;
actor->lastlook %= MAXPLAYERS;
// No players? Don't bother.
for (i = 0; i < MAXPLAYERS; i++)
@ -4292,7 +4292,7 @@ boolean P_BossTargetPlayer(mobj_t *actor, boolean closest)
if (!pcount)
return false;
for( ; ; actor->lastlook = (actor->lastlook+1) % PLAYERSMASK)
for( ; ; actor->lastlook = (actor->lastlook+1) % MAXPLAYERS)
{
// save the first look so we stop next time.
if (stop < 0)