mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-23 12:18:03 +03:00
Tweaked register_impulse
This commit is contained in:
parent
88e199ff10
commit
7d3d04b13d
@ -46,7 +46,7 @@ static cell AMX_NATIVE_CALL register_impulse(AMX *amx, cell *params)
|
|||||||
Impulse *p = new Impulse;
|
Impulse *p = new Impulse;
|
||||||
p->Check = params[1];
|
p->Check = params[1];
|
||||||
|
|
||||||
p->Forward = MF_RegisterSPForwardByName(amx, MF_GetAmxString(amx, params[2], 0, &len), FP_CELL, FP_DONE);
|
p->Forward = MF_RegisterSPForwardByName(amx, MF_GetAmxString(amx, params[2], 0, &len), FP_CELL, FP_CELL, FP_DONE);
|
||||||
|
|
||||||
Impulses.push_back(p);
|
Impulses.push_back(p);
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ void CmdStart(const edict_t *player, const struct usercmd_s *_cmd, unsigned int
|
|||||||
{
|
{
|
||||||
if (Impulses[i]->Check == g_cmd->impulse)
|
if (Impulses[i]->Check == g_cmd->impulse)
|
||||||
{
|
{
|
||||||
retVal = MF_ExecuteForward(Impulses[i]->Forward, ENTINDEX(pEntity));
|
retVal = MF_ExecuteForward(Impulses[i]->Forward, ENTINDEX(pEntity),origImpulse);
|
||||||
if (retVal & 2 /*PLUGIN_HANDLED_MAIN*/)
|
if (retVal & 2 /*PLUGIN_HANDLED_MAIN*/)
|
||||||
{
|
{
|
||||||
g_cmd->impulse=0;
|
g_cmd->impulse=0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user