Skip to content

Conversation

@KcRobin9
Copy link
Collaborator

First draft.
Not sure about the constant (name).
The first ARTSPTR->GetUpdateDelta() could be put directly in the function call if you prefer.

First draft.
Not sure about the constant (name).
The first `ARTSPTR->GetUpdateDelta()` could be put directly in the function call if you prefer.
At the moment there are still some compiler errors related to unresolved external symbols.
Comment on lines 32 to 55
: asNetObject()
, field_28(0)
, Flags(0)
, Score(0)
, Time(0.0f)
, LocalData {}
, Car(nullptr)
, IsEnabled(false)
, Active(0)
, UpdateCount(0)
, MatrixChanged(false)
, ActivateTime(0.0f)
, Steering(0.0f)
, PrevSteering(0.0f)
, SteeringDelta(0.0f)
, Throttle(0.0f)
, PrevThrottle(0.0f)
, ThrottleDelta(0.0f)
, Brakes(0.0f)
, PrevBrakes(0.0f)
, BrakesDelta(0.0f)
, field_BC(0.0f)
, field_C0(0.0f)
, Matrix(IDENTITY)
Copy link
Owner

Choose a reason for hiding this comment

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

All these members can be directly initialized as part of the member's declaration. Also, you don't need to explicitly call the base classes default constructor.

Copy link
Owner

Choose a reason for hiding this comment

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

@KcRobin9 you still need to initialize these members, I just mean you can do it as part of the declaration, i.e field_28 {} (for any "default" values false/0/0.0f/nullptr you can use empty brackets rather than i.e field_28 {0}.
Also you still need to have a constructor to reset time_delta since that's not a member.

return;

LocalData.SenderId = PlayerID;
LocalData.MessageId = 501;
Copy link
Owner

Choose a reason for hiding this comment

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

Can you create an enum for the IDs?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants