mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-24 21:11:52 +00:00
Fixed problem in CheckForShadows().
Fixed a regression in CheckForShadows() that made it always return a +SHADOW or +SHADOWBLOCK actor even when there were none. Causing monsters to always have messy aim if +DOSHADOWBLOCK is on.
This commit is contained in:
parent
568a39d203
commit
2c9b8f4eec
1 changed files with 1 additions and 0 deletions
|
@ -88,6 +88,7 @@ inline AActor* CheckForShadows(AActor* self, AActor* other, DVector3 pos, double
|
|||
if ((other && (other->flags & MF_SHADOW)) || (self->flags9 & MF9_DOSHADOWBLOCK))
|
||||
{
|
||||
AActor* shadowBlock = P_CheckForShadowBlock(self, other, pos, penaltyFactor);
|
||||
if (other && !(other->flags & MF_SHADOW)) other = nullptr; //Other doesn't have MF_SHADOW, so don't count them as a valid return.
|
||||
return shadowBlock ? shadowBlock : other;
|
||||
}
|
||||
return nullptr;
|
||||
|
|
Loading…
Reference in a new issue