Server: add several getters and setters for AI classes

This commit is contained in:
Kawe Mazidjatari 2024-07-29 12:17:09 +02:00
parent 8af73a20ef
commit fb1d1ba2e2
3 changed files with 40 additions and 2 deletions

View File

@ -142,6 +142,27 @@ public:
inline CAI_Schedule* GetCurSchedule() const { return m_pSchedule; }
float GetTimeScheduleStarted() const { return m_ScheduleState.timeStarted; }
public:
//-----------------------------------------------------
//
// Pathfinding, navigation & movement
//
//-----------------------------------------------------
CAI_Navigator* GetNavigator() { return m_pNavigator; }
const CAI_Navigator* GetNavigator() const { return m_pNavigator; }
CAI_LocalNavigator* GetLocalNavigator() { return m_pLocalNavigator; }
const CAI_LocalNavigator* GetLocalNavigator() const { return m_pLocalNavigator; }
CAI_Pathfinder* GetPathfinder() { return m_pPathfinder; }
const CAI_Pathfinder* GetPathfinder() const { return m_pPathfinder; }
CAI_MoveProbe* GetMoveProbe() { return m_pMoveProbe; }
const CAI_MoveProbe* GetMoveProbe() const { return m_pMoveProbe; }
CAI_Motor* GetMotor() { return m_pMotor; }
const CAI_Motor* GetMotor() const { return m_pMotor; }
private:
int m_threadedPostProcessJob;
bool m_bDoPostProcess;

View File

@ -25,8 +25,19 @@ struct CTriDebugOverlay
OverlayLine_t** m_debugTriOverlayLine;
};
struct CAI_Pathfinder : public CAI_Component
class CAI_Pathfinder : public CAI_Component
{
public:
CAI_Network* GetNetwork() { return m_pNetwork; }
const CAI_Network* GetNetwork() const { return m_pNetwork; }
dtNavMeshQuery* GetNavMeshQuery() { return &m_navQuery; }
const dtNavMeshQuery* GetNavMeshQuery() const { return &m_navQuery; }
dtQueryFilter* GetNavMeshFilter() { return &m_navFilter; }
const dtQueryFilter* GetNavMeshFilter() const { return &m_navFilter; }
private:
CTriDebugOverlay m_TriDebugOverlay;
float m_flLimitDistFactor;
float m_flLastStaleLinkCheckTime;

View File

@ -8,6 +8,7 @@
#ifndef BASECOMBATCHARACTER_H
#define BASECOMBATCHARACTER_H
#include "baseanimatingoverlay.h"
#include "game/server/ai_hull.h"
struct WeaponDropInfo
{
@ -44,6 +45,11 @@ struct CTether
//-----------------------------------------------------------------------------
class CBaseCombatCharacter : public CBaseAnimatingOverlay
{
public:
// Nav hull type
Hull_e GetHullType() const { return m_eHull; }
void SetHullType(Hull_e hullType) { m_eHull = hullType; }
private:
bool m_bPreventWeaponPickup;
char gap_15b1[3];
@ -63,7 +69,7 @@ private:
float m_sharedEnergyRegenRate;
float m_sharedEnergyRegenDelay;
float m_lastSharedEnergyTakeTime;
int m_eHull;
Hull_e m_eHull;
float m_fieldOfViewCos;
Vector3D m_HackedGunPos;
float m_impactEnergyScale;