mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -04:00
Short circuit friend list error (#1805)
Co-authored-by: kraflab <kraflab@gmail.com>
This commit is contained in:
parent
296198196c
commit
b7f1eba406
@ -944,6 +944,17 @@ static boolean P_LookForMonsters(mobj_t *actor, boolean allaround)
|
||||
current_actor = actor;
|
||||
current_allaround = allaround;
|
||||
|
||||
// There is a bug in cl11+ that causes the player to get added
|
||||
// to the monster friend list when damaged to below 50% health.
|
||||
// This causes all monsters to believe friend monsters exist.
|
||||
// The search algorithm is expensive and massively so on maps with many monsters.
|
||||
// We still need to match rng calls for demo sync, but PIT_FindTarget is a no op.
|
||||
if (((mobj_t *) cap->cnext)->player && cap->cnext == cap->cprev)
|
||||
{
|
||||
P_Random(pr_friends);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Search first in the immediate vicinity.
|
||||
|
||||
if (!P_BlockThingsIterator(x, y, PIT_FindTarget))
|
||||
|
Loading…
x
Reference in New Issue
Block a user