From 2f64226c6badcd418c4a3d05cbce12993181d8fd Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 15 Jul 2005 20:50:23 +0000 Subject: [PATCH] Fixed bug at11988 reported by twilight suzuka --- dlls/fakemeta/pev.cpp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/dlls/fakemeta/pev.cpp b/dlls/fakemeta/pev.cpp index 6e089b2c..641b1398 100755 --- a/dlls/fakemeta/pev.cpp +++ b/dlls/fakemeta/pev.cpp @@ -4,22 +4,6 @@ static cell AMX_NATIVE_CALL amx_pev(AMX *amx,cell *params) { int index=params[1]; -#ifdef DONT_TOUCH_THIS_AGAIN_BAIL - if (index >= 1 && index <= gpGlobals->maxClients) - { - if (!MF_IsPlayerIngame(index)) - { - MF_LogError(amx, AMX_ERR_NATIVE, "Player %d is not in game", index); - return 0; - } - } else { - if (index > gpGlobals->maxEntities || index < 1) - { - MF_LogError(amx, AMX_ERR_NATIVE, "Invalid entity %d", index); - return 0; - } - } -#endif CHECK_ENTITY(index); edict_t *pPlayer = INDEXENT2(index); int returntype = *params/sizeof(cell); @@ -629,7 +613,9 @@ static cell AMX_NATIVE_CALL amx_set_pev(AMX *amx, cell *params) if (iSwitch > pev_int_start && iSwitch < pev_int_end) { // Grrr... - int iValue = blah[0]; + int len; + char *string = MF_GetAmxString(amx, params[3], 0, &len); + int iValue = ALLOC_STRING(string); switch(iSwitch) { case fixangle: