Game Development Community

Crosshairs dissapearing.

by William M. Johnson · in Torque Game Engine · 06/19/2002 (12:53 pm) · 3 replies

I simply want the crosshairs in the torque demo levels to stay put when I switch to 3rd person mode. I found in game/fps/guicrosshairhud.cc, in the guicrosshairhud's onRender fuction, a section which checks if !conn->isFirstPerson(), and returns from onRender if this checks out:



void GuiCrossHairHud::onRender(Point2I offset, const RectI &updateRect)
{
// Must have a connection and player control object
GameConnection* conn = GameConnection::getServerConnection();
if (!conn)
return;
ShapeBase* control = conn->getControlObject();
if (!control || !(control->getType() & ObjectMask) || !conn->isFirstPerson()) /*<< return;

// Parent render.
Parent::onRender(offset,updateRect);





I simply removed the check for firstperson mode so that the crosshair would still render even in 3rd person mode. The problem is it didn't work, the crosshair still doesn't show. I scanned through the rest of those files, I don't really know what else I missed that could affect this.

Anyone have an idea of what else I need to do?

#1
06/19/2002 (9:58 pm)
umm...
are you sure it rebuilt?
cause it works fine for me.
#2
06/19/2002 (11:11 pm)
Yep, works for me, too...
#3
06/20/2002 (7:25 am)
.....Lord knows how I ended up compiling the exe to the wrong folder. Guess that explains why nothing changed in that other exe I was running.

Thanks for the replys guys.