Merge pull request #345 from Arkshine/fix/engine-bcomp
Engine: Fix more bcompat for CHECK_ENTITY
This commit is contained in:
commit
b00ca9bb7a
@ -1338,9 +1338,6 @@ static cell AMX_NATIVE_CALL get_entity_pointer(AMX *amx, cell *params) // get_en
|
|||||||
static cell AMX_NATIVE_CALL find_ent_in_sphere(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL find_ent_in_sphere(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int idx = params[1];
|
int idx = params[1];
|
||||||
if (idx > 0) {
|
|
||||||
CHECK_ENTITY_SIMPLE(idx);
|
|
||||||
}
|
|
||||||
|
|
||||||
edict_t *pEnt = TypeConversion.id_to_edict(idx);
|
edict_t *pEnt = TypeConversion.id_to_edict(idx);
|
||||||
cell *cAddr = MF_GetAmxAddr(amx, params[2]);
|
cell *cAddr = MF_GetAmxAddr(amx, params[2]);
|
||||||
@ -1361,12 +1358,7 @@ static cell AMX_NATIVE_CALL find_ent_in_sphere(AMX *amx, cell *params)
|
|||||||
|
|
||||||
static cell AMX_NATIVE_CALL find_ent_by_class(AMX *amx, cell *params) /* 3 param */
|
static cell AMX_NATIVE_CALL find_ent_by_class(AMX *amx, cell *params) /* 3 param */
|
||||||
{
|
{
|
||||||
int idx = params[1];
|
edict_t *pEnt = TypeConversion.id_to_edict(params[1]);
|
||||||
if (idx > 0) {
|
|
||||||
CHECK_ENTITY_SIMPLE(idx);
|
|
||||||
}
|
|
||||||
|
|
||||||
edict_t *pEnt = TypeConversion.id_to_edict(idx);
|
|
||||||
|
|
||||||
int len;
|
int len;
|
||||||
char* sValue = MF_GetAmxString(amx, params[2], 0, &len);
|
char* sValue = MF_GetAmxString(amx, params[2], 0, &len);
|
||||||
@ -1502,9 +1494,6 @@ static cell AMX_NATIVE_CALL find_ent_by_owner(AMX *amx, cell *params) // native
|
|||||||
{
|
{
|
||||||
int iEnt = params[1];
|
int iEnt = params[1];
|
||||||
int oEnt = params[3];
|
int oEnt = params[3];
|
||||||
if (iEnt > 0) {
|
|
||||||
CHECK_ENTITY_SIMPLE(iEnt);
|
|
||||||
}
|
|
||||||
CHECK_ENTITY_SIMPLE(oEnt);
|
CHECK_ENTITY_SIMPLE(oEnt);
|
||||||
|
|
||||||
edict_t *pEnt = TypeConversion.id_to_edict(iEnt);
|
edict_t *pEnt = TypeConversion.id_to_edict(iEnt);
|
||||||
|
Loading…
Reference in New Issue
Block a user