Skip to content

Conversation

@Xenius97
Copy link
Contributor

@Xenius97 Xenius97 commented Dec 4, 2025

This PR introduces rotor speed synchronisation, which was already existing in code but looks it was unfinished (RPC was registered but nothing happened)
Now this is fully functional, rotor speed is synced between clients and added new server side get/set functions.

setVehicleRotorSpeed and getVehicleRotorSpeed are now shared
setVehicleRotorState and getVehicleRotorState are shared too

gta_sa_nA1tn2LGue.mp4

@Xenius97 Xenius97 changed the title Rotor speed synchronisation Rotor speed/state synchronisation Dec 4, 2025
@FileEX FileEX added enhancement New feature or request sync labels Dec 6, 2025
@Xenius97 Xenius97 requested a review from FileEX December 6, 2025 17:22
@Xenius97 Xenius97 marked this pull request as draft December 6, 2025 17:49
@Xenius97 Xenius97 marked this pull request as ready for review December 6, 2025 19:47
@sbx320 sbx320 closed this Jan 5, 2026
@sbx320
Copy link
Member

sbx320 commented Jan 5, 2026

uh, just wanted to try reopening this, but apparently I'm not able to reopen.

@Xenius97 are you able to reopen this?

@Xenius97
Copy link
Contributor Author

Xenius97 commented Jan 5, 2026

uh, just wanted to try reopening this, but apparently I'm not able to reopen.

@Xenius97 are you able to reopen this?

doesn't allow for me, but maybe i can open a new pr

@Xenius97
Copy link
Contributor Author

Xenius97 commented Jan 6, 2026

@sbx320 can u try to reopen? now fork is fixed, but doesn't let me maybe because u closed

@sbx320 sbx320 reopened this Jan 6, 2026
@Xenius97
Copy link
Contributor Author

Xenius97 commented Jan 6, 2026

thanks!

@Xenius97 Xenius97 requested a review from FileEX January 7, 2026 06:55
Comment on lines 3074 to 3096
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);
}
Copy link
Member

Choose a reason for hiding this comment

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

Non-blocking but please could you merge the CStaticFunctionDefinitions into CLuaVehicleDefs? The static function definitions exist mostly for legacy reasons.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants