compiles now

This commit is contained in:
David Anderson 2004-03-24 00:54:35 +00:00
parent 6d58afcedb
commit 15904761e8

View File

@ -381,6 +381,11 @@ static cell AMX_NATIVE_CALL set_offset_short(AMX *amx, cell *params)
return 0; return 0;
} }
if (!is_PlayerOn[index]) {
AMX_RAISEERROR(amx, AMX_ERR_NATIVE);
return 0;
}
edict_t *pEnt = INDEXENT(index); edict_t *pEnt = INDEXENT(index);
#ifndef __linux__ #ifndef __linux__
@ -404,6 +409,11 @@ static cell AMX_NATIVE_CALL set_offset(AMX *amx, cell *params)
return 0; return 0;
} }
if (!is_PlayerOn[index]) {
AMX_RAISEERROR(amx, AMX_ERR_NATIVE);
return 0;
}
edict_t *pEnt = INDEXENT(index); edict_t *pEnt = INDEXENT(index);
#ifndef __linux__ #ifndef __linux__
@ -429,13 +439,18 @@ static cell AMX_NATIVE_CALL set_offset_float(AMX *amx, cell *params)
return 0; return 0;
} }
if (!is_PlayerOn[index]) {
AMX_RAISEERROR(amx, AMX_ERR_NATIVE);
return 0;
}
edict_t *pEnt = INDEXENT(index); edict_t *pEnt = INDEXENT(index);
#ifndef __linux__ #ifndef __linux__
off -= 5; off -= 5;
#endif #endif
*((float *)Player->pvPrivateData + off) = fNewValue; *((float *)pEnt->pvPrivateData + off) = fNewValue;
return 1; return 1;
} }
@ -501,7 +516,7 @@ static cell AMX_NATIVE_CALL get_offset_float(AMX *amx, cell *params)
{ {
int index = params[1]; int index = params[1];
int off = params[2]; int off = params[2];
//float retVal; float retVal;
if (index < 1 || index > gpGlobals->maxEntities) { if (index < 1 || index > gpGlobals->maxEntities) {
AMX_RAISEERROR(amx, AMX_ERR_NATIVE); AMX_RAISEERROR(amx, AMX_ERR_NATIVE);