Fixed unnecessary ray tests being performed

This commit is contained in:
parax0 2016-06-29 23:20:34 -06:00
parent 2d6dfad2d3
commit f967519a77
4 changed files with 9 additions and 1 deletions

View File

@ -43,6 +43,11 @@ void CCollisionNode::Draw(FRenderOptions /*Options*/, int /*ComponentIndex*/, ER
mpCollision->DrawWireframe();
}
void CCollisionNode::RayAABoxIntersectTest(CRayCollisionTester& /*rTester*/, const SViewInfo& /*rkViewInfo*/)
{
// todo
}
SRayIntersection CCollisionNode::RayNodeIntersectTest(const CRay& /*rkRay*/, u32 /*AssetID*/, const SViewInfo& /*rkViewInfo*/)
{
// todo

View File

@ -13,6 +13,7 @@ public:
ENodeType NodeType();
void AddToRenderer(CRenderer *pRenderer, const SViewInfo& rkViewInfo);
void Draw(FRenderOptions Options, int ComponentIndex, ERenderCommand Command, const SViewInfo& rkViewInfo);
void RayAABoxIntersectTest(CRayCollisionTester& rTester, const SViewInfo& rkViewInfo);
SRayIntersection RayNodeIntersectTest(const CRay& rkRay, u32 AssetID, const SViewInfo& rkViewInfo);
void SetCollision(CCollisionMeshGroup *pCollision);
};

View File

@ -56,7 +56,8 @@ CScriptExtra* CScriptExtra::CreateExtra(CScriptNode *pNode)
case 0x53505041: // "SPPA" SplinePath (DKCR)
case 0x5043544C: // "PCTL" PathControl (DKCR)
case 0x434C5043: // "CLPC" ClingPathControl (DKCR)
pExtra = new CSplinePathExtra(pObj, pNode->Scene(), pNode);
if (pNode->Instance()->Area()->Game() == eReturns)
pExtra = new CSplinePathExtra(pObj, pNode->Scene(), pNode);
break;
case 0x574F524D: // "WORM" Sandworm (MP2)

View File

@ -35,6 +35,7 @@ public:
// Default implementations for CSceneNode
virtual ENodeType NodeType() { return eScriptExtraNode; }
virtual void RayAABoxIntersectTest(CRayCollisionTester& /*rTester*/, const SViewInfo& /*rkViewInfo*/) {}
virtual SRayIntersection RayNodeIntersectTest(const CRay& /*rkRay*/, u32 /*AssetID*/, const SViewInfo& /*rkViewInfo*/)
{
SRayIntersection out;