mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Merge pull request #302 from Hoikas/camera
Fix Teledahn and Kemo Camera Issues
This commit is contained in:
@ -1666,19 +1666,9 @@ void plVirtualCam1::PushCamera(plCameraModifier1* pCam, bool bDefault)
|
|||||||
|
|
||||||
void plVirtualCam1::PopCamera(plCameraModifier1* pCam)
|
void plVirtualCam1::PopCamera(plCameraModifier1* pCam)
|
||||||
{
|
{
|
||||||
// sanity / new default camera check
|
// sanity / new default camera check
|
||||||
if (fCameraStack.size() <= 1)
|
if (fCameraStack.size() <= 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Crazy Special Casing Turd: [based on some Cyan crap]
|
|
||||||
// is it the current camera AND the same camera we would otherwise switch to?
|
|
||||||
// if so, pop off the dupe if we're going to the age default... otherwise, go crazy.
|
|
||||||
if (fCameraStack.size() > 2 && pCam == GetCurrentStackCamera())
|
|
||||||
{
|
|
||||||
int theDupe = fCameraStack.size() - 1;
|
|
||||||
if (pCam == fCameraStack[theDupe] && theDupe == 2)
|
|
||||||
fCameraStack.pop_back();
|
|
||||||
}
|
|
||||||
|
|
||||||
// are we mouse-looking?
|
// are we mouse-looking?
|
||||||
bool mLook = false;
|
bool mLook = false;
|
||||||
|
@ -1370,20 +1370,27 @@ bool plArmatureMod::MsgReceive(plMessage* msg)
|
|||||||
IFireBehaviorNotify(plHBehavior::kBehaviorTypeLinkIn, false);
|
IFireBehaviorNotify(plHBehavior::kBehaviorTypeLinkIn, false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
plAgeLoadedMsg *ageLoadMsg = plAgeLoadedMsg::ConvertNoRef(msg);
|
plAgeLoadedMsg *ageLoadMsg = plAgeLoadedMsg::ConvertNoRef(msg);
|
||||||
if (ageLoadMsg)
|
if (ageLoadMsg)
|
||||||
{
|
{
|
||||||
if (ageLoadMsg->fLoaded)
|
if (ageLoadMsg->fLoaded)
|
||||||
{
|
|
||||||
// only the local player gets these
|
// only the local player gets these
|
||||||
NetworkSynch(hsTimer::GetSysSeconds(), true);
|
NetworkSynch(hsTimer::GetSysSeconds(), true);
|
||||||
EnablePhysics(true);
|
else
|
||||||
} else
|
|
||||||
fIsLinkedIn = false;
|
fIsLinkedIn = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plAgeLoaded2Msg *agePreLoadMsg = plAgeLoaded2Msg::ConvertNoRef(msg);
|
||||||
|
if (agePreLoadMsg)
|
||||||
|
{
|
||||||
|
// all the age data is loaded -- add our physical controller to the age
|
||||||
|
ValidatePhysics();
|
||||||
|
EnablePhysics(true);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
plAnimCmdMsg *cmdMsg = plAnimCmdMsg::ConvertNoRef(msg);
|
plAnimCmdMsg *cmdMsg = plAnimCmdMsg::ConvertNoRef(msg);
|
||||||
if (cmdMsg)
|
if (cmdMsg)
|
||||||
{
|
{
|
||||||
@ -1651,7 +1658,8 @@ void plArmatureMod::AddTarget(plSceneObject* so)
|
|||||||
// non-players will unregister when they learn the truth.
|
// non-players will unregister when they learn the truth.
|
||||||
if (IsLocallyOwned())
|
if (IsLocallyOwned())
|
||||||
plgDispatch::Dispatch()->RegisterForExactType(plAgeLoadedMsg::Index(), GetKey());
|
plgDispatch::Dispatch()->RegisterForExactType(plAgeLoadedMsg::Index(), GetKey());
|
||||||
|
plgDispatch::Dispatch()->RegisterForType(plAgeLoaded2Msg::Index(), GetKey());
|
||||||
|
|
||||||
// attach a clothingSDLModifier to handle clothing saveState
|
// attach a clothingSDLModifier to handle clothing saveState
|
||||||
delete fClothingSDLMod;
|
delete fClothingSDLMod;
|
||||||
fClothingSDLMod = new plClothingSDLModifier;
|
fClothingSDLMod = new plClothingSDLModifier;
|
||||||
|
@ -248,10 +248,7 @@ void plSimulationMgr::Init()
|
|||||||
hsAssert(!gTheInstance, "Initializing the sim when it's already been done");
|
hsAssert(!gTheInstance, "Initializing the sim when it's already been done");
|
||||||
gTheInstance = new plSimulationMgr();
|
gTheInstance = new plSimulationMgr();
|
||||||
if (gTheInstance->InitSimulation())
|
if (gTheInstance->InitSimulation())
|
||||||
{
|
|
||||||
gTheInstance->RegisterAs(kSimulationMgr_KEY);
|
gTheInstance->RegisterAs(kSimulationMgr_KEY);
|
||||||
plgDispatch::Dispatch()->RegisterForExactType(plAgeLoadedMsg::Index(), gTheInstance->GetKey());
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// There was an error when creating the PhysX simulation
|
// There was an error when creating the PhysX simulation
|
||||||
@ -267,7 +264,6 @@ void plSimulationMgr::Shutdown()
|
|||||||
hsAssert(gTheInstance, "Simulation manager missing during shutdown.");
|
hsAssert(gTheInstance, "Simulation manager missing during shutdown.");
|
||||||
if (gTheInstance)
|
if (gTheInstance)
|
||||||
{
|
{
|
||||||
plgDispatch::Dispatch()->UnRegisterForExactType(plAgeLoadedMsg::Index(), gTheInstance->GetKey());
|
|
||||||
gTheInstance->UnRegisterAs(kSimulationMgr_KEY); // this will destroy the instance
|
gTheInstance->UnRegisterAs(kSimulationMgr_KEY); // this will destroy the instance
|
||||||
gTheInstance = nil;
|
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
|
// RESOLUTION & TIMEOUT PARAMETERS
|
||||||
|
@ -75,8 +75,6 @@ public:
|
|||||||
// Advance the simulation by the given number of seconds
|
// Advance the simulation by the given number of seconds
|
||||||
void Advance(float delSecs);
|
void Advance(float delSecs);
|
||||||
|
|
||||||
bool MsgReceive(plMessage* msg);
|
|
||||||
|
|
||||||
// The simulation won't run at all if it is suspended
|
// The simulation won't run at all if it is suspended
|
||||||
void Suspend() { fSuspended = true; }
|
void Suspend() { fSuspended = true; }
|
||||||
void Resume() { fSuspended = false; }
|
void Resume() { fSuspended = false; }
|
||||||
|
Reference in New Issue
Block a user