-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Use 2D distance to check whether team members have arrived destination #1487
base: develop
Are you sure you want to change the base?
Conversation
CrimRecya
commented
Jan 5, 2025
- Now the team members use the 2D distance instead of the 3D distance to judge whether to reach the mission destination, so as to prevent the problem that the mission is stuck and cannot continue in some cases (such as when the jumpjet stops on the building).
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
The game has it's own DistanceFrom2D function, see 0x5F6440. |
Thank you for reminding me. But I found that this fix affect the aircraft, so I decided to specialize it. |
|
||
int __fastcall Check2DDistanceInsteadOf3D(ObjectClass* pSource, void* _, AbstractClass* pTarget) | ||
{ | ||
return (pSource->IsInAir() && pSource->WhatAmI() != AbstractType::Aircraft) // Jumpjets or sth in the air |
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.
Is there a reason you omit AircraftClass? Also does all the in air stuff need to be considered like so?
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.
At present, it seems that aircrafts use their own mapcoords and the team destination's mapcoords to check.
During the previous test, it was found that if the aircraft uses this and needs to return to the airport with the script first, it will interrupt the remaining tasks for unknown reasons.