mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-30 17:18:00 +00:00
fixing compil warning
This commit is contained in:
@@ -7,15 +7,23 @@
|
||||
|
||||
#include <filesystem>
|
||||
#include "Map/MapInfo.hpp"
|
||||
#include "Exception/Error.hpp"
|
||||
#include "Component/IAControllable/IAControllableComponent.hpp"
|
||||
|
||||
namespace BBM
|
||||
{
|
||||
IAControllableComponent::IAControllableComponent(WAL::Entity &entity, std::string scriptPath)
|
||||
: Component(entity), _scriptPath(scriptPath), _state(), registered(false)
|
||||
: Component(entity),
|
||||
_scriptPath(scriptPath),
|
||||
registered(false),
|
||||
_state()
|
||||
{
|
||||
if (std::filesystem::exists(scriptPath))
|
||||
_state.dofile(scriptPath);
|
||||
if (std::filesystem::exists(scriptPath)) {
|
||||
_state.dofile(scriptPath);
|
||||
}
|
||||
else {
|
||||
throw Error("Couldn't load lua script: " + scriptPath);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user