MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / PlayerController

Method PlayerController

src/logic/PlayerController.cpp:80–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 }
79
80PlayerController::PlayerController(World::WorldInstance& world,
81 Handle::EntityHandle entity,
82 Daedalus::GameState::NpcHandle scriptInstance)
83 : Controller(world, entity)
84 , m_Inventory(world, scriptInstance)
85 , m_AIStateMachine(world, entity)
86 , m_NPCAnimationHandler(world, entity)
87 , m_AIHandler(world, entity)
88 , m_PathFinder(world)
89 , m_CharacterEquipment(world, entity)
90{
91 m_NPCProperties.enablePhysics = true;
92
93 m_MoveState.direction = Math::float3(1, 0, 0);
94 m_MoveState.position = Math::float3(0, 0, 0);
95 m_MoveState.ground.successful = false;
96 m_MoveState.ground.triangleIndex = 0;
97 m_MoveState.ground.waterDepth = 0;
98 m_MoveState.ground.trianglePosition = Math::float3(0, 0, 0);
99
100 m_ScriptState.npcHandle = scriptInstance;
101
102 m_EquipmentState.weaponMode = EWeaponMode::WeaponNone;
103 m_EquipmentState.activeWeapon.invalidate();
104
105 m_RefuseTalkTime = 0;
106
107 m_LastAniRootPosUpdatedAniHash = 0;
108 m_NoAniRootPosHack = false;
109
110 setBodyState(BS_STAND);
111}
112
113void PlayerController::onUpdate(float deltaTime)
114{

Callers

nothing calls this directly

Calls 1

invalidateMethod · 0.45

Tested by

no test coverage detected