mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-04 00:36:14 +00:00
Create TLuaChunk constructor to satisfy MSVC
This commit is contained in:
parent
701e613990
commit
60b86e2be6
@ -45,6 +45,9 @@ struct TLuaPluginConfig {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TLuaChunk {
|
struct TLuaChunk {
|
||||||
|
TLuaChunk(std::shared_ptr<std::string> Content,
|
||||||
|
std::string FileName,
|
||||||
|
std::string PluginPath);
|
||||||
std::shared_ptr<std::string> Content;
|
std::shared_ptr<std::string> Content;
|
||||||
std::string FileName;
|
std::string FileName;
|
||||||
std::string PluginPath;
|
std::string PluginPath;
|
||||||
|
@ -497,3 +497,9 @@ void TLuaResult::WaitUntilReady() {
|
|||||||
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TLuaChunk::TLuaChunk(std::shared_ptr<std::string> Content, std::string FileName, std::string PluginPath)
|
||||||
|
: Content(Content)
|
||||||
|
, FileName(FileName)
|
||||||
|
, PluginPath(PluginPath) {
|
||||||
|
}
|
||||||
|
@ -40,7 +40,7 @@ TLuaPlugin::TLuaPlugin(TLuaEngine& Engine, const TLuaPluginConfig& Config, const
|
|||||||
beammp_debug("Successfully read \"" + Entry.string() + "\" (" + std::to_string(NRead) + " Bytes)");
|
beammp_debug("Successfully read \"" + Entry.string() + "\" (" + std::to_string(NRead) + " Bytes)");
|
||||||
mFileContents[fs::relative(Entry).string()] = Contents;
|
mFileContents[fs::relative(Entry).string()] = Contents;
|
||||||
// Execute first time
|
// Execute first time
|
||||||
auto Result = mEngine.EnqueueScript(mConfig.StateId, TLuaChunk { Contents, Entry, MainFolder });
|
auto Result = mEngine.EnqueueScript(mConfig.StateId, TLuaChunk(Contents, Entry, MainFolder));
|
||||||
ResultsToCheck.emplace_back(Entry.string(), std::move(Result));
|
ResultsToCheck.emplace_back(Entry.string(), std::move(Result));
|
||||||
} else {
|
} else {
|
||||||
beammp_error("Error while reading script file \"" + Entry.string() + "\". Did the file change while reading?");
|
beammp_error("Error while reading script file \"" + Entry.string() + "\". Did the file change while reading?");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user