mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-04 00:36:14 +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);
|
DeleteCar(Ident);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: count unicycles and vehicles different #246 sla-ppy
|
||||||
|
// PROPOSAL: separate unicycles completely from vehicles???
|
||||||
int TClient::GetCarCount() const {
|
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());
|
return int(mVehicleData.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user