Fix some natives relying on a known engine bug related to last player's edict being invalid

This commit is contained in:
Arkshine
2015-10-06 16:45:35 +02:00
parent fd0f6cc429
commit 9980b7ac62
10 changed files with 13 additions and 12 deletions

View File

@ -83,7 +83,7 @@ static cell AMX_NATIVE_CALL emit_sound(AMX *amx, cell *params) /* 7 param */
EMIT_SOUND_DYN2(pPlayer->pEdict, channel, szSample, vol, att, flags, pitch);
}
} else {
edict_t* pEdict = INDEXENT(params[1]);
edict_t* pEdict = GETEDICT(params[1]);
if (!FNullEnt(pEdict))
EMIT_SOUND_DYN2(pEdict, channel, szSample, vol, att, flags, pitch);