mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Merge remote-tracking branch 'origin/master' into plString
Conflicts: Sources/Plasma/CoreLib/hsStream.h Sources/Plasma/FeatureLib/pfAudio/plListener.cpp Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp Sources/Plasma/FeatureLib/pfPython/cyMisc.h Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.h Sources/Plasma/FeatureLib/pfPython/pyImage.cpp Sources/Plasma/FeatureLib/pfPython/pyJournalBook.cpp Sources/Plasma/FeatureLib/pfPython/pyNetServerSessionInfo.h Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.h Sources/Plasma/NucleusLib/pnMessage/plMessage.h Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpansExport.cpp Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.cpp Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.h Sources/Plasma/PubUtilLib/plNetCommon/plClientGuid.h Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.cpp Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.h Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.h Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.cpp Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.h Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.h Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.h Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.cpp
This commit is contained in:
@ -67,7 +67,7 @@ void pfMarkerInfo::Init()
|
||||
plResManager* resMgr = (plResManager*)hsgResMgr::ResMgr();
|
||||
|
||||
// Force the client to keep the GlobalMarkers keys loaded, so we don't load them every time we clone
|
||||
plClientMsg* loadAgeKeysMsg = TRACKED_NEW plClientMsg(plClientMsg::kLoadAgeKeys);
|
||||
plClientMsg* loadAgeKeysMsg = new plClientMsg(plClientMsg::kLoadAgeKeys);
|
||||
loadAgeKeysMsg->SetAgeName("GlobalMarkers");
|
||||
loadAgeKeysMsg->Send(resMgr->FindKey(kClient_KEY));
|
||||
|
||||
@ -112,7 +112,7 @@ void pfMarkerInfo::Spawn(MarkerType type)
|
||||
fType = type;
|
||||
fLastChange = 0;
|
||||
|
||||
plLoadCloneMsg* cloneMsg = TRACKED_NEW plLoadCloneMsg(fMarkerUoid, pfMarkerMgr::Instance()->GetKey(), 0);
|
||||
plLoadCloneMsg* cloneMsg = new plLoadCloneMsg(fMarkerUoid, pfMarkerMgr::Instance()->GetKey(), 0);
|
||||
cloneMsg->SetBCastFlag(plMessage::kNetPropagate, false);
|
||||
fKey = cloneMsg->GetCloneKey();
|
||||
|
||||
@ -133,7 +133,7 @@ void pfMarkerInfo::InitSpawned(plKey markerKey)
|
||||
hsMatrix44 pos;
|
||||
pos.Reset();
|
||||
pos.SetTranslate(&fPosition);
|
||||
plWarpMsg* warpMsg = TRACKED_NEW plWarpMsg(pfMarkerMgr::Instance()->GetKey(), fKey, plWarpMsg::kFlushTransform, pos);
|
||||
plWarpMsg* warpMsg = new plWarpMsg(pfMarkerMgr::Instance()->GetKey(), fKey, plWarpMsg::kFlushTransform, pos);
|
||||
warpMsg->Send();
|
||||
|
||||
// update its state
|
||||
@ -148,7 +148,7 @@ void pfMarkerInfo::Show(bool show)
|
||||
fVisible = show;
|
||||
|
||||
if (fSpawned) {
|
||||
plEnableMsg* msg = TRACKED_NEW plEnableMsg;
|
||||
plEnableMsg* msg = new plEnableMsg;
|
||||
msg->SetBCastFlag(plMessage::kPropagateToChildren);
|
||||
msg->SetCmd(plEnableMsg::kDrawable);
|
||||
msg->SetCmd(plEnableMsg::kPhysical);
|
||||
@ -183,7 +183,7 @@ void pfMarkerInfo::Remove()
|
||||
{
|
||||
if (fKey)
|
||||
{
|
||||
plLoadCloneMsg* cloneMsg = TRACKED_NEW plLoadCloneMsg(fKey, pfMarkerMgr::Instance()->GetKey(), 0, false);
|
||||
plLoadCloneMsg* cloneMsg = new plLoadCloneMsg(fKey, pfMarkerMgr::Instance()->GetKey(), 0, false);
|
||||
cloneMsg->SetBCastFlag(plMessage::kNetPropagate, false);
|
||||
cloneMsg->Send();
|
||||
|
||||
@ -210,7 +210,7 @@ void pfMarkerInfo::IPlayBounce(bool play)
|
||||
if (fMod && fSpawned)
|
||||
{
|
||||
// Send anim start/stop msg
|
||||
plAnimCmdMsg* animMsg = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg* animMsg = new plAnimCmdMsg;
|
||||
animMsg->SetCmd(play ? plAnimCmdMsg::kContinue : plAnimCmdMsg::kStop);
|
||||
animMsg->SetCmd(plAnimCmdMsg::kSetLooping);
|
||||
animMsg->SetCmd(plAnimCmdMsg::kGoToBegin);
|
||||
@ -242,7 +242,7 @@ void pfMarkerInfo::IPlayColor(bool play)
|
||||
break;
|
||||
}
|
||||
|
||||
plAnimCmdMsg* animMsg = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg* animMsg = new plAnimCmdMsg;
|
||||
animMsg->SetCmd(play ? plAnimCmdMsg::kContinue : plAnimCmdMsg::kStop);
|
||||
animMsg->SetCmd(plAnimCmdMsg::kSetLooping);
|
||||
animMsg->SetCmd(plAnimCmdMsg::kGoToBegin);
|
||||
@ -258,7 +258,7 @@ void pfMarkerInfo::IPlaySound(bool place)
|
||||
{
|
||||
const plAudioInterface* ai = fMod->GetTarget()->GetAudioInterface();
|
||||
|
||||
plSoundMsg* msg = TRACKED_NEW plSoundMsg;
|
||||
plSoundMsg* msg = new plSoundMsg;
|
||||
msg->fIndex = place ? fMod->fPlaceSndIdx : fMod->fHitSndIdx;
|
||||
msg->SetCmd(plSoundMsg::kPlay);
|
||||
msg->SetSender(pfMarkerMgr::Instance()->GetKey());
|
||||
|
@ -56,13 +56,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
pfMarkerMgr* pfMarkerMgr::fInstance = nil;
|
||||
const UInt32 pfMarkerMgr::kNoMarkerSelected = (UInt32)(-1);
|
||||
const uint32_t pfMarkerMgr::kNoMarkerSelected = (uint32_t)(-1);
|
||||
|
||||
pfMarkerMgr* pfMarkerMgr::Instance()
|
||||
{
|
||||
if (!pfMarkerMgr::fInstance)
|
||||
{
|
||||
pfMarkerMgr::fInstance = TRACKED_NEW pfMarkerMgr;
|
||||
pfMarkerMgr::fInstance = new pfMarkerMgr;
|
||||
pfMarkerMgr::fInstance->IInit();
|
||||
}
|
||||
|
||||
@ -99,11 +99,11 @@ void pfMarkerMgr::IInit()
|
||||
|
||||
void pfMarkerMgr::IShutdown()
|
||||
{
|
||||
std::map<UInt32, pfMarkerInfo*>::iterator curMarker = fMarkers.begin();
|
||||
std::map<uint32_t, pfMarkerInfo*>::iterator curMarker = fMarkers.begin();
|
||||
while (curMarker != fMarkers.end())
|
||||
{
|
||||
curMarker->second->Remove();
|
||||
DEL(curMarker->second);
|
||||
delete curMarker->second;
|
||||
++curMarker;
|
||||
}
|
||||
fMarkers.clear();
|
||||
@ -112,9 +112,9 @@ void pfMarkerMgr::IShutdown()
|
||||
UnRegisterAs(kMarkerMgr_KEY);
|
||||
}
|
||||
|
||||
pfMarkerInfo* pfMarkerMgr::IFindMarker(plKey markerKey, UInt32& id)
|
||||
pfMarkerInfo* pfMarkerMgr::IFindMarker(plKey markerKey, uint32_t& id)
|
||||
{
|
||||
std::map<UInt32, pfMarkerInfo*>::iterator curMarker = fMarkers.begin();
|
||||
std::map<uint32_t, pfMarkerInfo*>::iterator curMarker = fMarkers.begin();
|
||||
while (curMarker != fMarkers.end())
|
||||
{
|
||||
if (curMarker->second->GetKey() == markerKey)
|
||||
@ -131,7 +131,7 @@ pfMarkerInfo* pfMarkerMgr::IFindMarker(plKey markerKey, UInt32& id)
|
||||
void pfMarkerMgr::IUpdate()
|
||||
{
|
||||
// Update all markers
|
||||
std::map<UInt32, pfMarkerInfo*>::iterator curMarker = fMarkers.begin();
|
||||
std::map<uint32_t, pfMarkerInfo*>::iterator curMarker = fMarkers.begin();
|
||||
while (curMarker != fMarkers.end())
|
||||
{
|
||||
curMarker->second->Update(hsTimer::GetSeconds());
|
||||
@ -145,7 +145,7 @@ void pfMarkerMgr::IMarkerHit(plKey markerKey, plKey playerKey)
|
||||
return; // not the local player, abort
|
||||
|
||||
// make sure the marker isn't frozen
|
||||
UInt32 id;
|
||||
uint32_t id;
|
||||
pfMarkerInfo* hitMarker = IFindMarker(markerKey, id);
|
||||
if (!hitMarker)
|
||||
return; // abort, something weird is going on
|
||||
@ -153,42 +153,42 @@ void pfMarkerMgr::IMarkerHit(plKey markerKey, plKey playerKey)
|
||||
return; // marker frozen, abort
|
||||
|
||||
// tell people about it
|
||||
pfMarkerMsg* msg = TRACKED_NEW pfMarkerMsg;
|
||||
pfMarkerMsg* msg = new pfMarkerMsg;
|
||||
msg->fType = pfMarkerMsg::kMarkerCaptured;
|
||||
msg->fMarkerID = id;
|
||||
msg->Send();
|
||||
}
|
||||
|
||||
void pfMarkerMgr::AddMarker(double x, double y, double z, UInt32 id, bool justCreated)
|
||||
void pfMarkerMgr::AddMarker(double x, double y, double z, uint32_t id, bool justCreated)
|
||||
{
|
||||
if (fMarkers.find(id) != fMarkers.end())
|
||||
{
|
||||
// delete existing one if we're changing its location
|
||||
fMarkers[id]->Remove();
|
||||
DEL(fMarkers[id]);
|
||||
delete fMarkers[id];
|
||||
}
|
||||
|
||||
hsPoint3 pos((hsScalar)x, (hsScalar)y, (hsScalar)z);
|
||||
fMarkers[id] = TRACKED_NEW pfMarkerInfo(pos, justCreated);
|
||||
hsPoint3 pos((float)x, (float)y, (float)z);
|
||||
fMarkers[id] = new pfMarkerInfo(pos, justCreated);
|
||||
fMarkers[id]->Spawn(pfMarkerInfo::kMarkerOpen);
|
||||
}
|
||||
|
||||
void pfMarkerMgr::RemoveMarker(UInt32 id)
|
||||
void pfMarkerMgr::RemoveMarker(uint32_t id)
|
||||
{
|
||||
if (fMarkers.find(id) == fMarkers.end())
|
||||
return;
|
||||
fMarkers[id]->Remove();
|
||||
DEL(fMarkers[id]);
|
||||
delete fMarkers[id];
|
||||
fMarkers.erase(id);
|
||||
}
|
||||
|
||||
void pfMarkerMgr::RemoveAllMarkers()
|
||||
{
|
||||
std::map<UInt32, pfMarkerInfo*>::iterator curMarker = fMarkers.begin();
|
||||
std::map<uint32_t, pfMarkerInfo*>::iterator curMarker = fMarkers.begin();
|
||||
while (curMarker != fMarkers.end())
|
||||
{
|
||||
curMarker->second->Remove();
|
||||
DEL(curMarker->second);
|
||||
delete curMarker->second;
|
||||
++curMarker;
|
||||
}
|
||||
fMarkers.clear();
|
||||
@ -204,7 +204,7 @@ void pfMarkerMgr::ClearSelectedMarker()
|
||||
}
|
||||
}
|
||||
|
||||
void pfMarkerMgr::SetSelectedMarker(UInt32 id)
|
||||
void pfMarkerMgr::SetSelectedMarker(uint32_t id)
|
||||
{
|
||||
ClearSelectedMarker();
|
||||
|
||||
@ -218,13 +218,13 @@ void pfMarkerMgr::SetSelectedMarker(UInt32 id)
|
||||
}
|
||||
}
|
||||
|
||||
UInt32 pfMarkerMgr::GetSelectedMarker()
|
||||
uint32_t pfMarkerMgr::GetSelectedMarker()
|
||||
{
|
||||
return fSelectedMarker;
|
||||
}
|
||||
|
||||
// for QUEST games (no teams)
|
||||
void pfMarkerMgr::CaptureMarker(UInt32 id, bool captured)
|
||||
void pfMarkerMgr::CaptureMarker(uint32_t id, bool captured)
|
||||
{
|
||||
if (fMarkers.find(id) == fMarkers.end())
|
||||
return;
|
||||
@ -239,7 +239,7 @@ void pfMarkerMgr::CaptureMarker(UInt32 id, bool captured)
|
||||
}
|
||||
|
||||
// for TEAM games (0 = not captured)
|
||||
void pfMarkerMgr::CaptureMarker(UInt32 id, int team)
|
||||
void pfMarkerMgr::CaptureMarker(uint32_t id, int team)
|
||||
{
|
||||
if (fMarkers.find(id) == fMarkers.end())
|
||||
return;
|
||||
@ -263,13 +263,13 @@ void pfMarkerMgr::LocalShowMarkers(bool show)
|
||||
fShowingLocalMarkers = show;
|
||||
if (show)
|
||||
{
|
||||
std::map<UInt32, pfMarkerInfo*>::iterator curMarker = fMarkers.begin();
|
||||
std::map<uint32_t, pfMarkerInfo*>::iterator curMarker = fMarkers.begin();
|
||||
while (curMarker != fMarkers.end())
|
||||
curMarker->second->Show(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::map<UInt32, pfMarkerInfo*>::iterator curMarker = fMarkers.begin();
|
||||
std::map<uint32_t, pfMarkerInfo*>::iterator curMarker = fMarkers.begin();
|
||||
while (curMarker != fMarkers.end())
|
||||
curMarker->second->Show(false);
|
||||
}
|
||||
@ -317,7 +317,7 @@ hsBool pfMarkerMgr::MsgReceive(plMessage* msg)
|
||||
plKey cloneKey = cloneMsg->GetCloneKey();
|
||||
if (cloneMsg->GetIsLoading() && cloneKey)
|
||||
{
|
||||
UInt32 id;
|
||||
uint32_t id;
|
||||
pfMarkerInfo* marker = IFindMarker(cloneKey, id);
|
||||
marker->InitSpawned(cloneKey);
|
||||
}
|
||||
@ -326,4 +326,4 @@ hsBool pfMarkerMgr::MsgReceive(plMessage* msg)
|
||||
}
|
||||
|
||||
return hsKeyedObject::MsgReceive(msg);
|
||||
}
|
||||
}
|
||||
|
@ -68,14 +68,14 @@ protected:
|
||||
|
||||
bool fShowingLocalMarkers;
|
||||
bool fMarkersRespawn;
|
||||
UInt32 fSelectedMarker;
|
||||
static const UInt32 kNoMarkerSelected;
|
||||
std::map<UInt32, pfMarkerInfo*> fMarkers; // key is marker id number
|
||||
uint32_t fSelectedMarker;
|
||||
static const uint32_t kNoMarkerSelected;
|
||||
std::map<uint32_t, pfMarkerInfo*> fMarkers; // key is marker id number
|
||||
|
||||
void IInit();
|
||||
void IShutdown();
|
||||
|
||||
pfMarkerInfo* IFindMarker(plKey markerKey, UInt32& id);
|
||||
pfMarkerInfo* IFindMarker(plKey markerKey, uint32_t& id);
|
||||
void IUpdate();
|
||||
void IMarkerHit(plKey markerKey, plKey playerKey);
|
||||
|
||||
@ -91,19 +91,19 @@ public:
|
||||
|
||||
hsBool MsgReceive(plMessage* msg);
|
||||
|
||||
void AddMarker(double x, double y, double z, UInt32 id, bool justCreated);
|
||||
void RemoveMarker(UInt32 id);
|
||||
void AddMarker(double x, double y, double z, uint32_t id, bool justCreated);
|
||||
void RemoveMarker(uint32_t id);
|
||||
void RemoveAllMarkers();
|
||||
|
||||
void ClearSelectedMarker();
|
||||
void SetSelectedMarker(UInt32 id);
|
||||
UInt32 GetSelectedMarker();
|
||||
void SetSelectedMarker(uint32_t id);
|
||||
uint32_t GetSelectedMarker();
|
||||
|
||||
void SetMarkersRespawn(bool respawn) {fMarkersRespawn = respawn;}
|
||||
bool GetMarkersRespawn() {return fMarkersRespawn;}
|
||||
|
||||
void CaptureMarker(UInt32 id, bool captured); // for QUEST games (no teams)
|
||||
void CaptureMarker(UInt32 id, int team); // for TEAM games (0 = not captured)
|
||||
void CaptureMarker(uint32_t id, bool captured); // for QUEST games (no teams)
|
||||
void CaptureMarker(uint32_t id, int team); // for TEAM games (0 = not captured)
|
||||
|
||||
// Shows your markers locally, so you can see where they are
|
||||
void LocalShowMarkers(bool show = true);
|
||||
|
@ -47,7 +47,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//#include <hkgeometry/geomdef.h> // for havok Vertex
|
||||
//
|
||||
//
|
||||
//#include "hsTypes.h"
|
||||
//#include "HeadSpin.h"
|
||||
//#include "../plInterp/plController.h"
|
||||
//#include "plPlayerModifier.h"
|
||||
//#include "hsTimer.h"
|
||||
@ -77,10 +77,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//
|
||||
//#include "../plHavok1/plHKPhysical.h"
|
||||
//
|
||||
//hsScalar plPlayerModifier::fTurnRate = 1.0f;
|
||||
//hsScalar plPlayerModifier::fAcceleration = 80.0f;
|
||||
//hsScalar plPlayerModifier::fDeceleration = 80.0f;
|
||||
//hsScalar plPlayerModifier::fMaxVelocity = 200.0f;
|
||||
//float plPlayerModifier::fTurnRate = 1.0f;
|
||||
//float plPlayerModifier::fAcceleration = 80.0f;
|
||||
//float plPlayerModifier::fDeceleration = 80.0f;
|
||||
//float plPlayerModifier::fMaxVelocity = 200.0f;
|
||||
//
|
||||
//plPlayerModifier::plPlayerModifier() :
|
||||
//bUseDesiredFacing(false),
|
||||
@ -107,15 +107,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//{
|
||||
// if( fTarget && fTarget->IsLocallyOwned()==plSynchedObject::kYes )
|
||||
// {
|
||||
// plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
// plCameraMsg* pMsg = new plCameraMsg;
|
||||
// pMsg->SetCmd(plCameraMsg::kSetSubject);
|
||||
// pMsg->SetSubject(nil);
|
||||
// pMsg->SetBCastFlag( plMessage::kBCastByExactType );
|
||||
// plgDispatch::MsgSend(pMsg);
|
||||
//
|
||||
// plAudioSysMsg* pAudMsg1 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerCoordinateRefCamera);
|
||||
// plAudioSysMsg* pAudMsg2 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerVelocityRefCamera);
|
||||
// plAudioSysMsg* pAudMsg3 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerFacingRefCamera);
|
||||
// plAudioSysMsg* pAudMsg1 = new plAudioSysMsg(plAudioSysMsg::kSetListenerCoordinateRefCamera);
|
||||
// plAudioSysMsg* pAudMsg2 = new plAudioSysMsg(plAudioSysMsg::kSetListenerVelocityRefCamera);
|
||||
// plAudioSysMsg* pAudMsg3 = new plAudioSysMsg(plAudioSysMsg::kSetListenerFacingRefCamera);
|
||||
// plgDispatch::MsgSend(pAudMsg1);
|
||||
// plgDispatch::MsgSend(pAudMsg2);
|
||||
// plgDispatch::MsgSend(pAudMsg3);
|
||||
@ -152,14 +152,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//
|
||||
//void plPlayerModifier::IDoLocalSetup(plSceneObject* so)
|
||||
//{
|
||||
// plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
|
||||
// plCameraMsg* pMsg = new plCameraMsg;
|
||||
// pMsg->SetCmd(plCameraMsg::kSetSubject);
|
||||
// pMsg->SetSubject(so);
|
||||
// pMsg->SetBCastFlag( plMessage::kBCastByExactType );
|
||||
// plgDispatch::MsgSend(pMsg);
|
||||
//
|
||||
// // this is to solve the problem of physical vs nonphysical players...
|
||||
//// plCameraMsg* pMsg2 = TRACKED_NEW plCameraMsg;
|
||||
//// plCameraMsg* pMsg2 = new plCameraMsg;
|
||||
//// pMsg2->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
//// pMsg2->SetCmd(plCameraMsg::kSetOffset);
|
||||
//// pMsg2->SetCmd(plCameraMsg::kEntering);
|
||||
@ -172,11 +172,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//void plPlayerModifier::IMakeUsListener( plSceneObject *so )
|
||||
//{
|
||||
// // set the listener to use us...
|
||||
// plAudioSysMsg* pAudMsg1 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerFacingRef);
|
||||
// plAudioSysMsg* pAudMsg1 = new plAudioSysMsg(plAudioSysMsg::kSetListenerFacingRef);
|
||||
// pAudMsg1->SetSceneObject(so->GetKey());
|
||||
// plAudioSysMsg* pAudMsg2 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerCoordinateRef);
|
||||
// plAudioSysMsg* pAudMsg2 = new plAudioSysMsg(plAudioSysMsg::kSetListenerCoordinateRef);
|
||||
// pAudMsg2->SetSceneObject(so->GetKey());
|
||||
// plAudioSysMsg* pAudMsg3 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerVelocityRef);
|
||||
// plAudioSysMsg* pAudMsg3 = new plAudioSysMsg(plAudioSysMsg::kSetListenerVelocityRef);
|
||||
// pAudMsg3->SetSceneObject(so->GetKey());
|
||||
// plgDispatch::MsgSend(pAudMsg1);
|
||||
// plgDispatch::MsgSend(pAudMsg2);
|
||||
@ -209,7 +209,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// plSpawnModMsg* pSpawn = plSpawnModMsg::ConvertNoRef(msg);
|
||||
// if (pSpawn && HasFlag(kWantsToSpawn))
|
||||
// {
|
||||
// spawnPt* pt = TRACKED_NEW spawnPt;
|
||||
// spawnPt* pt = new spawnPt;
|
||||
// pt->pt = pSpawn->fPos;
|
||||
//
|
||||
// hsVector3 temp(fTarget->GetCoordinateInterface()->GetLocalToWorld().GetTranslate() - pt->pt);
|
||||
@ -260,7 +260,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//{
|
||||
// if (b != bMoving)
|
||||
// {
|
||||
// plPlayerMsg* pMsg = TRACKED_NEW plPlayerMsg;
|
||||
// plPlayerMsg* pMsg = new plPlayerMsg;
|
||||
//
|
||||
// if (b)
|
||||
// pMsg->SetCmd( plPlayerMsg::kMovementStarted );
|
||||
@ -277,7 +277,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//hsPoint3 forceRight(-200,0,0);
|
||||
//hsPoint3 forceUp(0,0,15);
|
||||
//
|
||||
//hsBool plPlayerModifier::IEval(double secs, hsScalar del, UInt32 dirty)
|
||||
//hsBool plPlayerModifier::IEval(double secs, float del, uint32_t dirty)
|
||||
//{
|
||||
// // setup for local player if necessary
|
||||
// if (HasFlag(kNeedsLocalSetup))
|
||||
@ -330,7 +330,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// fSpawnPoints[fSpawnPoints.Count()-1]->pt : fSpawnPoints[netID]->pt;
|
||||
//#endif
|
||||
// // Send msg for net synchronization
|
||||
// plWarpMsg* warpMsg = TRACKED_NEW plWarpMsg;
|
||||
// plWarpMsg* warpMsg = new plWarpMsg;
|
||||
// warpMsg->fPos = warpPoint;
|
||||
// warpMsg->AddReceiver( fTarget->GetKey() );
|
||||
// warpMsg->SetWarpFlags(warpMsg->GetWarpFlags() | plWarpMsg::kFlushTransform | plWarpMsg::kZeroVelocity );
|
||||
@ -350,7 +350,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// plSpawnRequestMsg* pMsg = TRACKED_NEW plSpawnRequestMsg;
|
||||
// plSpawnRequestMsg* pMsg = new plSpawnRequestMsg;
|
||||
// pMsg->SetSender(GetKey());
|
||||
// plgDispatch::MsgSend( pMsg );
|
||||
// }
|
||||
@ -371,8 +371,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// return true;
|
||||
//
|
||||
// // update our desired position:
|
||||
//// hsScalar eTime = secs - fLastTime;
|
||||
// hsScalar eTime = hsTimer::GetDelSysSeconds();
|
||||
//// float eTime = secs - fLastTime;
|
||||
// float eTime = hsTimer::GetDelSysSeconds();
|
||||
//
|
||||
// hsPoint3 newLinearForce(0,0,0);
|
||||
//
|
||||
@ -385,8 +385,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// hsVector3 view, up, right;
|
||||
// targetMatrix.GetAxis(&view, &up, &right);
|
||||
//
|
||||
// hsScalar speed = fMaxVelocity;
|
||||
// hsScalar turn = fTurnRate;
|
||||
// float speed = fMaxVelocity;
|
||||
// float turn = fTurnRate;
|
||||
//
|
||||
// if (HasMovementFlag(B_CONTROL_MODIFIER_FAST))
|
||||
// {
|
||||
@ -437,7 +437,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// hsPoint3 newPos;
|
||||
//
|
||||
// hsVector3 dir(fDesiredPosition - curPos);
|
||||
// hsScalar distToGoal=dir.Magnitude();
|
||||
// float distToGoal=dir.Magnitude();
|
||||
//
|
||||
// if (dir.MagnitudeSquared() > 0.0f)
|
||||
// dir.Normalize();
|
||||
@ -447,7 +447,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// IAdjustVelocity(fAcceleration, fDeceleration, &dir, &vel, fMaxVelocity, distToGoal, eTime);
|
||||
// fCurSpeed = vel.Magnitude();
|
||||
//
|
||||
// hsScalar distMoved = IClampVelocity(&vel, fMaxVelocity, eTime);
|
||||
// float distMoved = IClampVelocity(&vel, fMaxVelocity, eTime);
|
||||
//
|
||||
// // compute final pos
|
||||
// if (distMoved > distToGoal)
|
||||
@ -471,8 +471,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//
|
||||
// // compute degrees needed to turn left/right
|
||||
// hsVector3 cross = fPlayerViewGoal % view;
|
||||
// hsScalar dot = fPlayerViewGoal * view;
|
||||
// hsScalar rad = hsACosine(dot);
|
||||
// float dot = fPlayerViewGoal * view;
|
||||
// float rad = acos(dot);
|
||||
// fRotationScalar = 1.0f;
|
||||
//
|
||||
// if (cross.fZ<0)
|
||||
@ -491,7 +491,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// hsScalar angle = 0;
|
||||
// float angle = 0;
|
||||
//
|
||||
// if ( HasMovementFlag( B_CONTROL_ROTATE_RIGHT ) )
|
||||
// {
|
||||
@ -561,15 +561,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
////
|
||||
//// vector version. dir vector should be normalized
|
||||
////
|
||||
//void plPlayerModifier::IAdjustVelocity(hsScalar adjAccelRate, hsScalar adjDecelRate,
|
||||
// hsVector3* dir, hsVector3* vel, hsScalar maxSpeed,
|
||||
// hsScalar distToGoal, double elapsedTime)
|
||||
//void plPlayerModifier::IAdjustVelocity(float adjAccelRate, float adjDecelRate,
|
||||
// hsVector3* dir, hsVector3* vel, float maxSpeed,
|
||||
// float distToGoal, double elapsedTime)
|
||||
//{
|
||||
// hsScalar speed = vel->Magnitude(); // save current speed
|
||||
// float speed = vel->Magnitude(); // save current speed
|
||||
// *vel = *dir * speed; // change vel to correct dir
|
||||
//
|
||||
// // compute accel/decel
|
||||
// hsScalar finalAccelRate;
|
||||
// float finalAccelRate;
|
||||
// if (IShouldDecelerate(adjDecelRate, speed, distToGoal))
|
||||
// {
|
||||
// finalAccelRate = -adjDecelRate;
|
||||
@ -594,13 +594,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//hsScalar plPlayerModifier::IClampVelocity(hsVector3* vel, hsScalar maxSpeed, double elapsedTime)
|
||||
//float plPlayerModifier::IClampVelocity(hsVector3* vel, float maxSpeed, double elapsedTime)
|
||||
//{
|
||||
// *vel = *vel * elapsedTime;
|
||||
// maxSpeed *= elapsedTime;
|
||||
//
|
||||
// // clamp speed (clamp if going negative?)
|
||||
// hsScalar distMoved = vel->Magnitude();
|
||||
// float distMoved = vel->Magnitude();
|
||||
// if (distMoved > maxSpeed)
|
||||
// {
|
||||
// vel->Normalize();
|
||||
@ -610,16 +610,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// return distMoved;
|
||||
//}
|
||||
//
|
||||
//hsBool32 plPlayerModifier::IShouldDecelerate(hsScalar decelSpeed, hsScalar curSpeed, hsScalar distToGoal)
|
||||
//hsBool32 plPlayerModifier::IShouldDecelerate(float decelSpeed, float curSpeed, float distToGoal)
|
||||
//{
|
||||
// if (decelSpeed == 0)
|
||||
// // no deceleration
|
||||
// return false;
|
||||
//
|
||||
// // compute distance required to stop, given decel speed (in units/sec sq)
|
||||
// hsScalar stopTime = curSpeed / decelSpeed;
|
||||
// hsScalar avgSpeed = curSpeed * .5f;
|
||||
// hsScalar stopDist = avgSpeed * stopTime;
|
||||
// float stopTime = curSpeed / decelSpeed;
|
||||
// float avgSpeed = curSpeed * .5f;
|
||||
// float stopDist = avgSpeed * stopTime;
|
||||
//
|
||||
// return (hsABS(distToGoal) <= hsABS(stopDist)); // stopDist+avgSpeed?
|
||||
//}
|
||||
|
@ -68,15 +68,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// struct spawnPt
|
||||
// {
|
||||
// hsPoint3 pt;
|
||||
// hsScalar dist;
|
||||
// float dist;
|
||||
// };
|
||||
//
|
||||
// static hsScalar fTurnRate;
|
||||
// static float fTurnRate;
|
||||
//
|
||||
// static hsScalar fAcceleration;
|
||||
// static hsScalar fDeceleration;
|
||||
// static hsScalar fMaxVelocity;
|
||||
// hsScalar fCurSpeed;
|
||||
// static float fAcceleration;
|
||||
// static float fDeceleration;
|
||||
// static float fMaxVelocity;
|
||||
// float fCurSpeed;
|
||||
//
|
||||
//
|
||||
// double fLastTime;
|
||||
@ -88,19 +88,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// bool bUseDesiredMatrix;
|
||||
// bool bIgnoreDesiredMatrix;
|
||||
//
|
||||
// hsScalar fRotationScalar;
|
||||
// float fRotationScalar;
|
||||
// hsTArray<spawnPt*> fSpawnPoints;
|
||||
//
|
||||
// void IAdjustVelocity(hsScalar adjAccelRate,
|
||||
// hsScalar adjDecelRate,
|
||||
// void IAdjustVelocity(float adjAccelRate,
|
||||
// float adjDecelRate,
|
||||
// hsVector3* dir,
|
||||
// hsVector3* vel,
|
||||
// hsScalar maxSpeed,
|
||||
// hsScalar distToGoal,
|
||||
// float maxSpeed,
|
||||
// float distToGoal,
|
||||
// double elapsedTime);
|
||||
//
|
||||
// hsScalar IClampVelocity(hsVector3* vel, hsScalar maxSpeed, double elapsedTime);
|
||||
// hsBool32 IShouldDecelerate(hsScalar decelSpeed, hsScalar curSpeed, hsScalar distToGoal);
|
||||
// float IClampVelocity(hsVector3* vel, float maxSpeed, double elapsedTime);
|
||||
// hsBool32 IShouldDecelerate(float decelSpeed, float curSpeed, float distToGoal);
|
||||
//
|
||||
// hsBool HasMovementFlag(int f) const { return fMoveFlags.IsBitSet(f); }
|
||||
// void SetMovementFlag(int f) { fMoveFlags.SetBit(f); }
|
||||
@ -129,7 +129,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// virtual void RemoveTarget(plSceneObject* so);
|
||||
//
|
||||
// hsBool HandleControlInput(plControlEventMsg* pMsg);
|
||||
// virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty);
|
||||
// virtual hsBool IEval(double secs, float del, uint32_t dirty);
|
||||
//
|
||||
// void SetMoving(hsBool b);
|
||||
// hsBool IsMoving() { return bMoving; }
|
||||
|
Reference in New Issue
Block a user