fix F32 Camera::getDamageFlash() recursion

if for some reason a camera ends up orbiting itself or another camera, make sure we don't look to the camera orbiting the camera orbiting the....
This commit is contained in:
AzaezelX 2026-04-19 17:45:57 -05:00
parent 10cff00c23
commit de709a5022
2 changed files with 2 additions and 2 deletions

View file

@ -1144,7 +1144,7 @@ F32 afxCamera::getDamageFlash() const
{
const GameBase *castObj = mOrbitObject;
const ShapeBase* psb = dynamic_cast<const ShapeBase*>(castObj);
if (psb)
if (psb && !(dynamic_cast<const Camera*>(psb) || dynamic_cast<const afxCamera*>(psb)) )
return psb->getDamageFlash();
}