mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Merge pull request #1173 from Azaezel/alpha41/hudwerk
allow misc health readouts to detect vehicles
This commit is contained in:
commit
6b1507f791
|
|
@ -147,7 +147,7 @@ void GuiHealthBarHud::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;
|
||||
|
||||
if(mDisplayEnergy)
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ void GuiShapeNameHud::onRender( Point2I, const RectI &updateRect)
|
|||
// Target pos to test, if it's a player run the LOS to his eye
|
||||
// point, otherwise we'll grab the generic box center.
|
||||
Point3F shapePos;
|
||||
if (shape->getTypeMask() & PlayerObjectType)
|
||||
if (shape->getTypeMask() & (PlayerObjectType | VehicleObjectType))
|
||||
{
|
||||
MatrixF eye;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue