Fixed ent bugs from JGHG
Changed MAKE_STRING to ALLOC_STRING
This commit is contained in:
parent
1d555a66f8
commit
221d5b623d
@ -3,12 +3,8 @@
|
||||
int AmxStringToEngine(AMX *amx, cell param, int &len)
|
||||
{
|
||||
char *szString = MF_GetAmxString(amx, param, 0, &len);
|
||||
char *szCopy = new char[len+1];
|
||||
|
||||
memset(szCopy, 0, len+1);
|
||||
strcpy(szCopy, szString);
|
||||
|
||||
return MAKE_STRING(szCopy);
|
||||
return ALLOC_STRING(szString);
|
||||
}
|
||||
|
||||
void OnAmxxAttach()
|
||||
|
@ -5,7 +5,7 @@ int is_ent_valid(int iEnt)
|
||||
if (iEnt < 1 || iEnt > gpGlobals->maxEntities)
|
||||
return 0;
|
||||
|
||||
if (iEnt >= 1 || iEnt <= 32)
|
||||
if (iEnt >= 1 && iEnt <= 32)
|
||||
if (!MF_IsPlayerIngame(iEnt))
|
||||
return 0;
|
||||
|
||||
@ -91,7 +91,7 @@ static cell AMX_NATIVE_CALL force_use(AMX *amx, cell *params)
|
||||
edict_t *pUser = INDEXENT(iPtr);
|
||||
edict_t *pUsed = INDEXENT(iPtd);
|
||||
|
||||
MDLL_Touch(pUsed, pUser);
|
||||
MDLL_Use(pUsed, pUser);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user