Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Client/mods/deathmatch/logic/CClientVehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2653,6 +2653,9 @@ void CClientVehicle::Create()
m_pVehicle->SetHeliSearchLightVisible(m_bHeliSearchLightVisible);
}

if (m_eVehicleType == CLIENTVEHICLE_HELI || m_eVehicleType == CLIENTVEHICLE_PLANE)
m_pVehicle->SetVehicleRotorState(m_rotorState, true, m_eVehicleType == CLIENTVEHICLE_HELI);

m_pVehicle->SetUnderwater(IsBelowWater());

// HACK: temp fix until windows are fixed using setAlpha
Expand Down
24 changes: 24 additions & 0 deletions Client/mods/deathmatch/logic/CNetAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1541,6 +1541,21 @@ void CNetAPI::ReadVehiclePuresync(CClientPlayer* pPlayer, CClientVehicle* pVehic
{
ControllerState.LeftShoulder2 = BitStream.ReadBit() * 255;
ControllerState.RightShoulder2 = BitStream.ReadBit() * 255;

// Read rotor speed
unsigned char ucRotorSpeed;
if (BitStream.Read(ucRotorSpeed))
{
float rotorSpeed = (static_cast<float>(ucRotorSpeed) / 100.0f * 0.22f);
pVehicle->SetRotorSpeed(rotorSpeed);
}

// Read rotor state
bool rotorState;
if (BitStream.ReadBit(rotorState))
{
pVehicle->SetVehicleRotorState(rotorState, true);
}
}

// Read parts state
Expand Down Expand Up @@ -1740,6 +1755,15 @@ void CNetAPI::WriteVehiclePuresync(CClientPed* pPlayerModel, CClientVehicle* pVe
{
BitStream.WriteBit(ControllerState.LeftShoulder2 != 0);
BitStream.WriteBit(ControllerState.RightShoulder2 != 0);

// Write rotor speed
float rotorSpeed = 0.0f;
pVehicle->GetRotorSpeed(rotorSpeed);
unsigned char ucRotorSpeed = static_cast<unsigned char>((rotorSpeed / 0.22f) * 100.0f);
BitStream.Write(ucRotorSpeed);

// Write rotor state
BitStream.WriteBit(pVehicle->GetVehicleRotorState());
}

BitStream.WriteBit(pVehicle->IsOnFire());
Expand Down
8 changes: 8 additions & 0 deletions Client/mods/deathmatch/logic/CPacketHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3453,6 +3453,14 @@ void CPacketHandler::Packet_EntityAdd(NetBitStreamInterface& bitStream)
bool bTrainDirection = bitStream.ReadBit();
bool bTaxiLightState = bitStream.ReadBit();

// Read rotor state for helicopters and planes
bool bRotorState = true;
if (pVehicle->GetVehicleType() == CLIENTVEHICLE_HELI || pVehicle->GetVehicleType() == CLIENTVEHICLE_PLANE)
{
bRotorState = bitStream.ReadBit();
pVehicle->SetVehicleRotorState(bRotorState, true);
}

// If the vehicle has a landing gear, set landing gear state
if (CClientVehicleManager::HasLandingGears(usModel))
{
Expand Down
3 changes: 3 additions & 0 deletions Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ void CLuaVehicleDefs::AddClass(lua_State* luaVM)
lua_classfunction(luaVM, "getPlateText", "getVehiclePlateText");
lua_classfunction(luaVM, "getOccupants", "getVehicleOccupants");
lua_classfunction(luaVM, "getHelicopterRotorSpeed", "getHelicopterRotorSpeed");
lua_classfunction(luaVM, "getRotorSpeed", "getVehicleRotorSpeed");
lua_classfunction(luaVM, "areHeliBladeCollisionsEnabled", "getHeliBladeCollisionsEnabled");
lua_classfunction(luaVM, "getPaintjob", "getVehiclePaintjob");
lua_classfunction(luaVM, "getTurretPosition", "getVehicleTurretPosition");
Expand Down Expand Up @@ -325,6 +326,7 @@ void CLuaVehicleDefs::AddClass(lua_State* luaVM)
lua_classfunction(luaVM, "removeUpgrade", "removeVehicleUpgrade");

lua_classfunction(luaVM, "spawnFlyingComponent", "spawnVehicleFlyingComponent");
lua_classfunction(luaVM, "setRotorSpeed", "setVehicleRotorSpeed");

lua_classvariable(luaVM, "locked", "setVehicleLocked", "isVehicleLocked");
lua_classvariable(luaVM, "controller", NULL, "getVehicleController");
Expand All @@ -336,6 +338,7 @@ void CLuaVehicleDefs::AddClass(lua_State* luaVM)
lua_classvariable(luaVM, "onGround", NULL, "isVehicleOnGround");
lua_classvariable(luaVM, "damageProof", NULL, "isVehicleDamageProof");
lua_classvariable(luaVM, "helicopterRotorSpeed", "setHelicopterRotorSpeed", "getHelicopterRotorSpeed");
lua_classvariable(luaVM, "rotorSpeed", "setVehicleRotorSpeed", "getVehicleRotorSpeed");
lua_classvariable(luaVM, "heliBladeCollisionsEnabled", "setHeliBladeCollisionsEnabled", "getHeliBladeCollisionsEnabled");
lua_classvariable(luaVM, "sirenParams", nullptr, "getVehicleSirenParams");
lua_classvariable(luaVM, "sirensOn", "setVehicleSirensOn", "getVehicleSirensOn");
Expand Down
46 changes: 30 additions & 16 deletions Client/mods/deathmatch/logic/rpc/CVehicleRPCs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ void CVehicleRPCs::LoadFunctions()
AddHandler(SET_VEHICLE_DOORS_UNDAMAGEABLE, SetVehicleDoorsUndamageable, "");
AddHandler(SET_VEHICLE_SIRENE_ON, SetVehicleSireneOn, "SetVehicleSireneOn");
AddHandler(SET_VEHICLE_LANDING_GEAR_DOWN, SetVehicleLandingGearDown, "SetVehicleLandingGearDown");
AddHandler(SET_HELICOPTER_ROTOR_SPEED, SetHelicopterRotorSpeed, "SetHelicopterRotorSpeed");
AddHandler(SET_VEHICLE_ROTOR_SPEED, SetVehicleRotorSpeed, "SetVehicleRotorSpeed");
AddHandler(SET_VEHICLE_ROTOR_STATE, SetVehicleRotorState, "SetVehicleRotorState");
AddHandler(ADD_VEHICLE_UPGRADE, AddVehicleUpgrade, "AddVehicleUpgrade");
AddHandler(ADD_ALL_VEHICLE_UPGRADES, AddAllVehicleUpgrades, "AddAllVehicleUpgrades");
AddHandler(REMOVE_VEHICLE_UPGRADE, RemoveVehicleUpgrade, "RemoveVehicleUpgrade");
Expand Down Expand Up @@ -237,21 +238,6 @@ void CVehicleRPCs::SetVehicleLandingGearDown(CClientEntity* pSource, NetBitStrea
}
}

void CVehicleRPCs::SetHelicopterRotorSpeed(CClientEntity* pSource, NetBitStreamInterface& bitStream)
{
CClientVehicle* pVehicle = m_pVehicleManager->Get(pSource->GetID());
if (pVehicle)
{
unsigned char ucRotorSpeed;
if (bitStream.Read(ucRotorSpeed))
{
// Convert the given rotor speed from between 0-100 to 0-0.22
float fRotorSpeed = (static_cast<float>(ucRotorSpeed) / 100.0f * 0.22f);
pVehicle->SetHeliRotorSpeed(fRotorSpeed);
}
}
}

void CVehicleRPCs::AddVehicleUpgrade(CClientEntity* pSource, NetBitStreamInterface& bitStream)
{
CClientVehicle* pVehicle = m_pVehicleManager->Get(pSource->GetID());
Expand Down Expand Up @@ -693,3 +679,31 @@ void CVehicleRPCs::SetVehicleNitroActivated(CClientEntity* pSourceEntity, NetBit
vehicle->SetNitroLevel(vehicle->GetNitroLevel() + 1.0001f);
}

void CVehicleRPCs::SetVehicleRotorSpeed(CClientEntity* pSource, NetBitStreamInterface& bitStream)
{
CClientVehicle* pVehicle = m_pVehicleManager->Get(pSource->GetID());
if (pVehicle)
{
unsigned char ucRotorSpeed;
if (bitStream.Read(ucRotorSpeed))
{
// Convert the given rotor speed from between 0-100 to 0-0.22
float rotorSpeed = (static_cast<float>(ucRotorSpeed) / 100.0f * 0.22f);
pVehicle->SetRotorSpeed(rotorSpeed);
}
}
}

void CVehicleRPCs::SetVehicleRotorState(CClientEntity* pSource, NetBitStreamInterface& bitStream)
{
CClientVehicle* pVehicle = m_pVehicleManager->Get(pSource->GetID());
if (pVehicle)
{
bool rotorState;
bool stopRotor;
if (bitStream.ReadBit(rotorState) && bitStream.ReadBit(stopRotor))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReadBit returns true/false, so if you call setVehicleRotorState with state = true and stopRotor = false, this condition will never be met.

{
pVehicle->SetVehicleRotorState(rotorState, stopRotor);
}
}
}
3 changes: 2 additions & 1 deletion Client/mods/deathmatch/logic/rpc/CVehicleRPCs.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CVehicleRPCs : public CRPCFunctions
DECLARE_ELEMENT_RPC(SetVehicleDoorsUndamageable);
DECLARE_ELEMENT_RPC(SetVehicleSireneOn);
DECLARE_ELEMENT_RPC(SetVehicleLandingGearDown);
DECLARE_ELEMENT_RPC(SetHelicopterRotorSpeed);
DECLARE_ELEMENT_RPC(SetVehicleRotorSpeed);
DECLARE_ELEMENT_RPC(AddVehicleUpgrade);
DECLARE_ELEMENT_RPC(AddAllVehicleUpgrades);
DECLARE_ELEMENT_RPC(RemoveVehicleUpgrade);
Expand Down Expand Up @@ -59,4 +59,5 @@ class CVehicleRPCs : public CRPCFunctions
DECLARE_ELEMENT_RPC(SetVehiclePlateText);
DECLARE_ELEMENT_RPC(SpawnVehicleFlyingComponent);
DECLARE_ELEMENT_RPC(SetVehicleNitroActivated);
DECLARE_ELEMENT_RPC(SetVehicleRotorState);
};
3 changes: 2 additions & 1 deletion Server/mods/deathmatch/logic/CPerfStat.RPCPacketUsage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ ADD_ENUM1(SET_VEHICLE_LOCKED)
ADD_ENUM1(SET_VEHICLE_DOORS_UNDAMAGEABLE)
ADD_ENUM1(SET_VEHICLE_SIRENE_ON)
ADD_ENUM1(SET_VEHICLE_LANDING_GEAR_DOWN)
ADD_ENUM1(SET_HELICOPTER_ROTOR_SPEED)
ADD_ENUM1(SET_VEHICLE_ROTOR_SPEED)
ADD_ENUM1(ADD_VEHICLE_UPGRADE)
ADD_ENUM1(ADD_ALL_VEHICLE_UPGRADES)
ADD_ENUM1(REMOVE_VEHICLE_UPGRADE)
Expand Down Expand Up @@ -232,6 +232,7 @@ ADD_ENUM1(TOGGLE_OBJECT_RESPAWN)
ADD_ENUM1(RESET_WORLD_PROPERTIES)
ADD_ENUM1(SPAWN_VEHICLE_FLYING_COMPONENT)
ADD_ENUM1(SET_ELEMENT_ON_FIRE)
ADD_ENUM1(SET_VEHICLE_ROTOR_STATE)
IMPLEMENT_ENUM_END("eElementRPCFunctions")

DECLARE_ENUM(CRPCFunctions::eRPCFunctions);
Expand Down
71 changes: 71 additions & 0 deletions Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12692,3 +12692,74 @@ bool CStaticFunctionDefinitions::SpawnVehicleFlyingComponent(CVehicle* const veh

return true;
}

bool CStaticFunctionDefinitions::GetVehicleRotorSpeed(CVehicle* pVehicle, float& rotorSpeed)
{
if (pVehicle != NULL)
{
rotorSpeed = pVehicle->GetRotorSpeed();
return true;
}
return false;
}

bool CStaticFunctionDefinitions::SetVehicleRotorSpeed(CElement* pElement, float rotorSpeed)
{
assert(pElement);
RUN_CHILDREN(SetVehicleRotorSpeed(*iter, rotorSpeed))

if (IS_VEHICLE(pElement))
{
CVehicle* pVehicle = static_cast<CVehicle*>(pElement);

eVehicleType vehicleType = pVehicle->GetVehicleType();
if (vehicleType != VEHICLE_HELI && vehicleType != VEHICLE_PLANE)
return false;

float fClampedSpeed = std::max(0.0f, std::min(rotorSpeed, 0.22f));
pVehicle->SetRotorSpeed(fClampedSpeed);

unsigned char ucRotorSpeed = static_cast<unsigned char>((fClampedSpeed / 0.22f) * 100.0f);
CBitStream BitStream;
BitStream.pBitStream->Write(ucRotorSpeed);
m_pPlayerManager->BroadcastOnlyJoined(CElementRPCPacket(pVehicle, SET_VEHICLE_ROTOR_SPEED, *BitStream.pBitStream));
return true;
}

return false;
}

bool CStaticFunctionDefinitions::GetVehicleRotorState(CVehicle* pVehicle, bool& rotorState)
{
if (pVehicle != NULL)
{
rotorState = pVehicle->GetRotorState();
return true;
}
return false;
}

bool CStaticFunctionDefinitions::SetVehicleRotorState(CElement* pElement, bool rotorState, std::optional<bool> stopRotor)
{
assert(pElement);
RUN_CHILDREN(SetVehicleRotorState(*iter, rotorState, stopRotor))

if (IS_VEHICLE(pElement))
{
CVehicle* pVehicle = static_cast<CVehicle*>(pElement);

eVehicleType vehicleType = pVehicle->GetVehicleType();
if (vehicleType != VEHICLE_HELI && vehicleType != VEHICLE_PLANE)
return false;

pVehicle->SetRotorState(rotorState);

CBitStream BitStream;
BitStream.pBitStream->WriteBit(rotorState);
BitStream.pBitStream->WriteBit(stopRotor.value_or(true));
m_pPlayerManager->BroadcastOnlyJoined(CElementRPCPacket(pVehicle, SET_VEHICLE_ROTOR_STATE, *BitStream.pBitStream));
return true;
}

return false;
}
4 changes: 4 additions & 0 deletions Server/mods/deathmatch/logic/CStaticFunctionDefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ class CStaticFunctionDefinitions
static bool GetTrainPosition(CVehicle* pVehicle, float& fPosition);
static bool GetVehicleHeadLightColor(CVehicle* pVehicle, SColor& outColor);
static bool GetVehicleDoorOpenRatio(CVehicle* pVehicle, unsigned char ucDoor, float& fRatio);
static bool GetVehicleRotorSpeed(CVehicle* pVehicle, float& rotorSpeed);
static bool GetVehicleRotorState(CVehicle* pVehicle, bool& rotorState);

static bool GetVehicleHandling(CVehicle* pVehicle, eHandlingProperty eProperty, float& fValue);
static bool GetVehicleHandling(CVehicle* pVehicle, eHandlingProperty eProperty, CVector& vecValue);
Expand All @@ -302,6 +304,8 @@ class CStaticFunctionDefinitions
static bool BlowVehicle(CElement* pElement, std::optional<bool> withExplosion);
static bool SetVehicleColor(CElement* pElement, const CVehicleColor& color);
static bool SetVehicleLandingGearDown(CElement* pElement, bool bLandingGearDown);
static bool SetVehicleRotorSpeed(CElement* pElement, float rotorSpeed);
static bool SetVehicleRotorState(CElement* pElement, bool rotorState, std::optional<bool> stopRotor);
static bool SetVehicleLocked(CElement* pElement, bool bLocked);
static bool SetVehicleDoorsUndamageable(CElement* pElement, bool bDoorsUndamageable);
static bool SetVehicleRotation(CElement* pElement, const CVector& vecRotation);
Expand Down
2 changes: 2 additions & 0 deletions Server/mods/deathmatch/logic/CVehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ CVehicle::CVehicle(CVehicleManager* pVehicleManager, CElement* pParent, unsigned
m_ucVariant = ucVariant;
m_ucVariant2 = ucVariant2;
m_onFire = false;
m_rotorSpeed = 0.0f;
m_rotorState = true;

// Initialize the occupied Players
for (int i = 0; i < MAX_VEHICLE_SEATS; i++)
Expand Down
8 changes: 8 additions & 0 deletions Server/mods/deathmatch/logic/CVehicle.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@ class CVehicle final : public CElement
bool IsLandingGearDown() { return m_bLandingGearDown; };
void SetLandingGearDown(bool bLandingGearDown) { m_bLandingGearDown = bLandingGearDown; };

float GetRotorSpeed() { return m_rotorSpeed; };
void SetRotorSpeed(float rotorSpeed) { m_rotorSpeed = rotorSpeed; };

bool GetRotorState() { return m_rotorState; };
void SetRotorState(bool rotorState) { m_rotorState = rotorState; };

unsigned short GetAdjustableProperty() { return m_usAdjustableProperty; };
void SetAdjustableProperty(unsigned short usAdjustable) { m_usAdjustableProperty = usAdjustable; };

Expand Down Expand Up @@ -485,6 +491,8 @@ class CVehicle final : public CElement
bool m_bSirenActive;
bool m_bTaxiLightState;
bool m_bLandingGearDown;
float m_rotorSpeed;
bool m_rotorState;
unsigned short m_usAdjustableProperty;
bool m_bCollisionsEnabled;

Expand Down
34 changes: 33 additions & 1 deletion Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ void CLuaVehicleDefs::LoadFunctions()
{"getVehicleTurnVelocity", GetVehicleTurnVelocity},
{"getVehicleTurretPosition", GetVehicleTurretPosition},
{"getVehicleMaxPassengers", GetVehicleMaxPassengers},
{"getVehicleRotorSpeed", ArgumentParser<GetVehicleRotorSpeed>},
{"getVehicleRotorState", ArgumentParser<GetVehicleRotorState>},
{"isVehicleLocked", IsVehicleLocked},
{"getVehiclesOfType", GetVehiclesOfType},
{"getVehicleUpgradeOnSlot", GetVehicleUpgradeOnSlot},
Expand Down Expand Up @@ -77,6 +79,8 @@ void CLuaVehicleDefs::LoadFunctions()
{"setVehicleTurnVelocity", SetVehicleTurnVelocity},
{"setVehicleColor", SetVehicleColor},
{"setVehicleLandingGearDown", SetVehicleLandingGearDown},
{"setVehicleRotorSpeed", ArgumentParser<SetVehicleRotorSpeed>},
{"setVehicleRotorState", ArgumentParser<SetVehicleRotorState>},
{"setVehicleLocked", SetVehicleLocked},
{"setVehicleDoorsUndamageable", SetVehicleDoorsUndamageable},
{"setVehicleSirensOn", SetVehicleSirensOn},
Expand Down Expand Up @@ -161,6 +165,8 @@ void CLuaVehicleDefs::AddClass(lua_State* luaVM)
lua_classfunction(luaVM, "toggleRespawn", "toggleVehicleRespawn");
lua_classfunction(luaVM, "removeSirens", "removeVehicleSirens");
lua_classfunction(luaVM, "addSirens", "addVehicleSirens");
lua_classfunction(luaVM, "getRotorSpeed", "getVehicleRotorSpeed");
lua_classfunction(luaVM, "getRotorState", "getVehicleRotorState");

lua_classfunction(luaVM, "isDamageProof", "isVehicleDamageProof");
lua_classfunction(luaVM, "isFuelTankExplodable", "isVehicleFuelTankExplodable");
Expand Down Expand Up @@ -244,6 +250,8 @@ void CLuaVehicleDefs::AddClass(lua_State* luaVM)
lua_classfunction(luaVM, "setTrainPosition", "setTrainPosition");
lua_classfunction(luaVM, "setTrainSpeed", "setTrainSpeed"); // Reduce confusion
lua_classfunction(luaVM, "spawnFlyingComponent", "spawnVehicleFlyingComponent");
lua_classfunction(luaVM, "setRotorSpeed", "setVehicleRotorSpeed");
lua_classfunction(luaVM, "setRotorState", "setVehicleRotorState");

lua_classvariable(luaVM, "damageProof", "setVehicleDamageProof", "isVehicleDamageProof");
lua_classvariable(luaVM, "locked", "setVehicleLocked", "isVehicleLocked");
Expand Down Expand Up @@ -3059,4 +3067,28 @@ bool CLuaVehicleDefs::SetVehicleNitroActivated(CVehicle* vehicle, bool state) no

m_pPlayerManager->BroadcastOnlyJoined(CElementRPCPacket(vehicle, SET_VEHICLE_NITRO_ACTIVATED, *BitStream.pBitStream));
return true;
}
}

float CLuaVehicleDefs::GetVehicleRotorSpeed(CVehicle* pVehicle)
{
float rotorSpeed = 0.0f;
CStaticFunctionDefinitions::GetVehicleRotorSpeed(pVehicle, rotorSpeed);
return rotorSpeed;
}

bool CLuaVehicleDefs::SetVehicleRotorSpeed(CElement* pElement, float rotorSpeed)
{
return CStaticFunctionDefinitions::SetVehicleRotorSpeed(pElement, rotorSpeed);
}

bool CLuaVehicleDefs::GetVehicleRotorState(CVehicle* pVehicle)
{
bool rotorState = false;
CStaticFunctionDefinitions::GetVehicleRotorState(pVehicle, rotorState);
return rotorState;
}

bool CLuaVehicleDefs::SetVehicleRotorState(CElement* pElement, bool rotorState, std::optional<bool> stopRotor)
{
return CStaticFunctionDefinitions::SetVehicleRotorState(pElement, rotorState, stopRotor);
}
5 changes: 5 additions & 0 deletions Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,9 @@ class CLuaVehicleDefs : public CLuaDefs

static bool SpawnVehicleFlyingComponent(CVehicle* const vehicle, std::uint8_t nodeIndex, std::optional<std::uint8_t> componentCollisionType, std::optional<std::uint32_t> removalTime);
static bool SetVehicleNitroActivated(CVehicle* vehicle, bool state) noexcept;

static float GetVehicleRotorSpeed(CVehicle* pVehicle);
static bool SetVehicleRotorSpeed(CElement* pElement, float rotorSpeed);
static bool GetVehicleRotorState(CVehicle* pVehicle);
static bool SetVehicleRotorState(CElement* pElement, bool rotorState, std::optional<bool> stopRotor);
};
4 changes: 4 additions & 0 deletions Server/mods/deathmatch/logic/packets/CEntityAddPacket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,10 @@ bool CEntityAddPacket::Write(NetBitStreamInterface& BitStream) const
BitStream.WriteBit(pVehicle->GetTrainDirection());
BitStream.WriteBit(pVehicle->IsTaxiLightOn());

// Write rotor state for helicopters and planes
if (pVehicle->GetVehicleType() == VEHICLE_HELI || pVehicle->GetVehicleType() == VEHICLE_PLANE)
BitStream.WriteBit(pVehicle->GetRotorState());

// Write alpha
SEntityAlphaSync alpha;
alpha.data.ucAlpha = pVehicle->GetAlpha();
Expand Down
Loading