mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 23:35:41 +00:00
documentate unicycle dirty fix
This commit is contained in:
parent
9de5a08b0c
commit
a0d9be18b7
@ -120,13 +120,13 @@ void TClient::SetCarData(int Ident, const std::string& Data) {
|
||||
DeleteCar(Ident);
|
||||
}
|
||||
|
||||
// TODO: count unicycles and vehicles different #246 sla-ppy
|
||||
// PROPOSAL: separate unicycles completely from vehicles???
|
||||
int TClient::GetCarCount() const {
|
||||
// mVechileData holds both unicycle and cars which both count towards the maximum car count
|
||||
// spawning a unicycle meant reaching the max, hence being unable to spawn car. this dirty fixes the problem for now.
|
||||
std::unique_lock lock(mVehicleDataMutex);
|
||||
for (auto& v : mVehicleData) {
|
||||
if (v.ID() == mUnicycleID) {
|
||||
return int(mVehicleData.size() - 1); // dont keep track of unicycles
|
||||
return int(mVehicleData.size() - 1);
|
||||
}
|
||||
}
|
||||
return int(mVehicleData.size());
|
||||
|
Loading…
x
Reference in New Issue
Block a user