Since demolitions no longer affects grenades damage and range grenades
check should be moved to throwing. Keep demolitions trait at lower prior
because it can still be helpful to detect mines
ContinueDialogue was possible to be called with pSoldier that isn't null but is not valid pointer to MercPtrs array resulting in debugger catching an illegal memory access.
* Externalize the Divisor for usBackPackWeight
A new ini value BACKPACK_WEIGHT_FACTOR is introduced to replace the hard coded 50.
The value goes from 1 to 250 and its default value is 50 as before.
* Refactor usBPPenalty into its own function GetBackbackAPPenaltyFromBackpack
The same code is also used in GetAPsCrouch as well as GetAPsProne
The intent of the change is to make sure that backpacks including their content
do not add an additional AP cost of +1. Now it checks if
the backpack weight is > ubBackPackWeightFactorForAPPenalty (default value 50).
The min exists to make sure that the AP cost does not become higher than previously.
Previously the bool fBackpackCheck was used to add +1 if there is any backpack.
But this also includes an empty tactical sling (backpack with 0.2 kg) and
therefore makes the item much less interesting to use.
- added Tracona for use with UB, etc
- sorted alphabetical (english) for more ease of use during IMP creation
- that sorting starts only after original nationalities (from after Metaviran)
- expanded and adjusted the existing ones
- tried to achieve a decent amount from every continent
- while sorting the language specific files, preserved existing translations
- adjusted MercProfiles in related gamedir change
- food items are usualy not shown in game without using Food
- option ALWAYS_FOOD allows them to be shown even without
- default is false, no food items without Food
it made: CAN_FAN_THE_HAMMER = FALSE now disables the burst mode on pistols
which effectivly resulted in pistols burst mode only being avaialbale with can fan the hammer active
which further resulted in being required to fire from hip mode when using burst with pistols
that's not a desired behaviour for burst on pistols, their burst should not depend on fan the hammer
therefore reverted
Due to additional dialogue flag having the value 8, and UB not having a specific flag for mercs standing up after heli crash, the FindSoldierByProfileID would always find Steroid if he was on the team, and then display the crunched laptop popup text.
Adding a new flag that is checked before we go into that branch in HandleDialogue fixes the issue.
This one is big, but unless I missed something, should be all be
trivial.
scripted-diff with the following, then manually tweaked whatever needed:
```
if [ $# -ne 3 ]; then
echo "Usage: $0 '<pattern>' '<replacement>' '<filename>'"
exit 1
fi
pattern="$1"
replacement="$2"
filename="$3"
if [ ! -f "$filename" ]; then
echo "Error: File $filename does not exist."
exit 1
fi
sed -i '/'"$pattern"'/ {
:loop
$ !{
N
/'"$pattern"'.*\n.*#endif/ {
s/'"$pattern"'/'"$replacement"'/
s/#else/} else {/
s/#endif/}/
P
D
}
/'"$pattern"'/ b loop
}
}' "$filename"
echo "Replacement complete in $filename"
```
h/t to Grok2 for the sed command
Requires accompanying GameDir change.
Removed ItemFlag as an xml tag and added bitmask flags as their own individual tags. Makes modding easier when the flags can be modified without math in the xml files
simplified the previous commit, now no more need for a tag
when checking IsItemLegal for Food System, ontop of checking for foodpoints, now also check if is drug
as a result, as previously, all eatable food will be excluded without food system, but now only if it isn't a drug at the same time
and no more tag to check for that in items.xml needed
no food items if the food system is off
whether the item is exclusive is defined by tag in items.xml
replaced previous way of decision, which used Item[usItemIndex].foodtype > 0 as criteria
that also restricted dual use items (i.e. drugs that also have a foodtype, like coffee, etc.)
.editorconfig already enforces it but it's getting changed piecemeal in
every commit. just get it done with.
the script:
```
find . -type f -not -path "./.git/*" -not -path "./.vs/*" | while read -r file; do
isFile=$(file -0 "$file" | cut -d $'\0' -f2)
case "$isFile" in
(*text*)
echo "$file is text"
if [[ $(tail -c 1 "$file" | wc -l) -ne 1 ]]; then
echo "" >> "$file"
fi
;;
(*)
echo "file isn't text"
;;
esac
done
```
Some bloodcats during ambushes could have ubInsertionDirection with values > 100, which then causes endless looping in pathfinding algorithms as valid direction values range from 0 to 7
UseCreatureMusic( HostileZombiesPresent() ); was overriding the music mode set in PrepareCreaturesForBattle() when encountering crepitus or being in the creature caves, resulting in regular tense and battle music being played.