mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-03 08:15:35 +00:00
dirty fix unicycle counting as car
This commit is contained in:
parent
bef623a281
commit
9de5a08b0c
@ -120,7 +120,15 @@ 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 {
|
||||
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());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user