forked from UNLOZE/sm-plugins
PlayerRankings: Send trough ent refs
hopefully this fixes the random rotating entities, whoops.
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user