Technical support > Bugs in stable version (2.5)

Equipment disapears

<< < (2/3) > >>

johndo42:
Hello,

I also noticed this bug after "equip soldiers without an aircraft" feature was added. this feature is very useful and i like it much.

as the bug is quite much annoying, i gave a try to look in the code and commit logs of changes related to the new feature, and my findings are following:

in commit 3c13bdc675d91149b98fee3200e917103169ea54 from Oct 28, 2012
* allow equipping soldiers without aircraft (call: "ui_push equipment…

there was change to src/client/cgame/campaign/cp_campaign.cpp in function CP_StartSelectedMission (void):
-  CP_CleanupAircraftCrew(aircraft, &ccs.eMission);
+  CP_CleanupTeam(base, &ccs.eMission);
i understand this change as all soldiers in base are now equipped before any mission and their inventory is removed from the stock in base. before this change, only soldiers assigned to aircraft were equipped.

I found the logic happenning after the mission in src/client/cgame/campaign/cp_aircraft.cpp in function void AII_CollectingItems, which collects all items from the ground and carried (i believe) only by soldiers included in the mission (assigned to aircraft) and return it to the inventory...

so from my quite high level point of view, equipping all soldiers in a base before mission, but returning equipmnet of only soldiers included in combat seems to be the casue of equipment disappearing.

as this was my very first try to look in the code, which is quite complex, i might be wrong. anyway i still believe this information may be helpful to someone that is able to fix it (unfortunately i am not yet...).

 

geever:
Equipping doesn't remove any items from the base storage at all (yet), but it's possible that I missed some trick in AII_CollectingItems, I'll check it as I find some free time.

-geever

geever:
Update: The issue has been patched yesterday. Report back if still happens...

-geever

Lynol:
Heh, great you looked into this. I guess it's not safegame compatible. Will report back when as soon as I have the time to start a new campaign.

geever:

--- Quote from: Lynol on November 08, 2012, 08:20:59 am ---Heh, great you looked into this. I guess it's not safegame compatible. Will report back when as soon as I have the time to start a new campaign.

--- End quote ---

It is compatible. Ofc. It doesn't give you back the items were lost but otherwise works.

TBH, It was a temporary fix, I'm going to revamp the item collecting system when I find some time.

-geever

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version