mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 03:07:41 +00:00
TCastTo implementation
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "World/CPlayer.hpp"
|
||||
#include "World/CPlayerCameraBob.hpp"
|
||||
#include "World/CScriptGrapplePoint.hpp"
|
||||
#include "TCastTo.hpp"
|
||||
#include <math.h>
|
||||
|
||||
namespace urde
|
||||
@@ -97,7 +98,7 @@ void CFirstPersonCamera::UpdateTransform(CStateManager& mgr, float dt)
|
||||
|
||||
if (player->x304_ == 4 || player->x304_ == 1)
|
||||
{
|
||||
const CActor* act = dynamic_cast<const CActor*>(mgr.GetObjectById(player->x310_grapplePointId));
|
||||
const CActor* act = TCastToConstPtr<CActor>(mgr.GetObjectById(player->x310_grapplePointId));
|
||||
if (act && act->GetMaterialList().Intersection(CMaterialList(EMaterialTypes::Lava)) != 0)
|
||||
{
|
||||
zeus::CVector3f v = player->x318_ - eyePos;
|
||||
@@ -162,7 +163,7 @@ void CFirstPersonCamera::UpdateTransform(CStateManager& mgr, float dt)
|
||||
qGun = zeus::CQuaternion::lookAt(rVec, gunFrontVec, scaledDt * clampedAngle);
|
||||
|
||||
const CScriptGrapplePoint* gPoint =
|
||||
dynamic_cast<const CScriptGrapplePoint*>(mgr.GetObjectById(player->x310_grapplePointId));
|
||||
TCastToConstPtr<CScriptGrapplePoint>(mgr.GetObjectById(player->x310_grapplePointId));
|
||||
if (gPoint && player->x29c_ > 0.f)
|
||||
{
|
||||
gunFrontVec = x190_gunFollowXf.frontVector();
|
||||
|
||||
Reference in New Issue
Block a user