PlayerRankings: Send trough ent refs

hopefully this fixes the random rotating entities, whoops.
This commit is contained in:
zaCade 2019-07-18 11:27:03 +02:00
parent c604047688
commit 978467f3c8

View File

@ -666,8 +666,8 @@ void SpawnCrown(int client)
AcceptEntityInput(entity, "SetParent", client);
DataPack data = new DataPack();
data.WriteCell(entity);
data.WriteCell(client);
data.WriteCell(EntIndexToEntRef(entity));
data.WriteCell(EntIndexToEntRef(client));
data.Reset();
CreateTimer(0.1, OnCrownUpdate, data, TIMER_REPEAT);
@ -713,8 +713,8 @@ void SpawnSkull(int client)
AcceptEntityInput(entity, "SetParent", client);
DataPack data = new DataPack();
data.WriteCell(entity);
data.WriteCell(client);
data.WriteCell(EntIndexToEntRef(entity));
data.WriteCell(EntIndexToEntRef(client));
data.Reset();
CreateTimer(0.1, OnSkullUpdate, data, TIMER_REPEAT);
@ -725,8 +725,8 @@ void SpawnSkull(int client)
//----------------------------------------------------------------------------------------------------
public Action OnCrownUpdate(Handle timer, DataPack data)
{
int entity = data.ReadCell();
int client = data.ReadCell();
int entity = EntRefToEntIndex(data.ReadCell());
int client = EntRefToEntIndex(data.ReadCell());
data.Reset();
if (!IsValidEntity(entity) || !IsClientInGame(client) || !IsPlayerAlive(client))
@ -752,8 +752,8 @@ public Action OnCrownUpdate(Handle timer, DataPack data)
//----------------------------------------------------------------------------------------------------
public Action OnSkullUpdate(Handle timer, DataPack data)
{
int entity = data.ReadCell();
int client = data.ReadCell();
int entity = EntRefToEntIndex(data.ReadCell());
int client = EntRefToEntIndex(data.ReadCell());
data.Reset();
if (!IsValidEntity(entity) || !IsClientInGame(client) || !IsPlayerAlive(client))