Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nitro vehicle functions server side #3951

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Proxy-99
Copy link
Contributor

@Proxy-99 Proxy-99 commented Jan 11, 2025

Add isVehicleNitroActivated and getVehicleNitroLevel at the server side
closing #3703

Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp Outdated Show resolved Hide resolved
Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp Outdated Show resolved Hide resolved
Server/mods/deathmatch/logic/CVehicle.h Outdated Show resolved Hide resolved
Shared/sdk/net/bitstream.h Show resolved Hide resolved
@Nico8340
Copy link
Contributor

You forgot to link the pull request with #3703

@tederis tederis added the enhancement New feature or request label Jan 18, 2025
Comment on lines +611 to +612
//2025-01-16
//Add isVehicleNitroActivated and getVehicleNitroLevel Server side
Copy link
Contributor

Choose a reason for hiding this comment

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

Maintain consistency with other entries to avoid creating a mess

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what do you mean

Copy link
Contributor

Choose a reason for hiding this comment

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

// Comment
// Date

image

@@ -75,6 +75,7 @@ class CSimVehiclePuresyncPacket : public CSimPacket
CVector VehTurnSpeed;

float fVehHealth;
float vehNitroLevel;
Copy link
Contributor

Choose a reason for hiding this comment

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

float vehNitroLevel{0.0f};

float CLuaVehicleDefs::GetVehicleNitroLevel(CVehicle* vehicle) noexcept
{
float fLevel = vehicle->GetNitroLevel();
Copy link
Contributor

Choose a reason for hiding this comment

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

float level = vehicle->GetNitroLevel();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants