Phobos-developers / Phobos

Ares-compatible C&C Red Alert 2: Yuri's Revenge engine extension
GNU Lesser General Public License v3.0
254 stars 83 forks source link

[Phobos Bug] AI deploy bug when mindcontrolled #513

Open FS-21 opened 2 years ago

FS-21 commented 2 years ago

Description:

When AI capture a deployable unit it can start an infinite loop of undeploy anims.

Phobos Build:

All builds since the code rewrite of the AI deploy fix of MC units into structures.

Steps To Reproduce:

  1. Let the AI capture your offensive unit capable to deploy into structure.
  2. Depending the AICapture decission the unit willl start in an infinite loop of undeploy animations. I think that are all the offensive decissions like the "AICapture: Naw, let's put him in hunt." cause this behavior.

Expected Behaviour:

AI should let the unit deploy completly and then execute the offensive behavior if the unit have any.

Actual Behaviour:

(almost) Infinite undeploy animation. Probably depens on the AICapture decission.

Additional notes:

That "AICapture" code is used in CaptureManagerClass ->DecideUnitFate ( ... ). DecideUnitFate method is used in CaptureManager::CaptureUnit( ... ). In assembly that DecideUnitFate method is called CaptureManagerClass::AI_Capture (address 0x4723B0).

Additional Files / Links:

MC_undeploy-deploy_AI_bug

Otamaa commented 2 years ago

Decide Unit Fate is also changed by ares https://github.com/Ares-Developers/Ares/blob/f642263ec12dd393bdc02ba122e63d87cd09faaa/src/Misc/Bugfixes.cpp#L887

and phobos does nothin to those , it is empty function for placeholder ? this is maybe caused by UnitDeploy Fix ? or maybe something else that we dont really know , try to debug it ?

Metadorius commented 1 year ago

Can you try to reproduce on latest nightly? @chaserli and @Starkku did some fixes to MC unit mission handling. If it's not working still - try removing the code for MC mission fix.

chaserli commented 1 year ago

Can you try to reproduce on latest nightly? @chaserli and @Starkku did some fixes to MC unit mission handling. If it's not working still - try removing the code for MC mission fix.

I'm afraid that's not quite related: We just reverted @secsome 's commit at 094b347, which was committed in Apr.25, months after this one.