mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-30 00:37:58 +03:00
Remove more vestiges of old trigger system. Replace TO_LUA_SCRIPT with the enum that used to be there - TO_BODYBAG - so that the following enums still have their same values.
This commit is contained in:
parent
f3354fa0ef
commit
cb1ad16b2d
4 changed files with 1 additions and 46 deletions
|
@ -444,43 +444,6 @@ void GameScript::FreeLevelScripts()
|
|||
ResetLevelTables();
|
||||
}
|
||||
|
||||
bool GameScript::ExecuteTrigger(short index)
|
||||
{
|
||||
return true;
|
||||
/*
|
||||
// Is this a valid trigger?
|
||||
if (index >= m_triggers.size())
|
||||
return true;
|
||||
|
||||
LuaFunction* trigger = m_triggers[index];
|
||||
|
||||
// We want to execute a trigger just one time
|
||||
// TODO: implement in the future continoous trigger?
|
||||
if (trigger->Executed)
|
||||
return true;
|
||||
|
||||
// Get the trigger function name
|
||||
char* name = (char*)trigger->Name.c_str();
|
||||
|
||||
// Execute trigger
|
||||
bool result = (*m_lua)[name]();
|
||||
|
||||
// Trigger was executed, don't execute it anymore
|
||||
trigger->Executed = result;
|
||||
|
||||
m_locals.for_each([&](sol::object const& key, sol::object const& value) {
|
||||
if (value.is<bool>())
|
||||
std::cout << key.as<std::string>() << " " << value.as<bool>() << std::endl;
|
||||
else if (value.is<std::string>())
|
||||
std::cout << key.as<std::string>() << " " << value.as<std::string>() << std::endl;
|
||||
else
|
||||
std::cout << key.as<std::string>() << " " << value.as<int>() << std::endl;
|
||||
});
|
||||
|
||||
return result;
|
||||
*/
|
||||
}
|
||||
|
||||
void JumpToLevel(int levelNum)
|
||||
{
|
||||
if (levelNum >= g_GameFlow->GetNumLevels())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue