Playerlist fix
This commit is contained in:
parent
bdab798f0f
commit
ed4d373ba7
10
src/playerlist.cpp
Executable file → Normal file
10
src/playerlist.cpp
Executable file → Normal file
@ -140,15 +140,7 @@ rgba_t Color(CachedEntity *player)
|
|||||||
|
|
||||||
userdata &AccessData(unsigned steamid)
|
userdata &AccessData(unsigned steamid)
|
||||||
{
|
{
|
||||||
try
|
return data[steamid];
|
||||||
{
|
|
||||||
return data.at(steamid);
|
|
||||||
}
|
|
||||||
catch (std::out_of_range &oor)
|
|
||||||
{
|
|
||||||
data.emplace(steamid, userdata{});
|
|
||||||
return data.at(steamid);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assume player is non-null
|
// Assume player is non-null
|
||||||
|
@ -12,7 +12,7 @@ CTFInventoryManager *CTFInventoryManager::GTFInventoryManager()
|
|||||||
typedef CTFInventoryManager *(*GTFInventoryManager_t)();
|
typedef CTFInventoryManager *(*GTFInventoryManager_t)();
|
||||||
uintptr_t address = gSignatures.GetClientSignature(
|
uintptr_t address = gSignatures.GetClientSignature(
|
||||||
"55 A1 ? ? ? ? 89 E5 5D C3 8D B6 00 00 00 00 55 89 E5 56 53 83 EC ? 8B "
|
"55 A1 ? ? ? ? 89 E5 5D C3 8D B6 00 00 00 00 55 89 E5 56 53 83 EC ? 8B "
|
||||||
"5D ? C7 44 24 ? ? ? ? ?");
|
"5D ? C7 44 24");
|
||||||
GTFInventoryManager_t GTFInventoryManager_fn =
|
GTFInventoryManager_t GTFInventoryManager_fn =
|
||||||
GTFInventoryManager_t(address);
|
GTFInventoryManager_t(address);
|
||||||
return GTFInventoryManager_fn();
|
return GTFInventoryManager_fn();
|
||||||
@ -34,7 +34,7 @@ CTFPlayerInventory *CTFPlayerInventory::GTFPlayerInventory()
|
|||||||
typedef CTFPlayerInventory *(*GTFPlayerInventory_t)();
|
typedef CTFPlayerInventory *(*GTFPlayerInventory_t)();
|
||||||
uintptr_t address = gSignatures.GetClientSignature(
|
uintptr_t address = gSignatures.GetClientSignature(
|
||||||
"55 B8 ? ? ? ? 89 E5 5D C3 8D B6 00 00 00 00 55 B8 ? ? ? ? 89 E5 5D C3 "
|
"55 B8 ? ? ? ? 89 E5 5D C3 8D B6 00 00 00 00 55 B8 ? ? ? ? 89 E5 5D C3 "
|
||||||
"8D B6 00 00 00 00 55 89 E5 57 56 53 83 EC ? 8B 45 ? 8B 5D ?");
|
"8D B6 00 00 00 00 55 89 E5 57 56 53 83 EC ? 8B 45 ? 8B 5D");
|
||||||
GTFPlayerInventory_t GTFPlayerInventory_fn = GTFPlayerInventory_t(address);
|
GTFPlayerInventory_t GTFPlayerInventory_fn = GTFPlayerInventory_t(address);
|
||||||
return GTFPlayerInventory_fn();
|
return GTFPlayerInventory_fn();
|
||||||
}
|
}
|
||||||
@ -42,7 +42,7 @@ CEconItem *CTFPlayerInventory::GetFirstItemOfItemDef(int id)
|
|||||||
{
|
{
|
||||||
typedef CEconItem *(*GetFirstItemOfItemDef_t)(CTFPlayerInventory *, int);
|
typedef CEconItem *(*GetFirstItemOfItemDef_t)(CTFPlayerInventory *, int);
|
||||||
uintptr_t address = gSignatures.GetClientSignature(
|
uintptr_t address = gSignatures.GetClientSignature(
|
||||||
"55 89 E5 57 56 53 83 EC ? 8B 4D ? 0F B7 45 ?");
|
"55 89 E5 57 56 53 83 EC ? 8B 4D ? 0F B7 45");
|
||||||
GetFirstItemOfItemDef_t GetFirstItemOfItemDef_fn =
|
GetFirstItemOfItemDef_t GetFirstItemOfItemDef_fn =
|
||||||
GetFirstItemOfItemDef_t(address);
|
GetFirstItemOfItemDef_t(address);
|
||||||
return GetFirstItemOfItemDef_fn(this, id);
|
return GetFirstItemOfItemDef_fn(this, id);
|
||||||
|
@ -46,8 +46,8 @@ re::CTFPartyClient::MutLocalGroupCriteria(re::CTFPartyClient *client)
|
|||||||
{
|
{
|
||||||
typedef re::ITFGroupMatchCriteria *(*MutLocalGroupCriteria_t)(
|
typedef re::ITFGroupMatchCriteria *(*MutLocalGroupCriteria_t)(
|
||||||
re::CTFPartyClient *);
|
re::CTFPartyClient *);
|
||||||
static uintptr_t addr = gSignatures.GetClientSignature(
|
static uintptr_t addr =
|
||||||
"55 89 E5 8B 45 ? 8B 50 ? C6 80");
|
gSignatures.GetClientSignature("55 89 E5 8B 45 ? 8B 50 ? C6 80");
|
||||||
static MutLocalGroupCriteria_t MutLocalGroupCriteria_fn =
|
static MutLocalGroupCriteria_t MutLocalGroupCriteria_fn =
|
||||||
MutLocalGroupCriteria_t(addr);
|
MutLocalGroupCriteria_t(addr);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user