Fix proc to pop from the stack if isfunction call fails.
This commit is contained in:
parent
c20f97faa5
commit
48ee02ea90
@ -1790,7 +1790,9 @@ bool Entity::CastProc(Proc* proc, int8 type, Spawn* target) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(state) {
|
||||||
|
lua_pop(state, 1);
|
||||||
|
}
|
||||||
lua_interface->ResetFunctionStack(state);
|
lua_interface->ResetFunctionStack(state);
|
||||||
if(mutex)
|
if(mutex)
|
||||||
mutex->releasereadlock(__FUNCTION__);
|
mutex->releasereadlock(__FUNCTION__);
|
||||||
|
@ -854,9 +854,9 @@ void LuaInterface::RemoveSpell(LuaSpell* spell, bool call_remove_function, bool
|
|||||||
|
|
||||||
lua_pushstring(spell->state, (char*)reason.c_str());
|
lua_pushstring(spell->state, (char*)reason.c_str());
|
||||||
|
|
||||||
lua_pcall(spell->state, 3, 0, 0);
|
lua_pcall(spell->state, 3, 0, 0);
|
||||||
ResetFunctionStack(spell->state);
|
|
||||||
}
|
}
|
||||||
|
ResetFunctionStack(spell->state);
|
||||||
}
|
}
|
||||||
|
|
||||||
spell->MSpellTargets.readlock(__FUNCTION__, __LINE__);
|
spell->MSpellTargets.readlock(__FUNCTION__, __LINE__);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user