Add GetPlayerInfo and GetPlayerForUserID to IVEngineClient.
* Move CRC32_t typedef from CUserCmd.h to PlayerInfo.h. Signed-off-by: aixxe <me@aixxe.net>
This commit is contained in:
parent
e8e7f1d4ae
commit
fd60cdc93b
|
@ -1,7 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
typedef unsigned long CRC32_t;
|
|
||||||
|
|
||||||
class CUserCmd {
|
class CUserCmd {
|
||||||
virtual ~CUserCmd() {};
|
virtual ~CUserCmd() {};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#define SIGNED_GUID_LEN 32
|
||||||
|
|
||||||
|
#define MAX_PLAYER_NAME_LENGTH 32
|
||||||
|
#define MAX_CUSTOM_FILES 4
|
||||||
|
|
||||||
#define LIFE_ALIVE 0
|
#define LIFE_ALIVE 0
|
||||||
#define LIFE_DYING 1
|
#define LIFE_DYING 1
|
||||||
#define LIFE_DEAD 2
|
#define LIFE_DEAD 2
|
||||||
|
|
|
@ -6,6 +6,14 @@ class IVEngineClient {
|
||||||
return GetVirtualFunction<void(*)(IVEngineClient*, int&, int&)>(this, 5)(this, width, height);
|
return GetVirtualFunction<void(*)(IVEngineClient*, int&, int&)>(this, 5)(this, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GetPlayerInfo(int index, player_info_t* infoptr) {
|
||||||
|
return GetVirtualFunction<bool(*)(IVEngineClient*, int, player_info_t*)>(this, 8)(this, index, infoptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
int GetPlayerForUserID(int userid) {
|
||||||
|
return GetVirtualFunction<int(*)(IVEngineClient*, int)>(this, 9)(this, userid);
|
||||||
|
}
|
||||||
|
|
||||||
bool Con_IsVisible() {
|
bool Con_IsVisible() {
|
||||||
return GetVirtualFunction<bool(*)(IVEngineClient*)>(this, 11)(this);
|
return GetVirtualFunction<bool(*)(IVEngineClient*)>(this, 11)(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
typedef unsigned long CRC32_t;
|
||||||
|
|
||||||
|
typedef struct player_info_s {
|
||||||
|
char name[MAX_PLAYER_NAME_LENGTH];
|
||||||
|
int userID;
|
||||||
|
char guid[SIGNED_GUID_LEN + 1];
|
||||||
|
uint32_t friendsID;
|
||||||
|
char friendsName[MAX_PLAYER_NAME_LENGTH];
|
||||||
|
bool fakeplayer;
|
||||||
|
bool ishltv;
|
||||||
|
//bool isreplay;
|
||||||
|
CRC32_t customFiles[MAX_CUSTOM_FILES];
|
||||||
|
unsigned char filesDownloaded;
|
||||||
|
} player_info_t;
|
Loading…
Reference in New Issue