From 4a41ef667928f6ce95278ff6ec13d2048fafa8b2 Mon Sep 17 00:00:00 2001 From: Eason <62255465+jonathan-up@users.noreply.github.com> Date: Sun, 4 Aug 2024 16:55:34 +0800 Subject: [PATCH] API: Implemented CBasePlayer::Observer_FindNextPlayer() Function (#19) --- regamedll/dlls/API/CSPlayer.cpp | 5 +++++ regamedll/public/regamedll/API/CSPlayer.h | 1 + 2 files changed, 6 insertions(+) diff --git a/regamedll/dlls/API/CSPlayer.cpp b/regamedll/dlls/API/CSPlayer.cpp index 8ebf79306..2252b4164 100644 --- a/regamedll/dlls/API/CSPlayer.cpp +++ b/regamedll/dlls/API/CSPlayer.cpp @@ -412,6 +412,11 @@ EXT_FUNC void CCSPlayer::Observer_SetMode(int iMode) BasePlayer()->Observer_SetMode(iMode); } +EXT_FUNC void CCSPlayer::Observer_FindNextPlayer(bool bReverse, const char *name) +{ + BasePlayer()->Observer_FindNextPlayer(bReverse, name); +} + EXT_FUNC bool CCSPlayer::SelectSpawnSpot(const char *pEntClassName, CBaseEntity *&pSpot) { return BasePlayer()->SelectSpawnSpot(pEntClassName, pSpot); diff --git a/regamedll/public/regamedll/API/CSPlayer.h b/regamedll/public/regamedll/API/CSPlayer.h index f2bfe028b..90c55e2ab 100644 --- a/regamedll/public/regamedll/API/CSPlayer.h +++ b/regamedll/public/regamedll/API/CSPlayer.h @@ -93,6 +93,7 @@ class CCSPlayer: public CCSMonster { virtual void SendItemStatus(); virtual void ReloadWeapons(CBasePlayerItem *pWeapon = nullptr, bool bForceReload = false, bool bForceRefill = false); virtual void Observer_SetMode(int iMode); + virtual void Observer_FindNextPlayer(bool bReverse, const char *name = nullptr); virtual bool SelectSpawnSpot(const char *pEntClassName, CBaseEntity* &pSpot); virtual bool SwitchWeapon(CBasePlayerItem *pWeapon); virtual void SwitchTeam();