Hey I actually had to change that myself to get "WEAPON_COMPUTER" working in my mod more cleanly.
Did you make that change in trunk?
Yes, because of the bug nature. Didn't do anything fancy tho, heavy-duty safeguarding.
I'm still new blood on many aspects of the internals so i don't try to be clever with trunk =)
What I did was to copy stuff from sitemode.cpp where it has "newLootType, newWeaponType, newArmorType" to record the current bit of gear, and only do the push_back's to the "shelter" list once the end of the loop, with if statements.
Nice prettying up - got tempted for maintenance too to extract assign (i take it you mention the inside of the end of the loop btw, not outside ^^).
Then debug and prettying up at the same time, with limited testing power [and in trunk] make me even more nervous than natural so i felt more confident to slap 3 solid, highly readable bulk replaces + a couple lines to print debug info on the otherwise empty interface.
I figured "activesquad" there was a bug or oversight, so made it all shelter myself (coz it was easier to change all reference of LOOT_COMPUTER to WEAPON_COMPUTER that way). I didn't realize it was causing a crash though.
activesquad isn't actually involved in probable cause of crash, seems was historical way & alternate way but both (hopefully) get the loot safe =)
crash was probably due to getarmortype / getweapontype / ... that return -1 when item not found (then go to array index -1 and *BANG*). Checked current xml, seems fine. Best guess would be due to modifying/removing items from xml or unhealthy xml in some release.
I'm working off the zipped "trunk" from the lcswiki though, I guess I should buck up and install SVN so I can commit.
It's not my thing really, can u give me some directions on how to create my own branch for my modding?
Sure =)
First off check out from sourceforge (no need for anything special to do that). Only commit require you to auth.
-----
Edit: bummer. saw next post, was the only stuff left out as exercise =D. Doesn't bode that well to see you running around like that without getting across documentation
(just teasing, i bet all will get real Liberal ^^)
checkout: svn co
https://lcsgame.svn.sourceforge.net/svnroot/lcsgame lcsgame
commit: need an account, and inclusion in project
-----
then get in `lcsgame` and create your branch:
svn cp trunk branches/awesome_mod
then make the mod in awesome_mod.
And if on windows, can't help you much with integration, i'm command-line addicted ^^
[ i guess you should go with tortoiseSVN - maybe some better stuff exists now ]
[ if using codeblocks or other GUI, they usually have a nice integrated svn client ]
And remember, avoid frenzy around game mechanics in trunk without concensus and/or get-go from project admin.