Game Development Community

T3D 1.1 Preview - Setting a Marker as ControlObject Causes Crash - LOGGED (THREED-1575)

by Steve Acaster · in Torque 3D Professional · 04/10/2011 (1:21 pm) · 4 replies

T3D 1.1 Preview

win7 32bit

target:
controlObject and markers

Issue:
Setting a Marker as a controlObject causes a crash.

Repeat:
Spawn player in-game and set the player controlObject to a marker/spawnsphere or other non-networked object.
%myPlayerID.setControlObject(%myMarkerID);
//or
%myClientID.setControlObject(%myMarkerID);

Suggest:
Stop the crash. Either by refusing to let it occur like it currently does with non-networked objects like TsStatics, or by allowing it to happen.

Previously I had used setting a controlObject as a marker as a quick way to take control from the player.


#1
04/10/2011 (2:06 pm)
Quote:
Previously I had used setting a controlObject as a marker as a quick way to take control from the player.
That's a nifty idea there... too bad it got bugified.
#2
04/11/2011 (6:23 am)
Logged as THREED-1575.
#3
04/19/2011 (5:43 pm)
Hey Steve, do me a favor...

Found a fix for it, but want to make sure this fix doesn't trigger another bug...

Make the following change to \Engine\source\T3D\shapeBase.cpp...

// use eye rather than camera transform (good enough and faster)
   MatrixF eyeTransform;
   getEyeTransform(&eyeTransform);
   eyeTransform.getColumn(3, &query->pos);
   eyeTransform.getColumn(1, &query->orientation);

   // Get the visible distance.
	if (getSceneManager() != NULL) //<-- NULL CHECK ADDED
		query->visibleDistance = getSceneManager()->getVisibleDistance();

It's a simple fix, but it worked out just fine for me. If you could test it out to make sure there's not something I'm missing, I'd really appreciate it. : )
#4
04/19/2011 (6:49 pm)
Seems good. :)

No crash, can flick back and forth between multiple control objects without any problems.