-
Notifications
You must be signed in to change notification settings - Fork 10
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] aiGoalFollowWayPts::Update() #137
base: master
Are you sure you want to change the base?
Conversation
Notes 1) Code compiles in Debug mode and runs fine in-game at first glance (e.g. change "Car->Sim.ICS.AngularMomentum *= 0.1f;") 2) Doesn't compile in Final mode: ...\mmai\aiGoalFollowWayPts.cpp(138,59): error C2220: the following warning is treated as an error ...\mmai\aiGoalFollowWayPts.cpp(138,59): warning C4244: '=': conversion from 'i32' to 'i16', possible loss of data 3) IDA suggest "f32 arg10" instead of the current "i16 arg10" for the function "DetermineOppMapComponent"
The code is ready for review
@@ -55,3 +57,124 @@ b32 aiGoalFollowWayPts::Context() | |||
return false; | |||
} | |||
} | |||
|
|||
i32 aiGoalFollowWayPts::GetWayPtId(i16 index, i32 num_waypts) |
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.
Was there a reason for passing in num_waypts
instead of using NumWayPts
directly?
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.
No, it was an oversight. I changed it now
Car->Sim.Steering = 0.0f; | ||
Car->Sim.Brakes = 0.0f; | ||
Car->Sim.Engine.Throttle = 1.0f; | ||
return; |
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.
I think this return
should be outside the inner if
#define CAR_NOT_STUCK 0 | ||
#define CAR_MAYBE_STUCK 1 | ||
#define CAR_STUCK 2 |
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 these to the mmStuck header
- I'm still unsure how to interpret `unk_var1` (v28) - For `unk_var2` (v27) it might be similar to the CAR_STUCK constants in the context of collision (looking at the related functions)
The code builds in Final mode and works in the game. Before merging, maybe a stylistic check on your side to see if everything is OK? |
Notes
...\mmai\aiGoalFollowWayPts.cpp(138,59): error C2220: the following warning is treated as an error
...\mmai\aiGoalFollowWayPts.cpp(138,59): warning C4244: '=': conversion from 'i32' to 'i16', possible loss of data