1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Fix crazy camera stack issues

Turns out, it was an artifact of us suspending the simulation during links
and partly because of Cyan's late adding of the avatar controller to the
sim. Now, we add the avatar as soon as the age data is loaded. This causes
the camera stack to be populated with whatever garbage PhysX decides on,
then xJourneyClothsGen2 is free to set the real stack after we get all the
SDL from the server.

Verified to fix Teledahn oddness and not display a regression in Kemo.
This commit is contained in:
2013-02-08 00:15:56 -05:00
parent 12b2c35561
commit 6ece5e6341
4 changed files with 15 additions and 35 deletions

View File

@ -248,10 +248,7 @@ void plSimulationMgr::Init()
hsAssert(!gTheInstance, "Initializing the sim when it's already been done");
gTheInstance = new plSimulationMgr();
if (gTheInstance->InitSimulation())
{
gTheInstance->RegisterAs(kSimulationMgr_KEY);
plgDispatch::Dispatch()->RegisterForExactType(plAgeLoadedMsg::Index(), gTheInstance->GetKey());
}
else
{
// There was an error when creating the PhysX simulation
@ -267,7 +264,6 @@ void plSimulationMgr::Shutdown()
hsAssert(gTheInstance, "Simulation manager missing during shutdown.");
if (gTheInstance)
{
plgDispatch::Dispatch()->UnRegisterForExactType(plAgeLoadedMsg::Index(), gTheInstance->GetKey());
gTheInstance->UnRegisterAs(kSimulationMgr_KEY); // this will destroy the instance
gTheInstance = nil;
}
@ -624,18 +620,6 @@ void plSimulationMgr::ISendUpdates()
}
}
bool plSimulationMgr::MsgReceive(plMessage *msg)
{
// Suspend/resume the simulation based on whether or not we're in an age...
if (plAgeLoadedMsg* aMsg = plAgeLoadedMsg::ConvertNoRef(msg))
{
fSuspended = !aMsg->fLoaded;
return true;
}
return hsKeyedObject::MsgReceive(msg);
}
/////////////////////////////////////////////////////////////////
//
// RESOLUTION & TIMEOUT PARAMETERS

View File

@ -75,8 +75,6 @@ public:
// Advance the simulation by the given number of seconds
void Advance(float delSecs);
bool MsgReceive(plMessage* msg);
// The simulation won't run at all if it is suspended
void Suspend() { fSuspended = true; }
void Resume() { fSuspended = false; }