mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Remove PhysX Dependency from plExcludeRegionMod
This commit is contained in:
@ -4,7 +4,6 @@ include_directories("../../NucleusLib/inc")
|
|||||||
include_directories("../../NucleusLib")
|
include_directories("../../NucleusLib")
|
||||||
include_directories("../../PubUtilLib")
|
include_directories("../../PubUtilLib")
|
||||||
|
|
||||||
include_directories(${PHYSX_INCLUDE_DIRS})
|
|
||||||
include_directories(${OPENAL_INCLUDE_DIR})
|
include_directories(${OPENAL_INCLUDE_DIR})
|
||||||
|
|
||||||
set(plModifier_SOURCES
|
set(plModifier_SOURCES
|
||||||
|
@ -62,7 +62,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
//for hack
|
//for hack
|
||||||
#include "plPhysX/plPXPhysical.h"
|
#include "plPhysX/plPXPhysical.h"
|
||||||
#include "plPhysX/plPXPhysicalControllerCore.h"
|
#include "plPhysX/plPXPhysicalControllerCore.h"
|
||||||
#include <NxCapsule.h>
|
|
||||||
static plPhysical* GetPhysical(plSceneObject* obj)
|
static plPhysical* GetPhysical(plSceneObject* obj)
|
||||||
{
|
{
|
||||||
if (obj)
|
if (obj)
|
||||||
@ -309,10 +309,8 @@ void plExcludeRegionModifier::IMoveAvatars()
|
|||||||
int actualCount = plPXPhysicalControllerCore::GetControllersInThisSubWorld(phys->GetWorldKey(), numControllers, controllers);
|
int actualCount = plPXPhysicalControllerCore::GetControllersInThisSubWorld(phys->GetWorldKey(), numControllers, controllers);
|
||||||
|
|
||||||
for (int i=0;i<actualCount;i++)
|
for (int i=0;i<actualCount;i++)
|
||||||
{
|
{
|
||||||
NxCapsule cap;
|
if (phys->OverlapWithController(controllers[i]))
|
||||||
controllers[i]->GetWorldSpaceCapsule(cap);
|
|
||||||
if(phys->OverlapWithCapsule(cap))
|
|
||||||
{
|
{
|
||||||
plSceneObject* so = plSceneObject::ConvertNoRef(controllers[i]->GetOwner()->ObjectIsLoaded());
|
plSceneObject* so = plSceneObject::ConvertNoRef(controllers[i]->GetOwner()->ObjectIsLoaded());
|
||||||
const plArmatureMod* constAvMod = (plArmatureMod*)so->GetModifierByType(plArmatureMod::Index());
|
const plArmatureMod* constAvMod = (plArmatureMod*)so->GetModifierByType(plArmatureMod::Index());
|
||||||
|
@ -1080,8 +1080,10 @@ void plPXPhysical::ExcludeRegionHack(bool cleared)
|
|||||||
plPXPhysicalControllerCore::RebuildCache();
|
plPXPhysicalControllerCore::RebuildCache();
|
||||||
|
|
||||||
}
|
}
|
||||||
bool plPXPhysical::OverlapWithCapsule(NxCapsule& cap)
|
bool plPXPhysical::OverlapWithController(const plPXPhysicalControllerCore* controller)
|
||||||
{
|
{
|
||||||
|
NxCapsule cap;
|
||||||
|
controller->GetWorldSpaceCapsule(cap);
|
||||||
NxShape* shape = fActor->getShapes()[0];
|
NxShape* shape = fActor->getShapes()[0];
|
||||||
return shape->checkOverlapCapsule(cap);
|
return shape->checkOverlapCapsule(cap);
|
||||||
}
|
}
|
||||||
|
@ -182,9 +182,8 @@ public:
|
|||||||
// This weeds those out.
|
// This weeds those out.
|
||||||
bool IsDynamic() const;
|
bool IsDynamic() const;
|
||||||
|
|
||||||
//Hack to check if there is an overlap with the capsule
|
//Hack to check if there is an overlap with the avatar controller
|
||||||
//this partially for exclude regions vs avatar capsule
|
bool OverlapWithController(const class plPXPhysicalControllerCore* controller);
|
||||||
virtual bool OverlapWithCapsule(NxCapsule& cap);
|
|
||||||
|
|
||||||
virtual float GetMass() {return fMass;}
|
virtual float GetMass() {return fMass;}
|
||||||
protected:
|
protected:
|
||||||
|
Reference in New Issue
Block a user