allow misc health readouts to detect vehicles

This commit is contained in:
AzaezelX 2024-01-07 19:05:12 -06:00
parent d22b7c7121
commit 22df872f2d
3 changed files with 3 additions and 3 deletions

View file

@ -149,7 +149,7 @@ void GuiHealthTextHud::onRender(Point2I offset, const RectI &updateRect)
if (!conn)
return;
ShapeBase* control = dynamic_cast<ShapeBase*>(conn->getControlObject());
if (!control || !(control->getTypeMask() & PlayerObjectType))
if (!control || !(control->getTypeMask() & (PlayerObjectType | VehicleObjectType)))
return;
// Just grab the damage/energy right off the control object.