Quick patch for possible bug at15468
This commit is contained in:
parent
0d90a958ae
commit
559d8bc7eb
@ -403,11 +403,6 @@ static cell AMX_NATIVE_CALL attach_view(AMX *amx, cell *params)
|
||||
int iIndex = params[1];
|
||||
int iTargetIndex = params[2];
|
||||
|
||||
if (iIndex > gpGlobals->maxClients || !MF_IsPlayerIngame(iIndex)) {
|
||||
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", iIndex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
CHECK_ENTITY(iIndex);
|
||||
|
||||
SET_VIEW(INDEXENT2(iIndex), INDEXENT2(iTargetIndex));
|
||||
|
@ -162,7 +162,7 @@ extern edict_t *g_player_edicts[33];
|
||||
inline edict_t* INDEXENT2( int iEdictNum )
|
||||
{
|
||||
if (iEdictNum >= 1 && iEdictNum <= gpGlobals->maxClients)
|
||||
return g_player_edicts[iEdictNum];
|
||||
return MF_GetPlayerEdict(iEdictNum);
|
||||
|
||||
else
|
||||
return (*g_engfuncs.pfnPEntityOfEntIndex)(iEdictNum);
|
||||
|
Loading…
Reference in New Issue
Block a user