| 78 | } |
| 79 | |
| 80 | PlayerController::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 | |
| 113 | void PlayerController::onUpdate(float deltaTime) |
| 114 | { |
nothing calls this directly
no test coverage detected