diff --git a/dlls/engine/engine.cpp b/dlls/engine/engine.cpp index 3ba2c1a4..ffe59d07 100755 --- a/dlls/engine/engine.cpp +++ b/dlls/engine/engine.cpp @@ -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)); diff --git a/dlls/engine/engine.h b/dlls/engine/engine.h index 36717d10..6c27d927 100755 --- a/dlls/engine/engine.h +++ b/dlls/engine/engine.h @@ -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);