Skip to content

Commit 8f3a310

Browse files
authored
Merge pull request #1091 from PTemuri/vehicle_size_optimization
Pack Vehicle and StreamInVehicle more tightly
2 parents 7514242 + 7341cac commit 8f3a310

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Server/Components/Vehicles/vehicle.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,22 @@ class Vehicle final : public IVehicle, public PoolIDProvider, public NoCopy
4848
uint8_t landingGear = 1;
4949
bool respawning = false;
5050
bool detaching = false;
51+
bool beenOccupied = false;
5152
FlatHashSet<IPlayer*> passengers;
5253
HybridString<16> numberPlate = StringView("XYZSR998");
5354
uint8_t objective;
5455
uint8_t doorsLocked;
56+
uint8_t sirenState = 0;
5557
VehicleDeathData deathData;
5658
TimePoint timeOfSpawn;
5759
TimePoint lastOccupiedChange;
58-
bool beenOccupied = false;
5960
Vector3 velocity = Vector3(0.0f, 0.0f, 0.0f);
6061
Vector3 angularVelocity = Vector3(0.0f, 0.0f, 0.0f);
6162
TimePoint trailerUpdateTime;
6263
Vehicle* trailer = nullptr;
6364
Vehicle* cab = nullptr;
6465
StaticArray<IVehicle*, MAX_VEHICLE_CARRIAGES> carriages;
6566
VehicleParams params;
66-
uint8_t sirenState = 0;
6767
uint32_t hydraThrustAngle = 0;
6868
float trainSpeed = 0.0f;
6969
int lastDriverPoolID = INVALID_PLAYER_ID;

Shared/NetCode/vehicle.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,15 @@ namespace RPC
111111
float Angle;
112112
uint8_t Colour1;
113113
uint8_t Colour2;
114-
float Health;
115114
uint8_t Interior;
115+
uint8_t Paintjob;
116+
float Health;
116117
uint32_t DoorDamage;
117118
uint32_t PanelDamage;
118119
uint8_t LightDamage;
119120
uint8_t TyreDamage;
120121
uint8_t Siren;
121122
StaticArray<int, MAX_VEHICLE_COMPONENT_SLOT_IN_RPC> Mods;
122-
uint8_t Paintjob;
123123
int32_t BodyColour1;
124124
int32_t BodyColour2;
125125

0 commit comments

Comments
 (0)