Home » MODDING HQ 1.13 » v1.13 General Development Talk » Any introduction to the code?
Re: Any introduction to the code?[message #357791 is a reply to message #357790] Wed, 07 August 2019 07:51 Go to previous messageGo to previous message
MH17 is currently offline MH17

 
Messages:46
Registered:November 2018
Location: Antarctica
silversurfer wrote on Tue, 06 August 2019 19:16
It seems you had multiple groups of enemies, not all in the sector but some recently departed. They should appear after some time because reinforcements take time. At least that is my guess what happened here.
Hi, SilverSurfer!
Yeah, I got two groups of enemies (with pTSoldier->ubGroupID equal to 23 and 24), each group has 14 soldiers.
But all of them are staying in the sector for sure, cause for each one of the 28 soldiers:
1. I checked flag "pTSoldier->bInSector", it is equal 1.
2. I manually found all the soldiers on the tactical map using cheatcode Alt+E.

After using Alt+O everyone dies in tactics, but in strategic map one of the groups stays untouched.
In order to find out which enemy group has managed to survive after Alt+O I tried to check the ubGroupID in "NumHostilesInSector" and suddenly it gave me ubGroupID is equal to 24.

Do you know where I can find a code responsible for update of gpGroupList->ubGroupID after the death of last soldier in the group? I believe the problem is going to be somewhere around.

UPD: After some walking around the code with debugger I can conclude, that one enemy group (with ubGroupID = 23) was correctly deleted in function "ProcessQueenCmdImplicationsOfDeath" (file "Queen Command.cpp", line 1371, does anyone understands its logic?). The second group (with ubGroupID = 24) left as it is despite the fact, that all the soldiers were killed by the cheat code Alt+O. It seems to me that the call of the function "ProcessQueenCmdImplicationsOfDeath" has been missed somewhere...

UPD 2: Finally: after some extra research I see, that the soldiers from one of the groups with ubGroupID = 24 just absent in vector MercSlots (file "Overhead.cpp"). I have no idea why instead of 24 there are soldiers with ubGroupID = 25. As a result a function "ExecuteOverhead" cant process the array properly. Does anyone know what is the purpose of the vector MercSlots? Any advices or recomendations will be highly appreciated!

[Updated on: Wed, 07 August 2019 15:18]

Report message to a moderator

Corporal
 
Read Message icon12.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Read Message icon9.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message film28.png
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: An easy way of editing the XML files in dev builds (XML Editor broken?)
Next Topic: How to change loading screens?
Goto Forum:
  


Current Time: Wed Feb 12 17:42:18 GMT+2 2025

Total time taken to generate the page: 0.00959 seconds