mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
allow misc health readouts to detect vehicles
This commit is contained in:
parent
d22b7c7121
commit
22df872f2d
3 changed files with 3 additions and 3 deletions
|
|
@ -147,7 +147,7 @@ void GuiHealthBarHud::onRender(Point2I offset, const RectI &updateRect)
|
||||||
if (!conn)
|
if (!conn)
|
||||||
return;
|
return;
|
||||||
ShapeBase* control = dynamic_cast<ShapeBase*>(conn->getControlObject());
|
ShapeBase* control = dynamic_cast<ShapeBase*>(conn->getControlObject());
|
||||||
if (!control || !(control->getTypeMask() & PlayerObjectType))
|
if (!control || !(control->getTypeMask() & (PlayerObjectType | VehicleObjectType)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(mDisplayEnergy)
|
if(mDisplayEnergy)
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ void GuiHealthTextHud::onRender(Point2I offset, const RectI &updateRect)
|
||||||
if (!conn)
|
if (!conn)
|
||||||
return;
|
return;
|
||||||
ShapeBase* control = dynamic_cast<ShapeBase*>(conn->getControlObject());
|
ShapeBase* control = dynamic_cast<ShapeBase*>(conn->getControlObject());
|
||||||
if (!control || !(control->getTypeMask() & PlayerObjectType))
|
if (!control || !(control->getTypeMask() & (PlayerObjectType | VehicleObjectType)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Just grab the damage/energy right off the control object.
|
// 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
|
// Target pos to test, if it's a player run the LOS to his eye
|
||||||
// point, otherwise we'll grab the generic box center.
|
// point, otherwise we'll grab the generic box center.
|
||||||
Point3F shapePos;
|
Point3F shapePos;
|
||||||
if (shape->getTypeMask() & PlayerObjectType)
|
if (shape->getTypeMask() & (PlayerObjectType | VehicleObjectType))
|
||||||
{
|
{
|
||||||
MatrixF eye;
|
MatrixF eye;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue