-
-
Notifications
You must be signed in to change notification settings - Fork 529
Rotor speed/state synchronisation #4594
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
base: master
Are you sure you want to change the base?
Conversation
This reverts commit d806c51.
Server/mods/deathmatch/logic/packets/CVehiclePuresyncPacket.cpp
Outdated
Show resolved
Hide resolved
Server/mods/deathmatch/logic/packets/CVehiclePuresyncPacket.cpp
Outdated
Show resolved
Hide resolved
Server/mods/deathmatch/logic/packets/CVehiclePuresyncPacket.cpp
Outdated
Show resolved
Hide resolved
Server/mods/deathmatch/logic/packets/CVehiclePuresyncPacket.cpp
Outdated
Show resolved
Hide resolved
This reverts commit 9ce8f22.
|
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 |
|
@sbx320 can u try to reopen? now fork is fixed, but doesn't let me maybe because u closed |
|
thanks! |
| 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); | ||
| } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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.
setVehicleRotorSpeedandgetVehicleRotorSpeedare now sharedsetVehicleRotorStateandgetVehicleRotorStateare shared toogta_sa_nA1tn2LGue.mp4