mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
Update guiCrossHairHud.cpp
This commit is contained in:
parent
6f9c4158d8
commit
b5cd9d0c73
1 changed files with 4 additions and 4 deletions
|
|
@ -131,9 +131,9 @@ void GuiCrossHairHud::onRender(Point2I offset, const RectI &updateRect)
|
||||||
GameConnection* conn = GameConnection::getConnectionToServer();
|
GameConnection* conn = GameConnection::getConnectionToServer();
|
||||||
if (!conn)
|
if (!conn)
|
||||||
return;
|
return;
|
||||||
/*GameBase* control = dynamic_cast<GameBase*>(conn->getCameraObject());
|
GameBase* control = dynamic_cast<GameBase*>(conn->getCameraObject());
|
||||||
if (!control || !(control->getTypeMask() & ObjectMask) || !conn->isFirstPerson())
|
if (!control || !(control->getTypeMask() & ObjectMask) || !conn->isFirstPerson())
|
||||||
return;*/
|
return;
|
||||||
|
|
||||||
// Parent render.
|
// Parent render.
|
||||||
Parent::onRender(offset,updateRect);
|
Parent::onRender(offset,updateRect);
|
||||||
|
|
@ -153,7 +153,7 @@ void GuiCrossHairHud::onRender(Point2I offset, const RectI &updateRect)
|
||||||
// Collision info. We're going to be running LOS tests and we
|
// Collision info. We're going to be running LOS tests and we
|
||||||
// don't want to collide with the control object.
|
// don't want to collide with the control object.
|
||||||
static U32 losMask = TerrainObjectType | ShapeBaseObjectType | StaticShapeObjectType;
|
static U32 losMask = TerrainObjectType | ShapeBaseObjectType | StaticShapeObjectType;
|
||||||
//control->disableCollision();
|
control->disableCollision();
|
||||||
|
|
||||||
RayInfo info;
|
RayInfo info;
|
||||||
if (gClientContainer.castRay(camPos, endPos, losMask, &info)) {
|
if (gClientContainer.castRay(camPos, endPos, losMask, &info)) {
|
||||||
|
|
@ -220,7 +220,7 @@ void GuiCrossHairHud::onRender(Point2I offset, const RectI &updateRect)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Restore control object collision
|
// Restore control object collision
|
||||||
//control->enableCollision();
|
control->enableCollision();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue