* 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.
* Copy grenade settings from demolitions to throwing
* Fix setting strings
* Add throwing bonuses to the same spots as demolitions
* Delete grenade bonuses from Demolitions
* Update text
* Reapply throwing check
* More unused stuff removal
delete:
- giant 'metaheaders' (JA2 All.h, Laptop All.h, etc), preferring to add #includes directly where needed
- unused ExceptionHandling and DbMan translation units
- unused WizShare.h, Bitmap.h, trle.h, video_private.h headers
* remove mentions from vc proj files too
* remove preprocessor conditionals for unused definitions
find . -iname '*.h' -o -iname '*.cpp' -exec unifdef.exe -m -UPRECOMPILED_HEADERS -UJA2_PRECOMPILED_HEADERS -UWIZ8_PRECOMPILED_HEADERS -UPRECOMPILEDHEADERS {} ';'
then manually fixed a couple files the tool errored out on
* yes, the comments too
as title
DrawTraitRadius uses usColour.
Allow to start dragging from any stance, soldier will crouch automatically.
Show draggable objects when drag skill menu is active.
Press [\] key to start dragging object/solder/corpse in front of merc.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9369 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- mouse cursor showing blocked path incorrectly and jumping over fence via mouse failing
- endless clock issue at the end of the boxing match if player merc had backpack
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9238 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- merc will continue running after he walks out of last water tile
- fixed both pathing prediction AP cost calculation and an actual AP cost deduction when running into water and out of water
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9068 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- fixed camera action AP cost shown and made soldier to turn towards target
- fixed handcuffs, jar and can actions AP cost shown calculating pathing cost twice and not calculating stance change at all
- fixed refueling and repairing pathing leading to inside vehicle
- fixed endless clock issue when trying to refuel from spot next to vehicle
- fixed endless clock issue when trying to repair vehicle/SAM site during combat
- fixed refuel, repair and jar actions not costing any AP in turn based mode
- fixed multiple actions not calculating and substracting AP cost for turning
- fixed using toolkit asking whether player wants to attack ally
- fixed issue where the required AP cost for melee attack was not recalculated when changing movement mode
- allowed to start repairs on robot manually from tactical mode
still a problem:
- repairing during combat still does nothing as soldiers cannot go into assignment while there are enemies on map
- we need new function to return action gridno for actions on vehicles, FindAdjacentGridEx is not working very well
- soldiers doesn't turn during interactive actions
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9033 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This fixes punching and stabbing target through door and improves attacking at prone target which was previously calculating shortest route only to the "main" GridNo of the prone target despite he occupies two in this position. It also removes the possibility of attacking from diagonal tile - it was never intended to happen and was calculating APs incorrectly.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9024 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- robot has no (dynamic) opinions anymore. For now I allowed other mercs to have opinion about robot, but that is also a bit odd
- fixed Not Enough Action Points error triggering needlessly, when doing stuff like reloading ammo, using consumables or changing attachments in map screen during battle with mercs that are not in the sector where battle is occuring
- fix for RPCs sometimes repeating last spoken line after victory in the sector
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9005 3b4a5df2-a311-0410-b5c6-a8a6f20db521
Moved zombie AI into separate file ZombieDecideAction.cpp
New zombie AI:
- simplified code
- advancing using cover
- if zombie cannot reach any opponent, he tries to hide
- if zombie cannot reach opponent and cannot hide and he is under fire, he will retreat, seeking cover away from known opponents
- if zombie doesn't know enemy location, he will try to run to closest friend who knows enemy location
- new zombie AI has extended AI logging
More water splash sounds (Data\Sounds\Misc\Splash1.ogg .. SplashN.ogg).
CalcCoverValue:
- allow moving into shallow water if it provides better position
- special calculations for zombies: zombie is very dangerous at close range
- if soldier has no gun, use different calculation based on distance instead of CTGT
FindBestNearbyCover: zombies only choose spots that provide sight cover.
Added functions for extended AI log.
ClosestReachableDisturbance:
- if soldier is zombie and he cannot climb, skip location
- zombies do not attack vehicles
- improved check to avoid choosing dying opponents
EstimatePathCostToLocation: return 0 if checking for zombie which cannot climb and path needs climbing.
RoamingRange: always max roaming range for zombies.
SightCoverAtSpot, ProneSightCoverAtSpot:
- improved max sight range calculation
- added option for unlimited sight range check
New AI functions:
- AIDirection
- AICheckIsSniper
- AICheckIsMarksman
- AICheckIsMedic
- AICheckIsMortarOperator
- AICheckIsGLOperator
- AICheckIsOfficer
- AICheckIsCommander
- AICheckIsMachinegunner
- AIGunInHandScoped
- AIGunScoped
- AIGunRange
- AIGunClass
- AIGunType
- AIGunDeadliness
- AIGunAmmo
- AIGunAutofireCapable
- FindObstacleNearSpot
- InSmoke
- CorpseWarning
- CorpseEnemyTeam
- CorpseMilitiaTeam
- AICheckUnderground
- AnyCoverAtSpot
- AICheckHasWeaponOfType
- AICheckHasGun
- AICheckShortWeaponRange
GetCorpseAtGridNo: additional check for valid gridno.
More zombie raise sounds (Data\Sounds\Misc\ZombieRaise1.ogg .. ZombieRaiseN.ogg).
GetCorpseRotFactor: improved code to return FLOAT value between 0 and 1.
New debug topic id TOPIC_DECISIONS for logging AI decisions.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8760 3b4a5df2-a311-0410-b5c6-a8a6f20db521
RenderOverheadOverlays fix: last soldier in player team
StartInterrupt fix: all interrupts in original interrupt system start as hidden and revealed later if soldier decides something
StartInterrupt fix: don't show hidden interrupt
DeductPoints, ResolvePendingInterrupt, StartInterrupt: MAX_NUM_SOLDIERS fix
SoldierCollapse: replace chosen one if soldier is collapsed
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8259 3b4a5df2-a311-0410-b5c6-a8a6f20db521
More updates to EDB:
- fixed gun range calculation
- trait modified values now shown for attack AP and reload AP
Cleaned up attack AP trait modifiers and moved them to a new function.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7764 3b4a5df2-a311-0410-b5c6-a8a6f20db521