Fixed bug at11988 reported by twilight suzuka

This commit is contained in:
David Anderson 2005-07-15 20:50:23 +00:00
parent 91da6f1631
commit 2f64226c6b

View File

@ -4,22 +4,6 @@
static cell AMX_NATIVE_CALL amx_pev(AMX *amx,cell *params) static cell AMX_NATIVE_CALL amx_pev(AMX *amx,cell *params)
{ {
int index=params[1]; 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); CHECK_ENTITY(index);
edict_t *pPlayer = INDEXENT2(index); edict_t *pPlayer = INDEXENT2(index);
int returntype = *params/sizeof(cell); 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) if (iSwitch > pev_int_start && iSwitch < pev_int_end)
{ {
// Grrr... // Grrr...
int iValue = blah[0]; int len;
char *string = MF_GetAmxString(amx, params[3], 0, &len);
int iValue = ALLOC_STRING(string);
switch(iSwitch) switch(iSwitch)
{ {
case fixangle: case fixangle: