From 7e720266d784a874ff0c0e27b4af0c3c22ef02f9 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sun, 15 Jan 2017 07:48:42 -1000 Subject: [PATCH] Additional reference-constructors for TCastToPtr --- Runtime/CStateManager.cpp | 6 +++--- Runtime/World/CScriptCameraPitchVolume.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Runtime/CStateManager.cpp b/Runtime/CStateManager.cpp index 275ab5662..32bb3963a 100644 --- a/Runtime/CStateManager.cpp +++ b/Runtime/CStateManager.cpp @@ -529,12 +529,12 @@ bool CStateManager::ApplyLocalDamage(const zeus::CVector3f& vec1, const zeus::CV float f30 = dt; - CPlayer* player = TCastToPtr(&actor); - CAi* ai = TCastToPtr(&actor); + CPlayer* player = TCastToPtr(actor); + CAi* ai = TCastToPtr(actor); #if 0 CDestroyableRock* dRock = nullptr; if (!ai) - TCastToPtr(&actor); + TCastToPtr(actor); #endif if (player) diff --git a/Runtime/World/CScriptCameraPitchVolume.cpp b/Runtime/World/CScriptCameraPitchVolume.cpp index 722d8e659..2f1449a8b 100644 --- a/Runtime/World/CScriptCameraPitchVolume.cpp +++ b/Runtime/World/CScriptCameraPitchVolume.cpp @@ -42,7 +42,7 @@ rstl::optional_object CScriptCameraPitchVolume::GetTouchBounds() c void CScriptCameraPitchVolume::Touch(CActor& act, CStateManager& mgr) { - CPlayer* pl = TCastToPtr(&act); + CPlayer* pl = TCastToPtr(act); if (!pl) return;