Skip to content

Commit 5e9bcde

Browse files
committed
Fix getVehicleSirensOn/setVehicleSirensOn for Rhino and Barracks (#4899)
Rhino (432) and Barracks (433) have functional sirens in vanilla SA, but HasSirens() rejected them because they were missing VEHICLE_HAS_SIRENS in g_ulVehicleAttributes, causing the Lua siren API to return nil/false. Add the bit on both client and server tables and in the gentable generator.
1 parent bb7e811 commit 5e9bcde

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

Client/mods/deathmatch/logic/CClientVehicleManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const SFixedArray<unsigned char, 212> g_ucMaxPassengers = {3, 1, 1, 1, 3,
4343
// Generated by MTA10\utils\gentable\gentable_vehattr.cpp
4444
static const SFixedArray<unsigned long, 212> g_ulVehicleAttributes = {
4545
0, 0, 0, 0, 0, 0, 8, 3, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 32, 0, 0, 2, 0, // 400-424
46-
0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, // 425-449
46+
0, 0, 2, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 32, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, // 425-449
4747
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 450-474
4848
0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 64, 0, 0, // 475-499
4949
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 16, 0, 0, 0, 0, 0, 4, 12, 0, 0, 2, 8, // 500-524

Client/utils/gentable/gentable_vehattr.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ int main()
5050
SetAttribute(table, 599, VEHICLE_HAS_SIRENS);
5151
SetAttribute(table, 601, VEHICLE_HAS_SIRENS);
5252
SetAttribute(table, 423, VEHICLE_HAS_SIRENS);
53+
SetAttribute(table, 432, VEHICLE_HAS_SIRENS);
54+
SetAttribute(table, 433, VEHICLE_HAS_SIRENS);
5355

5456
SetAttribute(table, 592, VEHICLE_HAS_LANDING_GEARS);
5557
SetAttribute(table, 577, VEHICLE_HAS_LANDING_GEARS);

Server/mods/deathmatch/logic/CVehicleManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static const SFixedArray<unsigned char, 212> g_ucMaxPassengers = {{3, 1, 1,
4141
// Generated by MTA10\utils\gentable\gentable_vehattr.cpp
4242
static const SFixedArray<unsigned long, 212> g_ulVehicleAttributes = {
4343
{0, 0, 0, 0, 0, 0, 8, 3, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 32, 0, 0, 2, 0, // 400-424
44-
0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, // 425-449
44+
0, 0, 2, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 32, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, // 425-449
4545
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 450-474
4646
0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 64, 0, 0, // 475-499
4747
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 16, 0, 0, 0, 0, 0, 4, 12, 0, 0, 2, 8, // 500-524

0 commit comments

Comments
 (0)