Update extension.cpp
This commit is contained in:
+5
-5
@@ -142,14 +142,14 @@ DETOUR_DECL_STATIC6(Detour_SendTo, int, int, s, char *, buf, int, len, int, flag
|
||||
{
|
||||
char PlayerReply[1024 * 6];
|
||||
bf_write PlayerReplyPacket(PlayerReply, sizeof(PlayerReply));
|
||||
|
||||
|
||||
PlayerReplyPacket.Reset(); // Build up the packet as a bitbuffer so we can use the nice helper functions to do the work for us
|
||||
|
||||
PlayerReplyPacket.WriteLong(-1); // FF FF FF FF
|
||||
PlayerReplyPacket.WriteByte(68); // 44
|
||||
|
||||
int iPlayers = 0;
|
||||
|
||||
|
||||
PlayerInfo PlayerList[SM_MAXPLAYERS];
|
||||
|
||||
for (int index = 0; index <= SM_MAXPLAYERS; index++)
|
||||
@@ -158,7 +158,7 @@ DETOUR_DECL_STATIC6(Detour_SendTo, int, int, s, char *, buf, int, len, int, flag
|
||||
|
||||
if (pPlayer != NULL && pPlayer->IsConnected() && pPlayer->IsInGame() && !pPlayer->IsSourceTV())
|
||||
{
|
||||
memcpy(PlayerList[iPlayers].Name, pPlayer->GetName(), len);
|
||||
memcpy(PlayerList[iPlayers].Name, pPlayer->GetName(), 32);
|
||||
|
||||
IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
|
||||
|
||||
@@ -177,9 +177,9 @@ DETOUR_DECL_STATIC6(Detour_SendTo, int, int, s, char *, buf, int, len, int, flag
|
||||
iPlayers++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PlayerReplyPacket.WriteByte(iPlayers); // Number of players
|
||||
|
||||
|
||||
for (int index = 0; index < iPlayers; index++)
|
||||
{
|
||||
PlayerReplyPacket.WriteByte(index);
|
||||
|
||||
Reference in New Issue
Block a user