* Use ConvertGridNoToCenterCellXY instead of CenterX & CenterY
* Add direction utility function
We have a lot of places in the code that calculate direction based on center cell coordinates, but lack a utility function for it similar to other direction methods.
* Use utility function for calculating direction
* Use ConvertGridNoToCenterCellXY
* Use utility function for direction
* Use ConvertGridNoToCenterCellXY instead of CenterX & CenterY
* Use ConvertGridNoToCenterCellXY instead of CenterX & CenterY
* Remove CenterX & CenterY functions
Use ConvertGridNoToCenterCellXY instead
* Remove CenterX & CenterY calls from UB configuration
* Address review feedback
* Remove duplicate function
ConvertGridNoToCenterCellXY and ConvertMapPosToWorldTileCenter do the exact same thing
* Use PythSpacesAway instead of GetRangeFromGridNoDiff
Both functions calculate the same thing
* Remove GetRangeFromGridNoDiff
* Remove calls to abs()
The values end up being squared anyways making these unnecessary
* 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
- 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
- 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
- fixed AP cost shown at the cursor when pressing ALT during RUN mode since game doesn't allow to "reverse run" and forces walking
- shows walking cursor instead of running if ALT is held
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8966 3b4a5df2-a311-0410-b5c6-a8a6f20db521
Cancel current AI order when giving militia order.
Check if desired stance is possible here when ordering militia to crouch/prone.
Green AI: reworked climb code (only climb up, only at the start of the turn, disable for STATIONARY).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8947 3b4a5df2-a311-0410-b5c6-a8a6f20db521
HandleTalkInit:
- use SoldierToSoldierLineOfSightTest to check sight to person
- increased talking range for militia to TACTICAL_RANGE
When checking if radio set equipped for using with militia command feature, don't check for AP_RADIO as the game will deduct AP_TALK when giving order.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8942 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- change to stationary stance before jumping (fixes problems with jumping from moving animation)
- switch to standing animation before jumping if soldier is prone (allows to correctly jump from prone stance)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8921 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- <InfectionChance_WOUND_FIRE> can cause infections when taking fire damage
- <InfectionChance_WOUND_GAS> can cause infections when taking non-fire gas damage
- <fSpecialFlagLimitedUseArms> causes the infected to be unable to use one arm
- <fSpecialFlagLimitedUseLegs> causes the infected to be unable to run, and walk and travel slowly
- JA2_options.ini option DISEASE_SEVERE_LIMITATIONS controls whether <fSpecialFlagContractDisability>, <fSpecialFlagLimitedUseArms> and <fSpecialFlagLimitedUseLegs> are used
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=22099&goto=360451&#msg_360451
- Gas damage split up in fire and non-fire damage.
- Flamethrower projectile damaged is affected by fire resistance.
Requires GameDir >= r2553.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8828 3b4a5df2-a311-0410-b5c6-a8a6f20db521