Possible "Atlas chunk not loaded" bug?
by Mary Westmacott · in Torque Game Engine Advanced · 03/06/2007 (3:23 pm) · 1 replies
I believe this maybe a bug.
I have a processTick that dynamically swaps blocks of Atlas terrain tiles in and out of the mission, centered on the control object's position. It appears like the engine can begin doing collision processing of the terrain before a terrain tile is completely loaded. The error I get is "AtlasGeomChunkTracer::ctor - need a loaded chunk to work!"
I fixed this problem in AtlasInstanceGeomTOC.cpp about line 492
I added the lines labled "added"
if(getResourceStub(s)->mChunk) //added
{ //added
AtlasGeomChunkTracer agct(getResourceStub(s)->mChunk);
RayInfo ri;
if(agct.castRay(start, end, &ri))
{
if(ri.t < minT)
{
minT = ri.t;
n = ri.normal;
tc = ri.texCoord;
}
retValue = true;
}
} //added
I'm also having a problem that terrain tiles that are loaded before the mission load finishes are added to the mission OK, BUT don't appear in the game. Is there a way to determine programatically when the mission load finishes and the game begins?
I have a processTick that dynamically swaps blocks of Atlas terrain tiles in and out of the mission, centered on the control object's position. It appears like the engine can begin doing collision processing of the terrain before a terrain tile is completely loaded. The error I get is "AtlasGeomChunkTracer::ctor - need a loaded chunk to work!"
I fixed this problem in AtlasInstanceGeomTOC.cpp about line 492
I added the lines labled "added"
if(getResourceStub(s)->mChunk) //added
{ //added
AtlasGeomChunkTracer agct(getResourceStub(s)->mChunk);
RayInfo ri;
if(agct.castRay(start, end, &ri))
{
if(ri.t < minT)
{
minT = ri.t;
n = ri.normal;
tc = ri.texCoord;
}
retValue = true;
}
} //added
I'm also having a problem that terrain tiles that are loaded before the mission load finishes are added to the mission OK, BUT don't appear in the game. Is there a way to determine programatically when the mission load finishes and the game begins?
Torque Owner Bryce "Cogburn" Weiner
You might want to build in a hook that is executed in clientCmdMissionStart (mission.cs) that "activates" your terrain swaps.