mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
Merge pull request #358 from Arkshine/fix/allow-null-invoker-playbackevent
Allow null invoker to be passed in EngFunc_PlayBackEvent (bug 6467)
This commit is contained in:
commit
d4691bb799
@ -899,7 +899,11 @@ static cell AMX_NATIVE_CALL engfunc(AMX *amx, cell *params)
|
|||||||
iparam1 = cRet[0];
|
iparam1 = cRet[0];
|
||||||
cRet = MF_GetAmxAddr(amx,params[3]);
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
index = cRet[0];
|
index = cRet[0];
|
||||||
CHECK_ENTITY(index);
|
if (index != -1)
|
||||||
|
{
|
||||||
|
CHECK_ENTITY(index);
|
||||||
|
pRet = TypeConversion.id_to_edict(index);
|
||||||
|
}
|
||||||
cRet = MF_GetAmxAddr(amx,params[4]);
|
cRet = MF_GetAmxAddr(amx,params[4]);
|
||||||
iparam2 = cRet[0];
|
iparam2 = cRet[0];
|
||||||
cRet = MF_GetAmxAddr(amx,params[5]);
|
cRet = MF_GetAmxAddr(amx,params[5]);
|
||||||
@ -924,7 +928,7 @@ static cell AMX_NATIVE_CALL engfunc(AMX *amx, cell *params)
|
|||||||
iparam5 = cRet[0];
|
iparam5 = cRet[0];
|
||||||
cRet = MF_GetAmxAddr(amx,params[13]);
|
cRet = MF_GetAmxAddr(amx,params[13]);
|
||||||
iparam6 = cRet[0];
|
iparam6 = cRet[0];
|
||||||
(*g_engfuncs.pfnPlaybackEvent)(iparam1,TypeConversion.id_to_edict(index),iparam2,fparam1,Vec1,Vec2,fparam2,fparam3,iparam3,iparam4,iparam5,iparam6);
|
(*g_engfuncs.pfnPlaybackEvent)(iparam1,pRet,iparam2,fparam1,Vec1,Vec2,fparam2,fparam3,iparam3,iparam4,iparam5,iparam6);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
//pfnCheckVisibility
|
//pfnCheckVisibility
|
||||||
|
@ -814,14 +814,14 @@
|
|||||||
{ \
|
{ \
|
||||||
PREPARE_VECTOR(vec); \
|
PREPARE_VECTOR(vec); \
|
||||||
PREPARE_VECTOR(vecb); \
|
PREPARE_VECTOR(vecb); \
|
||||||
FM_ENG_HANDLE(FM_##call, (Engine[FM_##call].at(i), (cell)v, (cell)ENTINDEX((edict_t*)e), (cell)eb, f, p_vec, p_vecb, fb, fc, (cell)vb, (cell)vc, (cell)vd, (cell)ve)); \
|
FM_ENG_HANDLE(FM_##call, (Engine[FM_##call].at(i), (cell)v, e ? (cell)ENTINDEX((edict_t*)e) : -1, (cell)eb, f, p_vec, p_vecb, fb, fc, (cell)vb, (cell)vc, (cell)vd, (cell)ve)); \
|
||||||
RETURN_META(mswi(lastFmRes)); \
|
RETURN_META(mswi(lastFmRes)); \
|
||||||
} \
|
} \
|
||||||
void call##_post (int v, const edict_t *e, unsigned short eb, float f, float *vec, float *vecb, float fb, float fc, int vb, int vc, int vd, int ve) \
|
void call##_post (int v, const edict_t *e, unsigned short eb, float f, float *vec, float *vecb, float fb, float fc, int vb, int vc, int vd, int ve) \
|
||||||
{ \
|
{ \
|
||||||
PREPARE_VECTOR(vec); \
|
PREPARE_VECTOR(vec); \
|
||||||
PREPARE_VECTOR(vecb); \
|
PREPARE_VECTOR(vecb); \
|
||||||
FM_ENG_HANDLE_POST(FM_##call, (EnginePost[FM_##call].at(i), (cell)v, (cell)ENTINDEX((edict_t*)e),(cell)eb, f, p_vec, p_vecb, fb, fc, (cell)vb, (cell)vc, (cell)vd, (cell)ve)); \
|
FM_ENG_HANDLE_POST(FM_##call, (EnginePost[FM_##call].at(i), (cell)v, e ? (cell)ENTINDEX((edict_t*)e) : -1, (cell)eb, f, p_vec, p_vecb, fb, fc, (cell)vb, (cell)vc, (cell)vd, (cell)ve)); \
|
||||||
RETURN_META(MRES_IGNORED); \
|
RETURN_META(MRES_IGNORED); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user