|
|
@ -1,4 +1,5 @@
|
|
|
|
#include "Core.h"
|
|
|
|
#include "Core.h"
|
|
|
|
|
|
|
|
#include "Error.h"
|
|
|
|
#include <Console.h>
|
|
|
|
#include <Console.h>
|
|
|
|
#include <Export.h>
|
|
|
|
#include <Export.h>
|
|
|
|
#include <PluginManager.h>
|
|
|
|
#include <PluginManager.h>
|
|
|
@ -228,8 +229,8 @@ static void enableEvent(int evType,int freq)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (freq < 0)
|
|
|
|
if (freq < 0)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
if (evType < 0 || evType >= EventManager::EventType::EVENT_MAX || evType == EventManager::EventType::TICK)
|
|
|
|
CHECK_INVALID_ARGUMENT(evType >= 0 && evType < EventManager::EventType::EVENT_MAX &&
|
|
|
|
throw std::runtime_error("invalid event type to enable");
|
|
|
|
evType != EventManager::EventType::TICK);
|
|
|
|
EventManager::EventHandler::callback_t fun_ptr = eventHandlers[evType];
|
|
|
|
EventManager::EventHandler::callback_t fun_ptr = eventHandlers[evType];
|
|
|
|
EventManager::EventType::EventType typeToEnable=static_cast<EventManager::EventType::EventType>(evType);
|
|
|
|
EventManager::EventType::EventType typeToEnable=static_cast<EventManager::EventType::EventType>(evType);
|
|
|
|
|
|
|
|
|
|
|
|