Game Development Community

TGEA 1.82 MissionArea Question

by Ronald J Nelson · in Torque Game Engine Advanced · 06/04/2010 (2:45 pm) · 1 replies

I haven't checked in this older versions yet, but is there some reason why the MissionArea is not ghosting? I tested this with a clean version of TGEA 1.82 and the Stronghold mission.

The only changes I added were as follows:

After the includes at the top I added:
#include "T3D/missionArea.h"


Then in bool TerrainBlock::onAdd() right after

setRenderTransform(mObjToWorld);

I added:

SimObject* missionAreaObj = 	Sim::findObject("MissionAreaObject");
   MissionArea * obj = dynamic_cast<MissionArea*>(missionAreaObj); 
   Con::errorf("******************LOOKING FOR MISSION AREA!!!*********************");
   if (obj)
   {
	   if(isServerObject())
		   Con::errorf("Server MissionArea found!");
	   else
		   Con::errorf("Client MissionArea found!");
   }

I also noticed that besides "MissionAreaObject" the same function has been used looking for the name "GlobalMissionArea". Like I said BOTH names being used to look for the same object. Yes I tried both names in my code above with the same results and yes I made sure the MissionArea object was named those during those tests.

In both tests over a network, the server finds the MissionArea, but the client does not.

#1
08/31/2014 (12:30 am)
Sorry if thread necro is forbidden, but I have a handy bit of info that might save someone else a precious couple of hours.

Assuming all you're after is the MissionArea's bounds, you can easily access them on the client end like so:

RectI area = MissionArea::smMissionArea;

This seems to produce correct results for both the server and the client.