Skip to content
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

📝 Update TaskGoToCoordAnyMeansExtraParams and TaskGoToCoordAnyMeansExtraParamsWithCruiseSpeed #1089

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

MonsieurBibo
Copy link
Contributor

Following #1085, here is the PR updating TaskGoToCoordAnyMeansExtraParams and TaskGoToCoordAnyMeansExtraParamsWithCruiseSpeed.

I believe types are right this time.

…traParamsWithCruiseSpeed following the update on TaskGoToCoordAnyMeans
Copy link
Contributor

@4mmonium 4mmonium left a comment

Choose a reason for hiding this comment

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

Hey there, gave this a glance and noticed that some changes are needed.

We need to make sure information is centralized, that's why it's important to make sure if declarations for enums or any other values do exist elsewhere prior to adding them, that way there's only one place to maintain them if they ever need to be updated.

Check my review comments for more information.

Thank you! 😊

TASK/TaskGoToCoordAnyMeansExtraParams.md Outdated Show resolved Hide resolved
TASK/TaskGoToCoordAnyMeansExtraParams.md Outdated Show resolved Hide resolved
TASK/TaskGoToCoordAnyMeansExtraParamsWithCruiseSpeed.md Outdated Show resolved Hide resolved
TASK/TaskGoToCoordAnyMeansExtraParamsWithCruiseSpeed.md Outdated Show resolved Hide resolved
* **fMaxRangeToShootTargets**: Determines the maximum distance at which the `Ped` will engage in combat with threatening targets.
* **fExtraVehToTargetDistToPreferVeh**:
* **fDriveStraightLineDistance**:
* **iExtraFlags**: See `TaskGoToCoordAnyMeansFlags` enum.
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, where do I find the enum you are talking about? 🙂

Here you go:

enum eTaskGoToCoordAnyMeansFlags {
  TGCAM_DEFAULT = 0,
  // Ignore the health of the vehicle (default behaviour is to not use any vehicle with less than 600 health)
  TGCAM_IGNORE_VEHICLE_HEALTH = 1,
  // Considers all nearby vehicles for suitability (default behaviour is to consider only the vehicle closest to the ped)
  TGCAM_CONSIDER_ALL_NEARBY_VEHICLES = 2,
  // Performs the same tests as is done in IS_VEHICLE_DRIVEABLE (default behaviour is to just check the vehicle's health)
  TGCAM_PROPER_IS_DRIVEABLE_CHECK = 4,
  // Instructs the ped to remain in the vehicle at the end, so that multiple tasks can be chained together.
  TGCAM_REMAIN_IN_VEHICLE_AT_DESTINATION = 8,
  // Ped will never abandon the vehicle it is in.
  TGCAM_NEVER_ABANDON_VEHICLE = 16,
  // Ped will never abandon the vehicle it is in if vehicle is moving.
  TGCAM_NEVER_ABANDON_VEHICLE_IF_MOVING = 32,
  // Peds will use the targeting system for threats and register any threats they can attack (rather than just using the closest targetable ped)
  TGCAM_USE_AI_TARGETING_FOR_THREATS = 64
};

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Isn't the enum already in this file ?

TASK/TaskGoToCoordAnyMeansExtraParams.md Outdated Show resolved Hide resolved
@MonsieurBibo
Copy link
Contributor Author

Everything (except the enum) was fixed.

Comment on lines -11 to -13
```
NativeDB Added Parameter 13: Any p12
```
Copy link
Contributor

Choose a reason for hiding this comment

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

You cannot add arguments to the function declaration, it will break the ABI. I will fix this for you 🙂

Correct parameter count so it doesn't break the ABI.
@MonsieurBibo
Copy link
Contributor Author

Thank you !

@AvarianKnight AvarianKnight added the changes types This pull request changes types, possibly breaking ABI compat. Needs checking. label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes types This pull request changes types, possibly breaking ABI compat. Needs checking.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants