-
Notifications
You must be signed in to change notification settings - Fork 14
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
[1.2] Make properties async #76
Conversation
2a00270
to
59a7cbf
Compare
{ | ||
CheckExistence(); | ||
|
||
return await _plugin.Schedule(() => StructConverter.PointerToStruct<Vector3>(Rage.Checkpoint.Checkpoint_GetDirection(NativePointer))).ConfigureAwait(false); |
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.
Move PointerToStruct
convert out of scheduled lambda
|
||
return Rage.Player.Player_IsJumping(NativePointer); | ||
} | ||
return await _plugin.Schedule(() => StringConverter.PointerToString(Rage.Player.Player_GetKickReason(NativePointer))).ConfigureAwait(false); |
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.
Move PointerToString
call outside scheduled method
|
||
return _plugin.VehiclePool[Rage.Vehicle.Vehicle_GetTrailer(NativePointer)]; | ||
} | ||
return await _plugin.Schedule(() => _plugin.VehiclePool[Rage.Vehicle.Vehicle_GetTrailer(NativePointer)]).ConfigureAwait(false); |
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.
Move _plugin.VehiclePool
call out of schedule
/// <exception cref="EntityDeletedException">This entity was deleted before</exception> | ||
float Scale { get; set; } | ||
/// <param name="direction">New direction of the marker</param> | ||
/// <returns></returns> |
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.
Redundant <returns></returns>
4eba7d3
to
7c77360
Compare
This PR converts all properties which use native RageMP functions to async getter/setters.