Fixed SetTeamScore not updating score on client (bug 2736, r=fyren).
This commit is contained in:
parent
f27685717b
commit
c3a98db0ea
@ -171,7 +171,12 @@ static cell_t SetTeamScore(IPluginContext *pContext, const cell_t *params)
|
||||
}
|
||||
|
||||
static int offset = g_pGameHelpers->FindInSendTable(g_Teams[teamindex].ClassName, "m_iScore")->GetOffset();
|
||||
*(int *)((unsigned char *)g_Teams[teamindex].pEnt + offset) = params[2];
|
||||
|
||||
CBaseEntity *pTeam = g_Teams[teamindex].pEnt;
|
||||
*(int *)((unsigned char *)pTeam + offset) = params[2];
|
||||
|
||||
edict_t *pEdict = gameents->BaseEntityToEdict(pTeam);
|
||||
gamehelpers->SetEdictStateChanged(pEdict, offset);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user