mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
Some converts of usage of Shapebase for Gamebase to make camera/control object swapping easier.
This commit is contained in:
parent
74a2005d15
commit
553cf260f1
2 changed files with 2 additions and 2 deletions
|
|
@ -117,7 +117,7 @@ void GuiCrossHairHud::onRender(Point2I offset, const RectI &updateRect)
|
||||||
GameConnection* conn = GameConnection::getConnectionToServer();
|
GameConnection* conn = GameConnection::getConnectionToServer();
|
||||||
if (!conn)
|
if (!conn)
|
||||||
return;
|
return;
|
||||||
ShapeBase* control = dynamic_cast<ShapeBase*>(conn->getControlObject());
|
GameBase* control = dynamic_cast<GameBase*>(conn->getCameraObject());
|
||||||
if (!control || !(control->getTypeMask() & ObjectMask) || !conn->isFirstPerson())
|
if (!control || !(control->getTypeMask() & ObjectMask) || !conn->isFirstPerson())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -339,7 +339,7 @@ bool GameProcessCameraQuery(CameraQuery *query)
|
||||||
|
|
||||||
if (connection && connection->getControlCameraTransform(0.032f, &query->cameraMatrix))
|
if (connection && connection->getControlCameraTransform(0.032f, &query->cameraMatrix))
|
||||||
{
|
{
|
||||||
query->object = dynamic_cast<ShapeBase*>(connection->getControlObject());
|
query->object = dynamic_cast<GameBase*>(connection->getCameraObject());
|
||||||
query->nearPlane = gClientSceneGraph->getNearClip();
|
query->nearPlane = gClientSceneGraph->getNearClip();
|
||||||
|
|
||||||
// Scale the normal visible distance by the performance
|
// Scale the normal visible distance by the performance
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue