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;
|
||||
}
|
||||
}
|
||||
|
||||
else if(state) {
|
||||
lua_pop(state, 1);
|
||||
}
|
||||
lua_interface->ResetFunctionStack(state);
|
||||
if(mutex)
|
||||
mutex->releasereadlock(__FUNCTION__);
|
||||
|
@ -855,8 +855,8 @@ void LuaInterface::RemoveSpell(LuaSpell* spell, bool call_remove_function, bool
|
||||
lua_pushstring(spell->state, (char*)reason.c_str());
|
||||
|
||||
lua_pcall(spell->state, 3, 0, 0);
|
||||
ResetFunctionStack(spell->state);
|
||||
}
|
||||
ResetFunctionStack(spell->state);
|
||||
}
|
||||
|
||||
spell->MSpellTargets.readlock(__FUNCTION__, __LINE__);
|
||||
|
Loading…
x
Reference in New Issue
Block a user