mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-02 15:55:30 +00:00
Fixup merge
This commit is contained in:
parent
104737571c
commit
450f0a6875
@ -173,7 +173,7 @@ public:
|
||||
// Debugging functions (slow)
|
||||
std::unordered_map<std::string /*event name */, std::vector<std::string> /* handlers */> Debug_GetEventsForState(TLuaStateId StateId);
|
||||
std::queue<std::pair<TLuaChunk, std::shared_ptr<TLuaResult>>> Debug_GetStateExecuteQueueForState(TLuaStateId StateId);
|
||||
std::queue<std::tuple<std::string, std::shared_ptr<TLuaResult>, std::vector<TLuaArgTypes>>> Debug_GetStateFunctionQueueForState(TLuaStateId StateId);
|
||||
std::vector<QueuedFunction> Debug_GetStateFunctionQueueForState(TLuaStateId StateId);
|
||||
std::vector<TLuaResult> Debug_GetResultsToCheckForState(TLuaStateId StateId);
|
||||
|
||||
private:
|
||||
@ -199,7 +199,7 @@ private:
|
||||
|
||||
// Debug functions, slow
|
||||
std::queue<std::pair<TLuaChunk, std::shared_ptr<TLuaResult>>> Debug_GetStateExecuteQueue();
|
||||
std::queue<std::tuple<std::string, std::shared_ptr<TLuaResult>, std::vector<TLuaArgTypes>>> Debug_GetStateFunctionQueue();
|
||||
std::vector<TLuaEngine::QueuedFunction> Debug_GetStateFunctionQueue();
|
||||
|
||||
private:
|
||||
sol::table Lua_TriggerGlobalEvent(const std::string& EventName, sol::variadic_args EventArgs);
|
||||
|
@ -115,7 +115,7 @@ static inline bool InternalTriggerClientEvent(int PlayerID, const std::string& E
|
||||
auto c = MaybeClient.value().lock();
|
||||
if (!LuaAPI::MP::Engine->Network().Respond(*c, Packet, true)) {
|
||||
beammp_lua_error("Respond failed, dropping client " + std::to_string(PlayerID));
|
||||
Engine->Network().ClientKick(*c, "Disconnected after failing to receive packets");
|
||||
LuaAPI::MP::Engine->Network().ClientKick(*c, "Disconnected after failing to receive packets");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -484,9 +484,9 @@ void TConsole::HandleLuaInternalCommand(const std::string& cmd) {
|
||||
std::vector<std::string> FunctionsInOrder;
|
||||
while (!QueuedFunctions.empty()) {
|
||||
auto Tuple = QueuedFunctions.front();
|
||||
QueuedFunctions.pop();
|
||||
FunctionsInOrder.push_back(std::get<0>(Tuple));
|
||||
FunctionsCount[std::get<0>(Tuple)] += 1;
|
||||
QueuedFunctions.erase(QueuedFunctions.begin());
|
||||
FunctionsInOrder.push_back(Tuple.FunctionName);
|
||||
FunctionsCount[Tuple.FunctionName] += 1;
|
||||
}
|
||||
std::set<std::string> Uniques;
|
||||
for (const auto& Function : FunctionsInOrder) {
|
||||
|
@ -177,8 +177,8 @@ std::queue<std::pair<TLuaChunk, std::shared_ptr<TLuaResult>>> TLuaEngine::Debug_
|
||||
return Result;
|
||||
}
|
||||
|
||||
std::queue<std::tuple<std::string, std::shared_ptr<TLuaResult>, std::vector<TLuaArgTypes>>> TLuaEngine::Debug_GetStateFunctionQueueForState(TLuaStateId StateId) {
|
||||
std::queue<std::tuple<std::string, std::shared_ptr<TLuaResult>, std::vector<TLuaArgTypes>>> Result;
|
||||
std::vector<TLuaEngine::QueuedFunction> TLuaEngine::Debug_GetStateFunctionQueueForState(TLuaStateId StateId) {
|
||||
std::vector<TLuaEngine::QueuedFunction> Result;
|
||||
std::unique_lock Lock(mLuaStatesMutex);
|
||||
Result = mLuaStates.at(StateId)->Debug_GetStateFunctionQueue();
|
||||
return Result;
|
||||
@ -191,7 +191,7 @@ std::vector<TLuaResult> TLuaEngine::Debug_GetResultsToCheckForState(TLuaStateId
|
||||
std::vector<TLuaResult> Result;
|
||||
while (!ResultsToCheckCopy.empty()) {
|
||||
auto ResultToCheck = std::move(ResultsToCheckCopy.front());
|
||||
ResultsToCheckCopy.pop();
|
||||
ResultsToCheckCopy.pop_front();
|
||||
if (ResultToCheck->StateId == StateId) {
|
||||
Result.push_back(*ResultToCheck);
|
||||
}
|
||||
@ -917,7 +917,7 @@ std::queue<std::pair<TLuaChunk, std::shared_ptr<TLuaResult>>> TLuaEngine::StateT
|
||||
return mStateExecuteQueue;
|
||||
}
|
||||
|
||||
std::queue<std::tuple<std::string, std::shared_ptr<TLuaResult>, std::vector<TLuaArgTypes>>> TLuaEngine::StateThreadData::Debug_GetStateFunctionQueue() {
|
||||
std::vector<TLuaEngine::QueuedFunction> TLuaEngine::StateThreadData::Debug_GetStateFunctionQueue() {
|
||||
std::unique_lock Lock(mStateFunctionQueueMutex);
|
||||
return mStateFunctionQueue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user