Undid portions of revision 3261: get_{pcvar,cvar}_num discrepancies, the added overhead just wasn't worth how stupidly rare the occurrences were.

This commit is contained in:
Steve Dudenhoeffer 2007-06-25 03:23:19 +00:00
parent ce526ac432
commit 16c17cff63

View File

@ -1759,7 +1759,7 @@ static cell AMX_NATIVE_CALL get_pcvar_num(AMX *amx, cell *params)
return 0; return 0;
} }
return atoi(ptr->string); return (int)ptr->value;
} }
static cell AMX_NATIVE_CALL get_cvar_num(AMX *amx, cell *params) /* 1 param */ static cell AMX_NATIVE_CALL get_cvar_num(AMX *amx, cell *params) /* 1 param */
@ -1777,7 +1777,7 @@ static cell AMX_NATIVE_CALL get_cvar_num(AMX *amx, cell *params) /* 1 param */
} }
} }
} }
return atoi(CVAR_GET_STRING(get_amxstring(amx, params[1], 0, ilen))); return (int)CVAR_GET_FLOAT(get_amxstring(amx, params[1], 0, ilen));
} }
static cell AMX_NATIVE_CALL set_pcvar_num(AMX *amx, cell *params) static cell AMX_NATIVE_CALL set_pcvar_num(AMX *amx, cell *params)