rendered paste body// Flaggame - At the end of a game
///////////////////////////////////////////////////////////
void _stdcall hckFlagGameEnd(DWORD arenabase)
{ //Create the arena structure
if (!arenabase)
return;
arena a(arenabase);
//Trigger the create arena event
if (Lua::IsFunction("On_FlagGameEnd", a.lua()))
{ //Call it!
try
{
luabind::call_function<void>(a.lua(), "On_FlagGameEnd");
}
catch(luabind::error&)
{ //Catch any occuring errors
LOG("Lua") << "Fatal error: " << lua_tostring(a.lua(), -1);
_asm mov eax, [0]
}
catch(...)
{
LOG("Lua") << "Fatal error: Unknown exception from lua event function 'On_FlagGameEnd'.";
}
}
}
__declspec(naked) void prchckFlagGameEnd()
{
_asm
{ pushad
push ecx
call hckFlagGameEnd
popad
push 0x44AD74
push 0x41C38B
retn
}
}