Game Development Community

Engine crashes with precipitation object.

by Markus Nuebel · in Torque Game Engine · 12/23/2003 (12:51 am) · 4 replies

When you add a precipitation object. e.g. HeavyRain to a scene and this object is active during mission start (SinglePlay), the engine crashes in precipitation.cc at the line:
control->getCameraTransform(&pos, &camMat);
(conrol is null)

The problem is, that the advanceTime method of Precipitation is called, before the player has connected to the game and a not null control object is set on the gameconnection object.

I think a check, similar to the one:
GameConnection * con = GameConnection::getServerConnection();
   if(!con)
      return;

has to be added for the control object, too:

ShapeBase* control = con->getControlObject();
   if(!control)
	return;


Best regards
-- Markus

#1
12/23/2003 (3:14 am)
Maybe it's still Hobbiticus' bug?
#2
12/25/2003 (1:59 am)
Yes, it seems so.

Will the fix make it into HEAD?

-- Markus
#3
12/26/2003 (11:28 am)
Yep, that's the one. I sent Tim Gift a copy for review a few days ago, waiting for the ok on him or for him to just commit it himself.
#4
12/26/2003 (6:20 pm)
According to Tim's plan he won't be back until Monday.