2016-07-22 19:46:30 +00:00
|
|
|
#ifndef __URDE_CPLAYER_HPP__
|
|
|
|
#define __URDE_CPLAYER_HPP__
|
|
|
|
|
|
|
|
#include "CPhysicsActor.hpp"
|
|
|
|
#include "zeus/CAABox.hpp"
|
|
|
|
#include "zeus/CTransform.hpp"
|
2016-11-22 20:43:16 +00:00
|
|
|
#include "Weapon/CWeaponMgr.hpp"
|
2016-09-25 16:45:22 +00:00
|
|
|
#include "CPlayerEnergyDrain.hpp"
|
2017-02-12 03:17:18 +00:00
|
|
|
#include "Weapon/CPlayerGun.hpp"
|
|
|
|
#include "CMorphBall.hpp"
|
2016-07-22 19:46:30 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
class CMaterialList;
|
|
|
|
class CMorphBall;
|
2016-08-14 21:11:44 +00:00
|
|
|
class CPlayerGun;
|
2016-08-15 01:19:04 +00:00
|
|
|
class CDamageInfo;
|
|
|
|
class CScriptWater;
|
|
|
|
class IVisitor;
|
|
|
|
class CFinalInput;
|
2016-09-15 07:26:35 +00:00
|
|
|
class CPlayerCameraBob;
|
2016-08-15 01:19:04 +00:00
|
|
|
class CFirstPersonCamera;
|
2017-07-16 06:13:37 +00:00
|
|
|
class CCollidableSphere;
|
2017-08-19 06:52:13 +00:00
|
|
|
class CScriptPlayerHint;
|
2016-07-22 19:46:30 +00:00
|
|
|
|
|
|
|
class CPlayer : public CPhysicsActor
|
|
|
|
{
|
2016-08-14 21:11:44 +00:00
|
|
|
friend class CStateManager;
|
2016-09-15 07:26:35 +00:00
|
|
|
friend class CFirstPersonCamera;
|
2016-09-16 00:56:46 +00:00
|
|
|
friend class CPlayerCameraBob;
|
2017-03-06 06:33:51 +00:00
|
|
|
friend class CMorphBall;
|
2017-06-19 07:00:50 +00:00
|
|
|
friend class CGroundMovement;
|
2016-12-19 18:27:58 +00:00
|
|
|
|
2016-08-15 01:19:04 +00:00
|
|
|
public:
|
|
|
|
enum class EPlayerScanState
|
|
|
|
{
|
2017-04-03 01:39:23 +00:00
|
|
|
NotScanning,
|
|
|
|
Scanning,
|
|
|
|
ScanComplete
|
2016-08-15 01:19:04 +00:00
|
|
|
};
|
2017-06-12 04:23:34 +00:00
|
|
|
|
2016-08-15 01:19:04 +00:00
|
|
|
enum class EPlayerOrbitType
|
|
|
|
{
|
2017-08-19 06:52:13 +00:00
|
|
|
Close,
|
|
|
|
Far,
|
2017-08-20 05:23:22 +00:00
|
|
|
Default
|
2016-08-15 01:19:04 +00:00
|
|
|
};
|
2017-06-12 04:23:34 +00:00
|
|
|
|
2016-08-15 01:19:04 +00:00
|
|
|
enum class EPlayerOrbitState
|
|
|
|
{
|
2017-08-19 06:52:13 +00:00
|
|
|
NoOrbit,
|
2017-08-20 05:23:22 +00:00
|
|
|
OrbitObject,
|
|
|
|
OrbitPoint,
|
|
|
|
OrbitCarcass,
|
|
|
|
ForcedOrbitObject, // For CMetroidBeta attack
|
2017-08-19 06:52:13 +00:00
|
|
|
Grapple
|
2016-08-15 01:19:04 +00:00
|
|
|
};
|
2017-06-12 04:23:34 +00:00
|
|
|
|
|
|
|
enum class EPlayerOrbitRequest
|
|
|
|
{
|
2017-08-20 05:23:22 +00:00
|
|
|
StopOrbit,
|
|
|
|
Respawn,
|
|
|
|
EnterMorphBall,
|
|
|
|
Default,
|
2017-06-12 04:23:34 +00:00
|
|
|
Four,
|
|
|
|
Five,
|
2017-08-20 05:23:22 +00:00
|
|
|
InvalidateTarget,
|
|
|
|
BadVerticalAngle,
|
|
|
|
ActivateOrbitSource,
|
|
|
|
ProjectileCollide,
|
|
|
|
Freeze,
|
|
|
|
DamageOnGrapple,
|
|
|
|
LostGrappleLineOfSight
|
2017-06-12 04:23:34 +00:00
|
|
|
};
|
|
|
|
|
2017-07-30 01:06:06 +00:00
|
|
|
enum class EOrbitValidationResult
|
2017-07-17 03:04:14 +00:00
|
|
|
{
|
2017-07-30 01:06:06 +00:00
|
|
|
OK,
|
|
|
|
InvalidTarget,
|
|
|
|
PlayerNotReadyToTarget,
|
|
|
|
NonTargetableTarget,
|
|
|
|
ExtremeHorizonAngle,
|
|
|
|
BrokenLookAngle,
|
|
|
|
TargetingThroughDoor
|
2017-07-17 03:04:14 +00:00
|
|
|
};
|
|
|
|
|
2016-08-15 01:19:04 +00:00
|
|
|
enum class EPlayerZoneInfo
|
|
|
|
{
|
2017-08-20 05:23:22 +00:00
|
|
|
Targeting,
|
|
|
|
Scan
|
2016-08-15 01:19:04 +00:00
|
|
|
};
|
2017-06-12 04:23:34 +00:00
|
|
|
|
2016-08-15 01:19:04 +00:00
|
|
|
enum class EPlayerZoneType
|
|
|
|
{
|
2017-05-30 03:45:31 +00:00
|
|
|
Always = -1,
|
|
|
|
Box = 0,
|
|
|
|
Ellipse
|
2016-08-15 01:19:04 +00:00
|
|
|
};
|
2017-06-12 04:23:34 +00:00
|
|
|
|
2016-08-15 01:19:04 +00:00
|
|
|
enum class EPlayerMovementState
|
|
|
|
{
|
2017-06-12 04:23:34 +00:00
|
|
|
OnGround,
|
|
|
|
Jump,
|
|
|
|
StartingJump,
|
|
|
|
Falling,
|
|
|
|
FallingMorphed
|
2016-08-15 01:19:04 +00:00
|
|
|
};
|
|
|
|
|
2017-01-07 01:58:05 +00:00
|
|
|
enum class EPlayerMorphBallState
|
|
|
|
{
|
|
|
|
Unmorphed,
|
|
|
|
Morphed,
|
|
|
|
Morphing,
|
2017-01-15 03:59:37 +00:00
|
|
|
Unmorphing
|
2017-01-07 01:58:05 +00:00
|
|
|
};
|
|
|
|
|
2017-03-24 05:30:16 +00:00
|
|
|
enum class EPlayerCameraState
|
|
|
|
{
|
2017-08-19 06:52:13 +00:00
|
|
|
FirstPerson,
|
|
|
|
Ball,
|
2017-03-24 05:30:16 +00:00
|
|
|
Two,
|
2017-08-19 06:52:13 +00:00
|
|
|
Transitioning,
|
|
|
|
Spawned
|
2017-03-24 05:30:16 +00:00
|
|
|
};
|
|
|
|
|
2017-08-06 07:15:42 +00:00
|
|
|
enum class ESurfaceRestraints
|
2017-06-12 04:23:34 +00:00
|
|
|
{
|
|
|
|
Normal,
|
2017-08-16 05:34:02 +00:00
|
|
|
InAir,
|
2017-06-12 04:23:34 +00:00
|
|
|
Ice,
|
|
|
|
MudSlow,
|
2017-08-16 05:34:02 +00:00
|
|
|
Water,
|
|
|
|
Lava,
|
|
|
|
PhazonFluid,
|
2017-06-12 04:23:34 +00:00
|
|
|
SnakeWeed
|
|
|
|
};
|
|
|
|
|
2017-07-17 03:04:14 +00:00
|
|
|
enum class EFootstepSfx
|
|
|
|
{
|
|
|
|
None,
|
|
|
|
Left,
|
|
|
|
Right
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class EGrappleState
|
|
|
|
{
|
2017-07-23 23:45:04 +00:00
|
|
|
None,
|
|
|
|
Firing,
|
|
|
|
Pull,
|
|
|
|
Swinging,
|
|
|
|
JumpOff
|
2017-07-17 03:04:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum class EGunHolsterState
|
|
|
|
{
|
|
|
|
Holstered,
|
|
|
|
Drawing,
|
|
|
|
Drawn,
|
|
|
|
Holstering
|
|
|
|
};
|
|
|
|
|
2016-08-15 01:19:04 +00:00
|
|
|
private:
|
|
|
|
struct CVisorSteam
|
|
|
|
{
|
2017-08-19 06:52:13 +00:00
|
|
|
float x0_curTargetAlpha;
|
|
|
|
float x4_curAlphaInDur;
|
|
|
|
float x8_curAlphaOutDur;
|
2017-08-13 05:26:14 +00:00
|
|
|
CAssetId xc_tex;
|
2017-08-19 06:52:13 +00:00
|
|
|
float x10_nextTargetAlpha = 0.f;
|
|
|
|
float x14_nextAlphaInDur = 0.f;
|
|
|
|
float x18_nextAlphaOutDur = 0.f;
|
2017-08-13 05:26:14 +00:00
|
|
|
CAssetId x1c_txtr;
|
2017-02-12 03:17:18 +00:00
|
|
|
float x20_alpha = 0.f;
|
2017-08-19 06:52:13 +00:00
|
|
|
float x24_delayTimer = 0.f;
|
2017-07-20 06:04:40 +00:00
|
|
|
bool x28_affectsThermal = false;
|
2016-12-19 18:27:58 +00:00
|
|
|
|
2016-09-25 16:45:22 +00:00
|
|
|
public:
|
2017-08-19 06:52:13 +00:00
|
|
|
CVisorSteam(float targetAlpha, float alphaInDur, float alphaOutDur, CAssetId tex)
|
|
|
|
: x0_curTargetAlpha(targetAlpha), x4_curAlphaInDur(alphaInDur), x8_curAlphaOutDur(alphaOutDur), xc_tex(tex) {}
|
2017-08-13 05:26:14 +00:00
|
|
|
CAssetId GetTextureId() const;
|
2017-08-19 06:52:13 +00:00
|
|
|
void SetSteam(float targetAlpha, float alphaInDur, float alphaOutDur, CAssetId txtr, bool affectsThermal);
|
2016-08-15 01:19:04 +00:00
|
|
|
void Update(float dt);
|
2017-02-12 03:17:18 +00:00
|
|
|
float GetAlpha() const { return x20_alpha; }
|
2017-07-20 06:04:40 +00:00
|
|
|
bool AffectsThermal() const { return x28_affectsThermal; }
|
2016-08-15 01:19:04 +00:00
|
|
|
};
|
2017-06-12 04:23:34 +00:00
|
|
|
|
2017-07-16 06:13:37 +00:00
|
|
|
class CFailsafeTest
|
2017-06-12 04:23:34 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum class EInputState
|
|
|
|
{
|
|
|
|
Jump,
|
|
|
|
StartingJump,
|
|
|
|
Moving
|
|
|
|
};
|
|
|
|
private:
|
|
|
|
rstl::reserved_vector<EInputState, 20> x0_stateSamples;
|
|
|
|
rstl::reserved_vector<zeus::CVector3f, 20> x54_posSamples;
|
|
|
|
rstl::reserved_vector<zeus::CVector3f, 20> x148_velSamples;
|
|
|
|
rstl::reserved_vector<zeus::CVector2f, 20> x23c_inputSamples;
|
|
|
|
public:
|
|
|
|
void Reset();
|
|
|
|
void AddSample(EInputState state, const zeus::CVector3f& pos,
|
|
|
|
const zeus::CVector3f& vel, const zeus::CVector2f& input);
|
|
|
|
bool Passes() const;
|
|
|
|
};
|
|
|
|
|
|
|
|
EPlayerMovementState x258_movementState = EPlayerMovementState::OnGround;
|
2017-07-05 18:34:12 +00:00
|
|
|
std::vector<CToken> x25c_ballTransitionsRes;
|
2017-08-19 06:52:13 +00:00
|
|
|
TUniqueId x26c_attachedActor = kInvalidUniqueId;
|
|
|
|
float x270_attachedActorTime = 0.f;
|
2017-05-21 16:01:04 +00:00
|
|
|
CPlayerEnergyDrain x274_energyDrain = CPlayerEnergyDrain(4);
|
2017-07-17 03:04:14 +00:00
|
|
|
float x288_startingJumpTimeout = 0.f;
|
2017-02-18 02:19:50 +00:00
|
|
|
float x28c_sjTimer = 0.f;
|
2017-08-16 05:34:02 +00:00
|
|
|
float x290_minJumpTimeout = 0.f;
|
2017-08-19 06:52:13 +00:00
|
|
|
float x294_jumpCameraTimer = 0.f;
|
2017-07-17 03:04:14 +00:00
|
|
|
u32 x298_jumpPresses = 0;
|
2017-08-19 06:52:13 +00:00
|
|
|
float x29c_fallCameraTimer = 0.f;
|
2016-09-25 16:45:22 +00:00
|
|
|
float x2a0_ = 0.f;
|
2017-07-17 03:04:14 +00:00
|
|
|
bool x2a4_cancelCameraPitch = false;
|
2017-08-16 05:34:02 +00:00
|
|
|
float x2a8_timeSinceJump = 1000.f;
|
2017-08-06 07:15:42 +00:00
|
|
|
ESurfaceRestraints x2ac_surfaceRestraint = ESurfaceRestraints::Normal;
|
2017-08-16 05:34:02 +00:00
|
|
|
u32 x2b0_outOfWaterTicks = 2;
|
|
|
|
rstl::reserved_vector<float, 6> x2b4_accelerationTable;
|
|
|
|
u32 x2d0_curAcceleration = 3;
|
|
|
|
float x2d4_accelerationChangeTimer = 0.f;
|
2017-07-30 01:06:06 +00:00
|
|
|
zeus::CAABox x2d8_fpBounds;
|
2017-06-18 01:58:13 +00:00
|
|
|
float x2f0_ballTransHeight = 0.f;
|
2017-08-19 06:52:13 +00:00
|
|
|
EPlayerCameraState x2f4_cameraState = EPlayerCameraState::FirstPerson;
|
|
|
|
EPlayerMorphBallState x2f8_morphBallState = EPlayerMorphBallState::Unmorphed;
|
|
|
|
EPlayerMorphBallState x2fc_spawnedMorphBallState = EPlayerMorphBallState::Unmorphed;
|
2017-06-12 04:23:34 +00:00
|
|
|
float x300_fallingTime = 0.f;
|
2017-08-19 06:52:13 +00:00
|
|
|
EPlayerOrbitState x304_orbitState = EPlayerOrbitState::NoOrbit;
|
|
|
|
EPlayerOrbitType x308_orbitType = EPlayerOrbitType::Close;
|
2017-08-20 05:23:22 +00:00
|
|
|
EPlayerOrbitRequest x30c_orbitRequest = EPlayerOrbitRequest::Default;
|
2017-06-12 04:23:34 +00:00
|
|
|
TUniqueId x310_orbitTargetId = kInvalidUniqueId;
|
|
|
|
zeus::CVector3f x314_orbitPoint;
|
|
|
|
zeus::CVector3f x320_orbitVector;
|
2017-08-19 06:52:13 +00:00
|
|
|
float x32c_orbitModeTimer = 0.f;
|
2017-08-20 05:23:22 +00:00
|
|
|
EPlayerZoneInfo x330_orbitZoneMode = EPlayerZoneInfo::Targeting;
|
2017-05-30 03:45:31 +00:00
|
|
|
EPlayerZoneType x334_orbitType = EPlayerZoneType::Ellipse;
|
2016-09-25 16:45:22 +00:00
|
|
|
u32 x338_ = 1;
|
2017-08-19 06:52:13 +00:00
|
|
|
TUniqueId x33c_orbitNextTargetId = kInvalidUniqueId;
|
2016-09-25 16:45:22 +00:00
|
|
|
float x340_ = 0.f;
|
2017-05-30 03:45:31 +00:00
|
|
|
std::vector<TUniqueId> x344_nearbyOrbitObjects;
|
|
|
|
std::vector<TUniqueId> x354_onScreenOrbitObjects;
|
|
|
|
std::vector<TUniqueId> x364_offScreenOrbitObjects;
|
2017-07-30 01:06:06 +00:00
|
|
|
bool x374_orbitLockEstablished = false;
|
2017-08-19 06:52:13 +00:00
|
|
|
float x378_orbitPreventionTimer = 0.f;
|
2017-07-23 23:45:04 +00:00
|
|
|
bool x37c_sidewaysDashing = false;
|
2017-08-16 05:34:02 +00:00
|
|
|
float x380_strafeInputAtDash = 0.f;
|
|
|
|
float x384_dashTimer = 0.f;
|
|
|
|
float x388_dashButtonHoldTime = 0.f;
|
|
|
|
bool x38c_doneSidewaysDashing = false;
|
2017-06-12 04:23:34 +00:00
|
|
|
u32 x390_orbitSource = 2;
|
2017-07-17 03:04:14 +00:00
|
|
|
bool x394_orbitingEnemy = false;
|
2017-08-16 05:34:02 +00:00
|
|
|
float x398_dashSpeedMultiplier = 1.5f;
|
|
|
|
bool x39c_noStrafeDashBlend = false;
|
|
|
|
float x3a0_dashDuration = 0.5f;
|
|
|
|
float x3a4_strafeDashBlendDuration = 0.449f;
|
2017-04-03 01:39:23 +00:00
|
|
|
EPlayerScanState x3a8_scanState = EPlayerScanState::NotScanning;
|
2017-04-02 03:03:37 +00:00
|
|
|
float x3ac_scanningTime = 0.f;
|
2017-07-31 05:19:05 +00:00
|
|
|
float x3b0_curScanTime = 0.f;
|
2017-04-02 03:03:37 +00:00
|
|
|
TUniqueId x3b4_scanningObject = kInvalidUniqueId;
|
2017-07-23 23:45:04 +00:00
|
|
|
EGrappleState x3b8_grappleState = EGrappleState::None;
|
2017-07-17 03:04:14 +00:00
|
|
|
float x3bc_grappleSwingTimer = 0.f;
|
|
|
|
zeus::CVector3f x3c0_grappleSwingAxis = zeus::CVector3f::skRight;
|
2016-09-25 16:45:22 +00:00
|
|
|
float x3cc_ = 0.f;
|
|
|
|
float x3d0_ = 0.f;
|
|
|
|
float x3d4_ = 0.f;
|
2017-07-17 03:04:14 +00:00
|
|
|
float x3d8_grappleJumpTimeout = 0.f;
|
|
|
|
bool x3dc_inFreeLook = false;
|
2017-08-16 05:34:02 +00:00
|
|
|
bool x3dd_lookButtonHeld = false;
|
|
|
|
bool x3de_lookAnalogHeld = false;
|
2017-07-31 05:19:05 +00:00
|
|
|
float x3e0_curFreeLookCenteredTime = 0.f;
|
2017-08-06 07:15:42 +00:00
|
|
|
float x3e4_freeLookYawAngle = 0.f;
|
2017-07-31 05:19:05 +00:00
|
|
|
float x3e8_horizFreeLookAngleVel = 0.f;
|
2017-07-17 03:04:14 +00:00
|
|
|
float x3ec_freeLookPitchAngle = 0.f;
|
2017-07-31 05:19:05 +00:00
|
|
|
float x3f0_vertFreeLookAngleVel = 0.f;
|
2017-05-30 03:45:31 +00:00
|
|
|
TUniqueId x3f4_aimTarget = kInvalidUniqueId;
|
|
|
|
zeus::CVector3f x3f8_targetAimPosition = zeus::CVector3f::skZero;
|
|
|
|
TReservedAverage<zeus::CVector3f, 20> x404_aimTargetAverage;
|
|
|
|
zeus::CVector3f x480_assistedTargetAim = zeus::CVector3f::skZero;
|
2017-07-30 01:06:06 +00:00
|
|
|
float x48c_aimTargetTimer = 0.f;
|
2016-08-14 21:11:44 +00:00
|
|
|
std::unique_ptr<CPlayerGun> x490_gun;
|
2017-08-18 01:30:15 +00:00
|
|
|
float x494_gunAlpha = 1.f;
|
2017-07-17 03:04:14 +00:00
|
|
|
EGunHolsterState x498_gunHolsterState = EGunHolsterState::Drawn;
|
2017-07-20 06:04:40 +00:00
|
|
|
float x49c_gunHolsterRemTime;
|
2017-07-16 06:13:37 +00:00
|
|
|
std::unique_ptr<CFailsafeTest> x4a0_failsafeTest;
|
2017-08-19 06:52:13 +00:00
|
|
|
TReservedAverage<float, 20> x4a4_moveSpeedAvg;
|
|
|
|
float x4f8_moveSpeed = 0.f;
|
|
|
|
float x4fc_flatMoveSpeed = 0.f;
|
2017-08-18 01:30:15 +00:00
|
|
|
zeus::CVector3f x500_lookDir = x34_transform.basis[1];
|
2017-07-30 01:06:06 +00:00
|
|
|
zeus::CVector3f x50c_moveDir = x34_transform.basis[1];
|
2017-07-16 06:13:37 +00:00
|
|
|
zeus::CVector3f x518_leaveMorphDir = x34_transform.basis[1];
|
2017-08-19 06:52:13 +00:00
|
|
|
zeus::CVector3f x524_lastPosForDirCalc = x34_transform.basis[1];
|
|
|
|
zeus::CVector3f x530_gunDir = x34_transform.basis[1];
|
|
|
|
float x53c_timeMoving = 0.f;
|
|
|
|
zeus::CVector3f x540_controlDir = x34_transform.basis[1];
|
|
|
|
zeus::CVector3f x54c_controlDirFlat = x34_transform.basis[1];
|
2017-07-05 18:34:12 +00:00
|
|
|
bool x558_wasDamaged = false;
|
|
|
|
float x55c_damageAmt = 0.f;
|
|
|
|
float x560_prevDamageAmt = 0.f;
|
|
|
|
zeus::CVector3f x564_damageLocation;
|
2017-08-19 06:52:13 +00:00
|
|
|
float x570_immuneTimer = 0.f;
|
2017-03-06 06:33:51 +00:00
|
|
|
float x574_morphTime = 0.f;
|
|
|
|
float x578_morphDuration = 0.f;
|
2017-02-12 03:17:18 +00:00
|
|
|
u32 x57c_ = 0;
|
|
|
|
u32 x580_ = 0;
|
2017-08-18 01:30:15 +00:00
|
|
|
int x584_ballTransitionAnim = -1;
|
2017-02-12 03:17:18 +00:00
|
|
|
float x588_alpha = 1.f;
|
2017-08-18 01:30:15 +00:00
|
|
|
float x58c_transitionVel = 0.f;
|
2017-08-02 07:13:11 +00:00
|
|
|
bool x590_ = true;
|
2017-07-31 05:19:05 +00:00
|
|
|
TReservedAverage<zeus::CTransform, 4> x594_transisionBeamXfs;
|
|
|
|
TReservedAverage<zeus::CTransform, 4> x658_transitionModelXfs;
|
|
|
|
TReservedAverage<float, 4> x71c_transitionModelAlphas;
|
|
|
|
std::vector<std::unique_ptr<CModelData>> x730_transitionModels;
|
2017-08-19 06:52:13 +00:00
|
|
|
float x740_staticTimer = 0.f;
|
2017-08-16 05:34:02 +00:00
|
|
|
float x744_staticOutSpeed = 0.f;
|
|
|
|
float x748_staticInSpeed = 0.f;
|
2017-05-18 19:27:21 +00:00
|
|
|
float x74c_visorStaticAlpha = 1.f;
|
2017-07-16 06:13:37 +00:00
|
|
|
float x750_frozenTimeout = 0.f;
|
2017-07-17 03:04:14 +00:00
|
|
|
s32 x754_iceBreakJumps = 0;
|
|
|
|
float x758_frozenTimeoutBias = 0.f;
|
|
|
|
s32 x75c_additionalIceBreakJumps = 0;
|
2017-06-12 04:23:34 +00:00
|
|
|
bool x760_controlsFrozen = false;
|
|
|
|
float x764_controlsFrozenTimeout = 0.f;
|
2016-07-22 19:46:30 +00:00
|
|
|
std::unique_ptr<CMorphBall> x768_morphball;
|
2016-09-15 07:26:35 +00:00
|
|
|
std::unique_ptr<CPlayerCameraBob> x76c_cameraBob;
|
2017-07-05 18:34:12 +00:00
|
|
|
CSfxHandle x770_damageLoopSfx;
|
|
|
|
float x774_samusVoiceTimeout = 0.f;
|
2017-08-16 05:34:02 +00:00
|
|
|
CSfxHandle x778_dashSfx;
|
2017-06-12 04:23:34 +00:00
|
|
|
CSfxHandle x77c_samusVoiceSfx;
|
|
|
|
int x780_samusVoicePriority = 0;
|
2017-08-18 01:30:15 +00:00
|
|
|
float x784_damageSfxTimer = 0.f;
|
2017-07-05 18:34:12 +00:00
|
|
|
u16 x788_damageLoopSfxId = 0;
|
2017-07-17 03:04:14 +00:00
|
|
|
float x78c_footstepSfxTimer = 0.f;
|
|
|
|
EFootstepSfx x790_footstepSfxSel = EFootstepSfx::None;
|
2017-08-16 05:34:02 +00:00
|
|
|
zeus::CVector3f x794_lastVelocity;
|
2017-08-13 05:26:14 +00:00
|
|
|
CVisorSteam x7a0_visorSteam = CVisorSteam(0.f, 0.f, 0.f, CAssetId()/*kInvalidAssetId*/);
|
2017-08-18 01:30:15 +00:00
|
|
|
CPlayerState::EPlayerSuit x7cc_transitionSuit;
|
2017-02-12 03:17:18 +00:00
|
|
|
CAnimRes x7d0_animRes;
|
2017-08-16 05:34:02 +00:00
|
|
|
zeus::CVector3f x7d8_beamScale;
|
|
|
|
bool x7e4_ = true;
|
|
|
|
u32 x7e8_ = 0;
|
2017-06-18 01:58:13 +00:00
|
|
|
CPlayerState::EBeamId x7ec_beam = CPlayerState::EBeamId::Power;
|
2017-02-12 03:17:18 +00:00
|
|
|
std::unique_ptr<CModelData> x7f0_ballTransitionBeamModel;
|
2017-08-16 05:34:02 +00:00
|
|
|
zeus::CTransform x7f4_gunWorldXf;
|
2017-08-19 06:52:13 +00:00
|
|
|
float x824_transitionFilterTimer = 0.f;
|
2017-08-25 06:18:09 +00:00
|
|
|
float x828_distanceUnderWater = 0.f;
|
2017-07-17 03:04:14 +00:00
|
|
|
bool x82c_inLava = false;
|
2017-06-12 04:23:34 +00:00
|
|
|
TUniqueId x82e_ridingPlatform = kInvalidUniqueId;
|
2017-08-18 01:30:15 +00:00
|
|
|
TUniqueId x830_playerHint = kInvalidUniqueId;
|
2017-08-20 05:23:22 +00:00
|
|
|
u32 x834_playerHintPriority = 1000;
|
2017-08-19 06:52:13 +00:00
|
|
|
rstl::reserved_vector<std::pair<u32, TUniqueId>, 32> x838_playerHints;
|
|
|
|
rstl::reserved_vector<TUniqueId, 32> x93c_playerHintsToRemove;
|
|
|
|
rstl::reserved_vector<TUniqueId, 32> x980_playerHintsToAdd;
|
2017-02-12 03:17:18 +00:00
|
|
|
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
2017-07-20 06:04:40 +00:00
|
|
|
bool x9c4_24_visorChangeRequested : 1;
|
|
|
|
bool x9c4_25_showCrosshairs : 1;
|
2017-02-12 03:17:18 +00:00
|
|
|
bool x9c4_26_ : 1;
|
2017-08-02 07:13:11 +00:00
|
|
|
bool x9c4_27_canEnterMorphBall : 1;
|
|
|
|
bool x9c4_28_canLeaveMorphBall : 1;
|
2017-09-21 05:10:18 +00:00
|
|
|
bool x9c4_29_spiderBallControlXY : 1;
|
2017-08-19 06:52:13 +00:00
|
|
|
bool x9c4_30_controlDirOverride : 1;
|
2017-06-19 07:00:50 +00:00
|
|
|
bool x9c4_31_dampUnderwaterMotion : 1;
|
2017-02-12 03:17:18 +00:00
|
|
|
bool x9c5_24_ : 1;
|
2017-06-12 04:23:34 +00:00
|
|
|
bool x9c5_25_splashUpdated : 1;
|
2017-02-12 03:17:18 +00:00
|
|
|
bool x9c5_26_ : 1;
|
2017-08-16 05:34:02 +00:00
|
|
|
bool x9c5_27_camSubmerged : 1;
|
2017-06-19 07:00:50 +00:00
|
|
|
bool x9c5_28_slidingOnWall : 1;
|
|
|
|
bool x9c5_29_hitWall : 1;
|
2017-09-11 02:18:49 +00:00
|
|
|
bool x9c5_30_selectFluidBallSound : 1;
|
2017-08-18 01:30:15 +00:00
|
|
|
bool x9c5_31_stepCameraZBiasDirty : 1;
|
2017-07-28 06:56:23 +00:00
|
|
|
bool x9c6_24_extendTargetDistance : 1;
|
2017-08-19 06:52:13 +00:00
|
|
|
bool x9c6_25_interpolatingControlDir : 1;
|
2017-08-18 01:30:15 +00:00
|
|
|
bool x9c6_26_outOfBallLookAtHint : 1;
|
2017-05-30 03:45:31 +00:00
|
|
|
bool x9c6_27_aimingAtProjectile : 1;
|
2017-07-23 23:45:04 +00:00
|
|
|
bool x9c6_28_aligningGrappleSwingTurn : 1;
|
2017-03-24 05:30:16 +00:00
|
|
|
bool x9c6_29_disableInput : 1;
|
2017-04-02 03:03:37 +00:00
|
|
|
bool x9c6_30_newScanScanning : 1;
|
2017-04-07 05:35:09 +00:00
|
|
|
bool x9c6_31_overrideRadarRadius : 1;
|
2017-08-20 05:23:22 +00:00
|
|
|
bool x9c7_24_noDamageLoopSfx : 1;
|
2017-08-18 01:30:15 +00:00
|
|
|
bool x9c7_25_outOfBallLookAtHintActor : 1;
|
2017-02-12 03:17:18 +00:00
|
|
|
};
|
|
|
|
u32 _dummy = 0;
|
|
|
|
};
|
|
|
|
|
2017-07-30 01:06:06 +00:00
|
|
|
float x9c8_eyeZBias = 0.f;
|
2017-08-18 01:30:15 +00:00
|
|
|
float x9cc_stepCameraZBias = 0.f;
|
2017-08-19 06:52:13 +00:00
|
|
|
u32 x9d0_bombJumpCount = 0;
|
|
|
|
u32 x9d4_bombJumpCheckDelayFrames = 0;
|
|
|
|
zeus::CVector3f x9d8_controlDirOverrideDir = zeus::CVector3f::skForward;
|
2017-05-30 03:45:31 +00:00
|
|
|
rstl::reserved_vector<TUniqueId, 5> x9e4_orbitDisableList;
|
2017-02-12 03:17:18 +00:00
|
|
|
|
2017-03-26 19:36:07 +00:00
|
|
|
float x9f4_deathTime = 0.f;
|
2017-08-19 06:52:13 +00:00
|
|
|
float x9f8_controlDirInterpTime = 0.f;
|
|
|
|
float x9fc_controlDirInterpDur = 0.f;
|
2017-08-16 05:34:02 +00:00
|
|
|
TUniqueId xa00_deathPowerBomb = kInvalidUniqueId;
|
2017-08-20 05:23:22 +00:00
|
|
|
float xa04_preThinkDt = 0.f;
|
2017-08-13 05:26:14 +00:00
|
|
|
CAssetId xa08_steamTextureId;
|
|
|
|
CAssetId xa0c_iceTextureId;
|
2017-06-12 04:23:34 +00:00
|
|
|
u32 xa10_phazonCounter = 0;
|
2017-07-30 01:06:06 +00:00
|
|
|
float xa14_phazonCameraShakeTimer = 0.f;
|
|
|
|
float xa18_phazonDamageLag = 0.f;
|
2017-04-09 06:14:22 +00:00
|
|
|
float xa1c_threatOverride = 0.f;
|
2017-04-07 05:35:09 +00:00
|
|
|
float xa20_radarXYRadiusOverride = 1.f;
|
|
|
|
float xa24_radarZRadiusOverride = 1.f;
|
2017-08-19 06:52:13 +00:00
|
|
|
float xa28_attachedActorStruggle = 0.f;
|
2017-08-20 05:23:22 +00:00
|
|
|
int xa2c_damageLoopSfxDelayTicks = 2;
|
2017-08-16 05:34:02 +00:00
|
|
|
float xa30_samusExhaustedVoiceTimer = 4.f;
|
2016-12-19 18:27:58 +00:00
|
|
|
|
2017-06-12 04:23:34 +00:00
|
|
|
void StartLandingControlFreeze();
|
|
|
|
void EndLandingControlFreeze();
|
|
|
|
void ProcessFrozenInput(float dt, CStateManager& mgr);
|
|
|
|
bool CheckSubmerged() const;
|
|
|
|
void UpdateSubmerged(CStateManager& mgr);
|
2017-06-18 01:58:13 +00:00
|
|
|
void InitializeBallTransition();
|
2017-08-16 05:34:02 +00:00
|
|
|
float UpdateCameraBob(float dt, CStateManager& mgr);
|
|
|
|
float GetAcceleration() const;
|
2017-08-20 05:23:22 +00:00
|
|
|
float CalculateOrbitMinDistance(EPlayerOrbitType type) const;
|
2017-06-12 04:23:34 +00:00
|
|
|
|
2016-07-22 19:46:30 +00:00
|
|
|
public:
|
2017-09-05 03:00:19 +00:00
|
|
|
CPlayer(TUniqueId uid, const zeus::CTransform& xf, const zeus::CAABox& aabb, CAssetId resId,
|
|
|
|
const zeus::CVector3f& playerScale, float mass, float stepUp, float stepDown, float ballRadius,
|
|
|
|
const CMaterialList& ml);
|
2016-08-14 21:11:44 +00:00
|
|
|
|
2016-08-15 01:19:04 +00:00
|
|
|
bool IsTransparent() const;
|
2017-08-25 06:18:09 +00:00
|
|
|
bool GetControlsFrozen() const { return x760_controlsFrozen; }
|
2017-08-18 01:30:15 +00:00
|
|
|
float GetTransitionAlpha(const zeus::CVector3f& camPos, float zNear) const;
|
|
|
|
s32 ChooseTransitionToAnimation(float dt, CStateManager& mgr) const;
|
|
|
|
void TransitionToMorphBallState(float dt, CStateManager& mgr);
|
|
|
|
void TransitionFromMorphBallState(CStateManager& mgr);
|
|
|
|
s32 GetNextBallTransitionAnim(float dt, bool& loopOut, CStateManager& mgr);
|
2017-08-16 05:34:02 +00:00
|
|
|
void UpdateMorphBallTransition(float dt, CStateManager& mgr);
|
|
|
|
void UpdateGunAlpha();
|
2017-08-18 01:30:15 +00:00
|
|
|
void UpdatePlayerSounds(float dt);
|
2016-08-15 01:19:04 +00:00
|
|
|
void Update(float, CStateManager& mgr);
|
2017-08-02 07:13:11 +00:00
|
|
|
void PostUpdate(float, CStateManager& mgr);
|
2017-06-12 04:23:34 +00:00
|
|
|
bool StartSamusVoiceSfx(u16 sfx, float vol, int prio);
|
2016-08-15 01:19:04 +00:00
|
|
|
bool IsPlayerDeadEnough() const;
|
|
|
|
void AsyncLoadSuit(CStateManager& mgr);
|
|
|
|
void LoadAnimationTokens();
|
2017-07-05 18:34:12 +00:00
|
|
|
bool HasTransitionBeamModel() const;
|
2017-08-20 05:23:22 +00:00
|
|
|
bool CanRenderUnsorted(const CStateManager& mgr) const;
|
|
|
|
const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f& v1, const zeus::CVector3f& v2,
|
|
|
|
const CDamageInfo& info) const;
|
|
|
|
const CDamageVulnerability* GetDamageVulnerability() const;
|
|
|
|
zeus::CVector3f GetHomingPosition(const CStateManager& mgr, float) const;
|
|
|
|
zeus::CVector3f GetAimPosition(const CStateManager& mgr, float) const;
|
|
|
|
void FluidFXThink(CActor::EFluidState, CScriptWater& water, CStateManager& mgr);
|
2017-07-05 18:34:12 +00:00
|
|
|
zeus::CVector3f GetDamageLocationWR() const { return x564_damageLocation; }
|
|
|
|
float GetPrevDamageAmount() const { return x560_prevDamageAmt; }
|
|
|
|
float GetDamageAmount() const { return x55c_damageAmt; }
|
|
|
|
bool WasDamaged() const { return x558_wasDamaged; }
|
2016-08-15 01:19:04 +00:00
|
|
|
void TakeDamage(bool, const zeus::CVector3f&, float, EWeaponType, CStateManager& mgr);
|
|
|
|
void Accept(IVisitor& visitor);
|
2017-08-20 05:23:22 +00:00
|
|
|
CHealthInfo* HealthInfo(CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
bool IsUnderBetaMetroidAttack(CStateManager& mgr) const;
|
|
|
|
rstl::optional_object<zeus::CAABox> GetTouchBounds() const;
|
2017-07-20 06:04:40 +00:00
|
|
|
void Touch(CActor& actor, CStateManager& mgr);
|
2017-03-24 05:30:16 +00:00
|
|
|
void DoPreThink(float dt, CStateManager& mgr);
|
2017-03-26 05:53:04 +00:00
|
|
|
void DoThink(float dt, CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
void UpdateScanningState(const CFinalInput& input, CStateManager& mgr, float);
|
2017-07-31 05:19:05 +00:00
|
|
|
bool ValidateScanning(const CFinalInput& input, CStateManager& mgr);
|
|
|
|
void FinishNewScan(CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
void SetScanningState(EPlayerScanState, CStateManager& mgr);
|
2017-01-07 01:58:05 +00:00
|
|
|
void SetSpawnedMorphBallState(EPlayerMorphBallState, CStateManager&);
|
2016-08-15 01:19:04 +00:00
|
|
|
bool GetExplorationMode() const;
|
|
|
|
bool GetCombatMode() const;
|
2017-03-06 06:33:51 +00:00
|
|
|
void RenderGun(const CStateManager& mgr, const zeus::CVector3f&) const;
|
|
|
|
void Render(const CStateManager& mgr) const;
|
2017-07-31 05:19:05 +00:00
|
|
|
void RenderReflectedPlayer(CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
void PreRender(CStateManager& mgr, const zeus::CFrustum&);
|
2016-11-20 21:53:15 +00:00
|
|
|
void CalculateRenderBounds();
|
2017-07-31 05:19:05 +00:00
|
|
|
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const;
|
2016-08-15 01:19:04 +00:00
|
|
|
void ComputeFreeLook(const CFinalInput& input);
|
2017-07-16 06:13:37 +00:00
|
|
|
void UpdateFreeLookState(const CFinalInput&, float dt, CStateManager&);
|
2016-08-15 01:19:04 +00:00
|
|
|
void UpdateFreeLook(float dt);
|
|
|
|
float GetMaximumPlayerPositiveVerticalVelocity(CStateManager&) const;
|
|
|
|
void ProcessInput(const CFinalInput&, CStateManager&);
|
2017-07-16 06:13:37 +00:00
|
|
|
bool ShouldSampleFailsafe(CStateManager& mgr) const;
|
|
|
|
void CalculateLeaveMorphBallDirection(const CFinalInput& input);
|
|
|
|
void CalculatePlayerControlDirection(CStateManager& mgr);
|
|
|
|
void CalculatePlayerMovementDirection(float dt);
|
2017-03-29 02:51:12 +00:00
|
|
|
void Stop(CStateManager& stateMgr);
|
2017-08-13 05:26:14 +00:00
|
|
|
void Freeze(CStateManager& stateMgr, CAssetId steamTxtr, u16 sfx, CAssetId iceTxtr);
|
2016-08-15 01:19:04 +00:00
|
|
|
bool GetFrozenState() const;
|
2017-07-16 06:13:37 +00:00
|
|
|
void UpdateFrozenState(const CFinalInput& input, CStateManager& mgr);
|
2017-08-16 05:34:02 +00:00
|
|
|
void UpdateStepCameraZBias(float dt);
|
|
|
|
void UpdateWaterSurfaceCameraBias(CStateManager& mgr);
|
|
|
|
void UpdatePhazonCameraShake(float dt, CStateManager& mgr);
|
|
|
|
void UpdatePhazonDamage(float dt, CStateManager& mgr);
|
2017-08-19 06:52:13 +00:00
|
|
|
void ResetPlayerHintState();
|
|
|
|
bool SetAreaPlayerHint(const CScriptPlayerHint& hint, CStateManager& mgr);
|
|
|
|
void AddToPlayerHintRemoveList(TUniqueId id, CStateManager& mgr);
|
|
|
|
void AddToPlayerHintAddList(TUniqueId id, CStateManager& mgr);
|
|
|
|
void DeactivatePlayerHint(TUniqueId id, CStateManager& mgr);
|
2017-08-16 05:34:02 +00:00
|
|
|
void UpdatePlayerHints(CStateManager& mgr);
|
|
|
|
void UpdateBombJumpStuff();
|
|
|
|
void UpdateTransitionFilter(float dt, CStateManager& mgr);
|
2017-08-19 06:52:13 +00:00
|
|
|
void ResetControlDirectionInterpolation();
|
|
|
|
void SetControlDirectionInterpolation(float time);
|
2017-08-16 05:34:02 +00:00
|
|
|
void UpdatePlayerControlDirection(float dt, CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
void Think(float, CStateManager&);
|
|
|
|
void PreThink(float, CStateManager&);
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
|
2017-08-13 05:26:14 +00:00
|
|
|
void SetVisorSteam(float, float, float, CAssetId, bool);
|
2017-07-16 06:13:37 +00:00
|
|
|
void UpdateFootstepSounds(const CFinalInput& input, CStateManager&, float);
|
2017-06-12 04:23:34 +00:00
|
|
|
u16 GetMaterialSoundUnderPlayer(CStateManager& mgr, const u16*, u32, u16);
|
2017-09-11 02:18:49 +00:00
|
|
|
static u16 SfxIdFromMaterial(const CMaterialList&, const u16*, u32, u16);
|
2016-08-15 01:19:04 +00:00
|
|
|
void UpdateCrosshairsState(const CFinalInput&);
|
|
|
|
void UpdateVisorTransition(float, CStateManager& mgr);
|
|
|
|
void UpdateVisorState(const CFinalInput&, float, CStateManager& mgr);
|
2017-07-16 06:13:37 +00:00
|
|
|
void UpdateGunState(const CFinalInput&, CStateManager& mgr);
|
2017-07-19 17:47:57 +00:00
|
|
|
void ResetGun(CStateManager& mgr);
|
|
|
|
void UpdateArmAndGunTransforms(float dt, CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
void ForceGunOrientation(const zeus::CTransform&, CStateManager& mgr);
|
2017-07-16 06:13:37 +00:00
|
|
|
void UpdateCameraState(CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
void UpdateDebugCamera(CStateManager& mgr);
|
2017-07-17 03:04:14 +00:00
|
|
|
void UpdateCameraTimers(float dt, const CFinalInput& input);
|
2017-07-16 06:13:37 +00:00
|
|
|
void UpdateMorphBallState(const CFinalInput&, CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
CFirstPersonCamera& GetFirstPersonCamera(CStateManager& mgr);
|
2017-07-19 17:47:57 +00:00
|
|
|
void UpdateGunTransform(const zeus::CVector3f&, CStateManager& mgr);
|
2017-05-30 03:45:31 +00:00
|
|
|
void UpdateAssistedAiming(const zeus::CTransform& xf, const CStateManager& mgr);
|
|
|
|
void UpdateAimTargetPrediction(const zeus::CTransform& xf, const CStateManager& mgr);
|
|
|
|
void ResetAimTargetPrediction(TUniqueId target);
|
2016-08-15 01:19:04 +00:00
|
|
|
void DrawGun(CStateManager& mgr);
|
|
|
|
void HolsterGun(CStateManager& mgr);
|
2017-05-21 16:01:04 +00:00
|
|
|
EPlayerCameraState GetCameraState() const { return x2f4_cameraState; }
|
2017-08-19 06:52:13 +00:00
|
|
|
EPlayerMorphBallState GetMorphballTransitionState() const { return x2f8_morphBallState; }
|
2017-08-27 03:02:18 +00:00
|
|
|
EGunHolsterState GetGunHolsterState() const { return x498_gunHolsterState; }
|
|
|
|
EPlayerMovementState GetPlayerMovementState() const { return x258_movementState; }
|
2017-07-31 05:19:05 +00:00
|
|
|
bool IsMorphBallTransitioning() const;
|
2016-08-15 01:19:04 +00:00
|
|
|
void UpdateGrappleArmTransform(const zeus::CVector3f&, CStateManager& mgr, float);
|
2017-07-23 23:45:04 +00:00
|
|
|
float GetGravity() const;
|
2016-08-15 01:19:04 +00:00
|
|
|
void ApplyGrappleForces(const CFinalInput& input, CStateManager& mgr, float);
|
|
|
|
bool ValidateFPPosition(const zeus::CVector3f& pos, CStateManager& mgr);
|
|
|
|
void UpdateGrappleState(const CFinalInput& input, CStateManager& mgr);
|
|
|
|
void ApplyGrappleJump(CStateManager& mgr);
|
|
|
|
void BeginGrapple(zeus::CVector3f&, CStateManager& mgr);
|
2017-07-05 18:34:12 +00:00
|
|
|
void BreakGrapple(EPlayerOrbitRequest, CStateManager& mgr);
|
2017-06-12 04:23:34 +00:00
|
|
|
void SetOrbitRequest(EPlayerOrbitRequest req, CStateManager& mgr);
|
2017-08-20 05:23:22 +00:00
|
|
|
void SetOrbitRequestForTarget(TUniqueId id, EPlayerOrbitRequest req, CStateManager& mgr);
|
2017-07-17 03:04:14 +00:00
|
|
|
bool InGrappleJumpCooldown() const;
|
2016-08-15 01:19:04 +00:00
|
|
|
void PreventFallingCameraPitch();
|
|
|
|
void OrbitCarcass(CStateManager&);
|
|
|
|
void OrbitPoint(EPlayerOrbitType, CStateManager& mgr);
|
|
|
|
zeus::CVector3f GetHUDOrbitTargetPosition() const;
|
|
|
|
void SetOrbitState(EPlayerOrbitState, CStateManager& mgr);
|
2017-05-30 03:45:31 +00:00
|
|
|
void SetOrbitTargetId(TUniqueId, CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
void UpdateOrbitPosition(float, CStateManager& mgr);
|
|
|
|
void UpdateOrbitZPosition();
|
|
|
|
void UpdateOrbitFixedPosition();
|
|
|
|
void SetOrbitPosition(float, CStateManager& mgr);
|
|
|
|
void UpdateAimTarget(CStateManager& mgr);
|
|
|
|
void UpdateAimTargetTimer(float);
|
|
|
|
bool ValidateAimTargetId(TUniqueId, CStateManager& mgr);
|
|
|
|
bool ValidateObjectForMode(TUniqueId, CStateManager& mgr) const;
|
|
|
|
TUniqueId FindAimTargetId(CStateManager& mgr);
|
2017-09-02 04:06:05 +00:00
|
|
|
TUniqueId GetAimTarget() const { return x3f4_aimTarget; }
|
2017-09-11 07:08:30 +00:00
|
|
|
TUniqueId CheckEnemiesAgainstOrbitZone(const rstl::reserved_vector<TUniqueId, 1024>&, EPlayerZoneInfo,
|
|
|
|
EPlayerZoneType, CStateManager& mgr) const;
|
2016-08-15 01:19:04 +00:00
|
|
|
TUniqueId FindOrbitTargetId(CStateManager& mgr);
|
|
|
|
void UpdateOrbitableObjects(CStateManager& mgr);
|
|
|
|
TUniqueId FindBestOrbitableObject(const std::vector<TUniqueId>&, EPlayerZoneInfo, CStateManager& mgr) const;
|
2017-05-30 03:45:31 +00:00
|
|
|
void FindOrbitableObjects(const rstl::reserved_vector<TUniqueId, 1024>&, std::vector<TUniqueId>&,
|
|
|
|
EPlayerZoneInfo, EPlayerZoneType, CStateManager& mgr, bool) const;
|
2016-08-15 01:19:04 +00:00
|
|
|
bool WithinOrbitScreenBox(const zeus::CVector3f&, EPlayerZoneInfo, EPlayerZoneType) const;
|
|
|
|
bool WithinOrbitScreenEllipse(const zeus::CVector3f&, EPlayerZoneInfo) const;
|
2017-05-30 03:45:31 +00:00
|
|
|
bool CheckOrbitDisableSourceList(CStateManager& mgr);
|
2017-08-19 06:52:13 +00:00
|
|
|
bool CheckOrbitDisableSourceList() const { return !x9e4_orbitDisableList.empty(); }
|
2016-08-15 01:19:04 +00:00
|
|
|
void RemoveOrbitDisableSource(TUniqueId);
|
|
|
|
void AddOrbitDisableSource(CStateManager& mgr, TUniqueId);
|
|
|
|
void UpdateOrbitPreventionTimer(float);
|
|
|
|
void UpdateOrbitModeTimer(float);
|
|
|
|
void UpdateOrbitZone(CStateManager& mgr);
|
|
|
|
void UpdateOrbitInput(const CFinalInput& input, CStateManager& mgr);
|
2017-06-12 04:23:34 +00:00
|
|
|
void ActivateOrbitSource(CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
void UpdateOrbitSelection(const CFinalInput& input, CStateManager& mgr);
|
|
|
|
void UpdateOrbitOrientation(CStateManager& mgr);
|
|
|
|
void UpdateOrbitTarget(CStateManager& mgr);
|
|
|
|
float GetOrbitMaxLockDistance(CStateManager& mgr) const;
|
|
|
|
float GetOrbitMaxTargetDistance(CStateManager& mgr) const;
|
2017-07-30 01:06:06 +00:00
|
|
|
EOrbitValidationResult ValidateOrbitTargetId(TUniqueId uid, CStateManager& mgr) const;
|
|
|
|
EOrbitValidationResult ValidateCurrentOrbitTargetId(CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
bool ValidateOrbitTargetIdAndPointer(TUniqueId, CStateManager& mgr) const;
|
|
|
|
zeus::CVector3f GetBallPosition() const;
|
|
|
|
zeus::CVector3f GetEyePosition() const;
|
|
|
|
float GetEyeHeight() const;
|
2017-08-06 07:15:42 +00:00
|
|
|
float GetUnbiasedEyeHeight() const;
|
2016-08-15 01:19:04 +00:00
|
|
|
float GetStepUpHeight() const;
|
|
|
|
float GetStepDownHeight() const;
|
2017-08-19 06:52:13 +00:00
|
|
|
void Teleport(const zeus::CTransform& xf, CStateManager& mgr, bool resetBallCam);
|
2017-03-29 02:51:12 +00:00
|
|
|
void BombJump(const zeus::CVector3f& pos, CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
zeus::CTransform CreateTransformFromMovementDirection() const;
|
2017-03-03 22:13:23 +00:00
|
|
|
const CCollisionPrimitive* GetCollisionPrimitive() const;
|
2017-07-16 06:13:37 +00:00
|
|
|
const CCollidableSphere* GetCollidableSphere() const;
|
2016-08-15 01:19:04 +00:00
|
|
|
zeus::CTransform GetPrimitiveTransform() const;
|
2017-06-18 01:58:13 +00:00
|
|
|
void CollidedWith(TUniqueId, const CCollisionInfoList&, CStateManager& mgr);
|
2017-09-17 03:13:03 +00:00
|
|
|
float GetBallMaxVelocity() const;
|
2017-08-06 07:15:42 +00:00
|
|
|
float GetActualBallMaxVelocity(float dt) const;
|
|
|
|
float GetActualFirstPersonMaxVelocity(float dt) const;
|
2016-08-15 01:19:04 +00:00
|
|
|
void SetMoveState(EPlayerMovementState, CStateManager& mgr);
|
|
|
|
float JumpInput(const CFinalInput& input, CStateManager& mgr);
|
|
|
|
float TurnInput(const CFinalInput& input) const;
|
|
|
|
float StrafeInput(const CFinalInput& input) const;
|
|
|
|
float ForwardInput(const CFinalInput& input, float) const;
|
2017-08-16 05:34:02 +00:00
|
|
|
zeus::CVector3f CalculateLeftStickEdgePosition(float strafeInput, float forwardInput) const;
|
|
|
|
bool SidewaysDashAllowed(float strafeInput, float forwardInput,
|
|
|
|
const CFinalInput& input, CStateManager& mgr) const;
|
|
|
|
void FinishSidewaysDash();
|
|
|
|
void ComputeDash(const CFinalInput& input, float dt, CStateManager& mgr);
|
|
|
|
void ComputeMovement(const CFinalInput& input, CStateManager& mgr, float dt);
|
2016-08-15 01:19:04 +00:00
|
|
|
float GetWeight() const;
|
2017-07-05 18:34:12 +00:00
|
|
|
zeus::CVector3f GetDampedClampedVelocityWR() const;
|
2017-02-12 03:17:18 +00:00
|
|
|
const CVisorSteam& GetVisorSteam() const { return x7a0_visorSteam; }
|
2017-05-18 19:27:21 +00:00
|
|
|
float GetVisorStaticAlpha() const { return x74c_visorStaticAlpha; }
|
2017-08-18 01:30:15 +00:00
|
|
|
float GetGunAlpha() const { return x494_gunAlpha; }
|
2017-08-02 07:13:11 +00:00
|
|
|
const CScriptWater* GetVisorRunoffEffect(const CStateManager& mgr) const;
|
|
|
|
void SetMorphBallState(EPlayerMorphBallState state, CStateManager& mgr);
|
|
|
|
bool CanLeaveMorphBallState(CStateManager& mgr, zeus::CVector3f& pos) const;
|
2017-08-19 06:52:13 +00:00
|
|
|
void SetHudDisable(float staticTimer, float outSpeed, float inSpeed);
|
2017-08-02 07:13:11 +00:00
|
|
|
void SetIntoBallReadyAnimation(CStateManager& mgr);
|
|
|
|
void LeaveMorphBallState(CStateManager& mgr);
|
|
|
|
bool CanEnterMorphBallState(CStateManager& mgr, float f1) const;
|
|
|
|
void EnterMorphBallState(CStateManager& mgr);
|
|
|
|
void ActivateMorphBallCamera(CStateManager& mgr);
|
2017-02-18 02:19:50 +00:00
|
|
|
void UpdateCinematicState(CStateManager& mgr);
|
2017-03-24 05:30:16 +00:00
|
|
|
void SetCameraState(EPlayerCameraState camState, CStateManager& stateMgr);
|
2017-04-02 03:03:37 +00:00
|
|
|
bool IsEnergyLow(const CStateManager& mgr) const;
|
2017-04-03 01:39:23 +00:00
|
|
|
EPlayerOrbitState GetOrbitState() const { return x304_orbitState; }
|
2017-04-02 03:03:37 +00:00
|
|
|
EPlayerScanState GetScanningState() const { return x3a8_scanState; }
|
|
|
|
float GetScanningTime() const { return x3ac_scanningTime; }
|
2017-06-12 04:23:34 +00:00
|
|
|
TUniqueId GetOrbitTargetId() const { return x310_orbitTargetId; }
|
2017-09-02 04:06:05 +00:00
|
|
|
TUniqueId GetOrbitNextTargetId() const { return x33c_orbitNextTargetId; }
|
2017-04-02 03:03:37 +00:00
|
|
|
TUniqueId GetScanningObjectId() const { return x3b4_scanningObject; }
|
2017-07-17 03:04:14 +00:00
|
|
|
EGrappleState GetGrappleState() const { return x3b8_grappleState; }
|
2017-04-02 03:03:37 +00:00
|
|
|
bool IsNewScanScanning() const { return x9c6_30_newScanScanning; }
|
2017-04-09 06:14:22 +00:00
|
|
|
float GetThreatOverride() const { return xa1c_threatOverride; }
|
2017-04-07 05:35:09 +00:00
|
|
|
bool IsOverrideRadarRadius() const { return x9c6_31_overrideRadarRadius; }
|
|
|
|
float GetRadarXYRadiusOverride() const { return xa20_radarXYRadiusOverride; }
|
|
|
|
float GetRadarZRadiusOverride() const { return xa24_radarZRadiusOverride; }
|
2017-04-02 03:03:37 +00:00
|
|
|
bool ObjectInScanningRange(TUniqueId id, const CStateManager& mgr) const;
|
2017-04-03 01:39:23 +00:00
|
|
|
float GetMorphTime() const { return x574_morphTime; }
|
|
|
|
float GetMorphDuration() const { return x578_morphDuration; }
|
2017-10-15 05:38:10 +00:00
|
|
|
float GetMorphFactor() const
|
|
|
|
{
|
|
|
|
if (0.f != x578_morphDuration)
|
|
|
|
return zeus::clamp(0.f, x574_morphTime / x578_morphDuration, 1.f);
|
|
|
|
return 0.f;
|
|
|
|
}
|
2017-04-07 05:35:09 +00:00
|
|
|
bool IsInFreeLook() const { return x3dc_inFreeLook; }
|
2017-08-27 03:02:18 +00:00
|
|
|
bool GetFreeLookStickState() const { return x3de_lookAnalogHeld; }
|
2017-02-18 02:19:50 +00:00
|
|
|
CPlayerGun* GetPlayerGun() const { return x490_gun.get(); }
|
|
|
|
CMorphBall* GetMorphBall() const { return x768_morphball.get(); }
|
2017-04-09 06:14:22 +00:00
|
|
|
CPlayerCameraBob* GetCameraBob() const { return x76c_cameraBob.get(); }
|
2017-05-21 16:01:04 +00:00
|
|
|
float GetDeathTime() const { return x9f4_deathTime; }
|
|
|
|
const CPlayerEnergyDrain& GetEnergyDrain() const { return x274_energyDrain; }
|
2017-08-19 06:52:13 +00:00
|
|
|
EPlayerZoneInfo GetOrbitZone() const { return x330_orbitZoneMode; }
|
2017-05-30 03:45:31 +00:00
|
|
|
EPlayerZoneType GetOrbitType() const { return x334_orbitType; }
|
|
|
|
const zeus::CTransform& GetFirstPersonCameraTransform(const CStateManager& mgr) const;
|
|
|
|
const std::vector<TUniqueId>& GetNearbyOrbitObjects() const { return x344_nearbyOrbitObjects; }
|
|
|
|
const std::vector<TUniqueId>& GetOnScreenOrbitObjects() const { return x354_onScreenOrbitObjects; }
|
|
|
|
const std::vector<TUniqueId>& GetOffScreenOrbitObjects() const { return x364_offScreenOrbitObjects; }
|
2017-06-19 07:00:50 +00:00
|
|
|
void SetPlayerHitWallDuringMove();
|
2017-08-19 06:52:13 +00:00
|
|
|
ESurfaceRestraints GetCurrentSurfaceRestraint() const { return x2ac_surfaceRestraint; }
|
|
|
|
ESurfaceRestraints GetSurfaceRestraint() const
|
|
|
|
{ return x2b0_outOfWaterTicks == 2 ? GetCurrentSurfaceRestraint() : ESurfaceRestraints::Water; }
|
2017-01-15 03:59:37 +00:00
|
|
|
void DecrementPhazon();
|
|
|
|
void IncrementPhazon();
|
2017-06-12 04:23:34 +00:00
|
|
|
void ApplySubmergedPitchBend(CSfxHandle& sfx);
|
2017-08-19 06:52:13 +00:00
|
|
|
void DetachActorFromPlayer();
|
|
|
|
bool AttachActorToPlayer(TUniqueId id, bool disableGun);
|
2017-08-25 06:18:09 +00:00
|
|
|
TUniqueId GetAttachedActor() const { return x26c_attachedActor; }
|
2017-08-19 06:52:13 +00:00
|
|
|
float GetAttachedActorStruggle() const { return xa28_attachedActorStruggle; }
|
2017-08-25 06:18:09 +00:00
|
|
|
float GetDistanceUnderWater() const { return x828_distanceUnderWater; }
|
2017-08-29 13:17:52 +00:00
|
|
|
TUniqueId GetRidingPlatformId() const { return x82e_ridingPlatform; }
|
2017-09-12 05:51:17 +00:00
|
|
|
const zeus::CVector3f& GetLastVelocity() const { return x794_lastVelocity; }
|
2017-10-06 07:29:56 +00:00
|
|
|
const zeus::CVector3f& GetMoveDir() const { return x50c_moveDir; }
|
2017-10-10 03:50:48 +00:00
|
|
|
const zeus::CVector3f& GetLeaveMorphDir() const { return x518_leaveMorphDir; }
|
2017-10-09 02:41:50 +00:00
|
|
|
u32 GetBombJumpCount() const { return x9d0_bombJumpCount; }
|
2017-10-14 06:34:57 +00:00
|
|
|
float GetMoveSpeed() const { return x4f8_moveSpeed; }
|
2017-10-30 03:37:20 +00:00
|
|
|
EPlayerOrbitRequest GetOrbitRequest() const { return x30c_orbitRequest; }
|
|
|
|
bool IsShowingCrosshairs() const { return x9c4_25_showCrosshairs; }
|
2016-07-22 19:46:30 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CPLAYER_HPP__
|