Update guiCrossHairHud.cpp

This commit is contained in:
marauder2k7 2025-06-18 17:08:40 +01:00
parent 6f9c4158d8
commit b5cd9d0c73

View file

@ -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();
} }