Skip to content

Commit 96c2a97

Browse files
committed
check nitro active or not
1 parent f10cefe commit 96c2a97

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Client/mods/deathmatch/logic/rpc/CVehicleRPCs.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,11 @@ void CVehicleRPCs::SetVehicleNitroActivated(CClientEntity* pSourceEntity, NetBit
665665
return;
666666

667667
if (!vehicle->IsNitroInstalled())
668-
return;
668+
return;
669+
670+
// If nitro level < 0, nitro is activated. (until nitro level reaches -1, at that point it will become 0 and increase instead of decrease)
671+
if ((vehicle->GetNitroLevel() < 0) == state)
672+
return;
669673

670674
// Apply nitro level change
671675
if (state)

0 commit comments

Comments
 (0)