cleanup fixme's, todo's

This commit is contained in:
Lion Kortlepel 2022-03-24 14:26:02 +01:00
parent 5180c96e2b
commit d0bb32ec63
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B
5 changed files with 2 additions and 6 deletions

View File

@ -5,8 +5,6 @@
#include <memory>
#include <optional>
// FIXME: add debug prints
void TClient::DeleteCar(int Ident) {
std::unique_lock lock(mVehicleDataMutex);
auto iter = std::find_if(mVehicleData.begin(), mVehicleData.end(), [&](auto& elem) {

View File

@ -61,7 +61,6 @@ std::array<uint8_t, 3> Application::VersionStrToInts(const std::string& str) {
return Version;
}
// FIXME: This should be used by operator< on Version
bool Application::IsOutdated(const Version& Current, const Version& Newest) {
if (Newest.major > Current.major) {
return true;

View File

@ -327,7 +327,6 @@ std::set<std::string> TLuaEngine::GetEventHandlersForState(const std::string& Ev
sol::table TLuaEngine::StateThreadData::Lua_TriggerGlobalEvent(const std::string& EventName, sol::variadic_args EventArgs) {
auto Return = mEngine->TriggerEvent(EventName, mStateId, EventArgs);
// TODO Synchronous call to the event handlers
auto MyHandlers = mEngine->GetEventHandlersForState(EventName, mStateId);
for (const auto& Handler : MyHandlers) {
auto Fn = mStateView[Handler];

View File

@ -472,7 +472,7 @@ std::string TNetwork::TCPRcv(TClient& c) {
void TNetwork::ClientKick(TClient& c, const std::string& R) {
beammp_info("Client kicked: " + R);
if (!TCPSend(c, "K" + R)) {
// TODO handle
beammp_warn("tried to kick player '" + c.GetName() + "' (id " + std::to_string(c.GetID()) + "), but was already disconnected");
}
c.SetStatus(-2);

View File

@ -125,7 +125,7 @@ void TServer::GlobalParser(const std::weak_ptr<TClient>& Client, std::string Pac
break;
auto Futures = LuaAPI::MP::Engine->TriggerEvent("onChatMessage", "", LockedClient->GetID(), LockedClient->GetName(), Packet.substr(Packet.find(':', 3) + 2));
TLuaEngine::WaitForAll(Futures);
LogChatMessage(LockedClient->GetName(), LockedClient->GetID(), Packet.substr(Packet.find(':', 3) + 1)); // FIXME: this needs to be adjusted once lua is merged
LogChatMessage(LockedClient->GetName(), LockedClient->GetID(), Packet.substr(Packet.find(':', 3) + 1));
if (std::any_of(Futures.begin(), Futures.end(),
[](const std::shared_ptr<TLuaResult>& Elem) {
return !Elem->Error