mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-06 18:08:36 +00:00
fix: Allow entity references for clients with L and N format specifiers (#2244)
This commit is contained in:
parent
cb0f8f0eaa
commit
24679be81a
@ -106,7 +106,7 @@ public:
|
||||
virtual bool IsMapLoading() = 0;
|
||||
virtual bool IsMapRunning() = 0;
|
||||
virtual int MaxClients() = 0;
|
||||
virtual bool DescribePlayer(int index, const char **namep, const char **authp, int *useridp) = 0;
|
||||
virtual bool DescribePlayer(int entRef, const char **namep, const char **authp, int *useridp) = 0;
|
||||
virtual void LogToGame(const char *message) = 0;
|
||||
virtual void ConPrint(const char *message) = 0;
|
||||
virtual void ConsolePrint(const char *fmt, ...) = 0;
|
||||
|
||||
@ -574,8 +574,9 @@ int CoreProviderImpl::MaxClients()
|
||||
return g_Players.MaxClients();
|
||||
}
|
||||
|
||||
bool CoreProviderImpl::DescribePlayer(int index, const char **namep, const char **authp, int *useridp)
|
||||
bool CoreProviderImpl::DescribePlayer(int entRef, const char **namep, const char **authp, int *useridp)
|
||||
{
|
||||
int index = g_HL2.ReferenceToIndex(entRef);
|
||||
CPlayer *player = g_Players.GetPlayerByIndex(index);
|
||||
if (!player || !player->IsConnected())
|
||||
return false;
|
||||
|
||||
@ -56,7 +56,7 @@ public:
|
||||
bool IsMapLoading() override;
|
||||
bool IsMapRunning() override;
|
||||
int MaxClients() override;
|
||||
bool DescribePlayer(int index, const char **namep, const char **authp, int *useridp) override;
|
||||
bool DescribePlayer(int entRef, const char **namep, const char **authp, int *useridp) override;
|
||||
void LogToGame(const char *message) override;
|
||||
void ConPrint(const char *message) override;
|
||||
void ConsolePrint(const char *fmt, ...) override;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user