fix MP.GetPositionRaw

This commit is contained in:
Lion Kortlepel
2024-01-08 17:21:33 +01:00
committed by Lion
parent 0166e488d0
commit a4eb10b6a4
4 changed files with 22 additions and 26 deletions
+3 -1
View File
@@ -53,9 +53,9 @@ std::string TClient::GetCarPositionRaw(int Ident) {
try {
return mVehiclePosition.at(size_t(Ident));
} catch (const std::out_of_range& oor) {
beammp_debugf("Failed to get vehicle position for {}: {}", Ident, oor.what());
return "";
}
return "";
}
void TClient::Disconnect(std::string_view Reason) {
@@ -146,6 +146,8 @@ std::optional<std::weak_ptr<TClient>> GetClient(TServer& Server, int ID) {
MaybeClient = CPtr;
return false;
}
} else {
beammp_debugf("Found an expired client while looking for id {}", ID);
}
return true;
});