Commit Graph
300 Commits
Author SHA1 Message Date
Asdow bd9cbd9944 Migrate +AI features
* Drink canteen
* Jump through window
* Use explosives
* Use wirecutters
2026-01-23 23:19:07 +02:00
Asdow f075963bca Merge branch 'master' into decideaction 2025-12-25 18:58:41 +02:00
Asdow 4fcf03d31a Include cleanup Tactical/.*cpp 2025-12-09 00:35:18 +02:00
Asdow 82aca548f5 Merge branch 'master' into ExtraMercs 2025-09-24 16:14:10 +03:00
BeatAroundTheBuscherandGitHub ed00830202 Fixes Upper/Lower Casing for include paths (#487)
* Fixing upper/lower case for includes

types.h, zconf.h and zlib.h were renamed so that global includes like Types.h
are not used.
2025-08-16 22:01:12 -03:00
Asdow c62d767622 Update to Master 2025-08-08 18:00:31 +03:00
kitty624 eb3f62c3d5 Reverting Commit 9122d7a
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
2025-08-01 20:52:22 +02:00
Asdow 1013531a7f Remove #pragma optimize("", off) calls 2024-12-01 21:17:23 +02:00
Asdow ef9aa1b027 Convert to SoldierID 2024-11-17 22:29:31 +02:00
Asdow b6e8b0c5ff Convert to SoldierID 2024-11-17 21:09:13 +02:00
Asdow 74d752d452 More conversions to SoldierID 2024-11-17 18:15:36 +02:00
Asdow 566ead5815 Convert SOLDIERTYPE::ubTargetID to SoldierID 2024-11-15 23:46:15 +02:00
Asdow 5de6f77f2e Convert SOLDIERTYPE::ubOppNum to SoldierID 2024-11-15 23:26:22 +02:00
Asdow 10250dc035 Merge branch 'master' into ExtraMercs 2024-11-09 13:44:53 +02:00
AsdowandGitHub 49a119e6b9 Convert INVTYPE boolean fields to flagmask (#325)
Rearranged fields from largest to smallest to remove alignment padding
2024-08-22 08:48:29 +03:00
AsdowandGitHub 9dfbc7d394 Use correct gridno for XY conversion (#289) 2024-03-13 19:29:28 +02:00
Asdow ab2c5fc10d Add BOXER() & ISVIP() macros 2024-02-18 12:03:43 +02:00
AsdowandGitHub b8a870df02 Reduce code duplication (#233)
* 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
2023-10-07 15:14:15 +03:00
AsdowandGitHub fc5573f73d Correct check for stance (#222)
Same issue as in commit 23ceb0f
2023-09-05 18:57:40 +03:00
AsdowandGitHub 23ceb0fa4c Fix bug in OCTH prone CTH calculation (by Seven) (#221)
GetToHitBonus() expects BOOLEAN for fProneStance argument, with no comparison to ANIM_PRONE, the ubEndHeight ends up adding bipod bonuses to *all* stances
2023-09-05 17:33:42 +03:00
rftrdevandGitHub b91871b518 Move grenade bonuses from Demolitions to Throwing (#202)
* 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
2023-08-11 11:27:29 -07:00
Asdow 03482ffc3d Merge branch 'master' into ExtraMercs 2023-07-26 13:17:49 +03:00
majcostaandGitHub 24425a82b1 More unused stuff removal (#49)
* 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
2023-01-03 15:51:48 +02:00
Asdow 1f0a8f46e8 Import changes from the local SVN working copy 2022-10-10 10:08:44 +03:00
Sevenfm d0c5b366fb AICalcChanceToHitGun: take into account target facing for standing/crouched human targets (when not using SIDE_FACING_DIVISOR option).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9379 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-05-05 12:50:30 +00:00
rftr 7b57f834f6 unactivated turncoats ignore suspicious activity.
unactivated turncoats intentionally try to miss when shooting at mercs/militia.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9370 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-04-24 21:16:13 +00:00
rftr 87b0c7c6b7 new feature: madlab's robot can be upgraded
requires gamedir r2642

https://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=364403

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9338 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-21 17:34:49 +00:00
Shadooow 9122d7a7a6 CAN_FAN_THE_HAMMER = FALSE now disables the burst mode on pistols
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9319 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-13 19:43:25 +00:00
Sevenfm 1e94aea625 Don't apply mortar/GL default penalty for enemy/militia is they cannot have trait skills, improved code to support old skill system.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9313 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-01 18:20:46 +00:00
Shadooow c23d62de02 Makes it so that if ASSIGN_SKILL_TRAITS_TO_ENEMY or MILIATIA is disables then enemies or militia will not get penalties/bonuses from new traits which then should fix the issue where enemies do not use mortars at all when this option is disabled.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9312 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-01 17:49:24 +00:00
Sevenfm 1015614473 Play different sound when object drops into water, depending on object weight and type.
Play S_WATER_IMPACT1 when bullet hits water.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9294 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-02-08 10:17:38 +00:00
Shadooow 5e8fa16cb9 Added missing parenthesis to the code evaluating sightrange NCTH that could lead to issues.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9291 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-02-06 09:24:04 +00:00
Shadooow 68664bed77 fixed bleeding value not being substracted when losing max hp which resulted into the graphic HP bar having wrong color
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9189 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-10-18 08:26:32 +00:00
Sevenfm 7978ad77f3 Morale changes for AI soldiers:
- GetMoraleModifier: use bMorale for both player and AI.
- CalcSuppressionTolerance: use morale as a base for tolerance for AI soldiers.
- HandleSuppressionFire: morale loss for AI soldiers.
- EVENT_BeginMercTurn: increase morale for AI soldiers.
- TacticalCreateSoldier: Set morale = 60 + 2 * bExpLevel + Random(20) when creating AI soldier.

NEW_SUPPRESSION_CODE: UseGun, UseGunNCTH: reduce shock when firing gun.
AI_NEW_MORALE: limit AI morale depending on morale and shock level.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9181 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-10-15 05:52:09 +00:00
Flugente a93e9b4a9c Added helper functions to easier determine gun stats
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9158 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-08-27 20:48:19 +00:00
Flugente 102ee32232 Fix: when firing from several barrels with two guns, AP cost is deducted twice
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9145 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-07-24 11:00:59 +00:00
Shadooow d6f07a7ef5 godmode reworked: reused existing mechanism in code = same functionality, less code changes, also when enabled GOD MODE text will now show up in left corner in red color, this was already there I just uncommented it
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9128 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-07-06 19:06:23 +00:00
Shadooow 385210ba09 vehicles will no longer lose stats from critical hits
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9127 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-07-06 15:59:00 +00:00
Flugente 587b7e2874 Fix: reverted revert of 9115 and fixed the issue of guns always deteriorating in NCTH
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9119 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-06-28 14:39:45 +00:00
Shadooow 94f164eaa8 reverting commit 9088 as it causes regression of super high weapon deterioration
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9115 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-06-28 11:18:08 +00:00
Shadooow da940db97c god mode cheat code tweaks + preventing ability damage
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9098 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-06-22 00:20:12 +00:00
Flugente a7d7f4b93b Fix: crash due to overflow as a result of very low reliability values
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9088 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-06-19 10:27:13 +00:00
Flugente ff3076203f Fix: antimateriel bullet damage to structures often isn't properly applied
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9080 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-06-13 17:23:55 +00:00
Shadooow fe9dd67edc Fixed bug that resets melee attack aim location if the attack was stopped in interrupt.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9059 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-06-01 15:21:56 +00:00
Shadooow 5a2202f5b4 new feature: after throwing knives, put any throwing knife class item from second hand into main hand
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9037 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-05-22 15:07:28 +00:00
Sevenfm 205f4516d9 Missing part of previous fix (by Shadooow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9022 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-05-13 05:19:22 +00:00
Sevenfm 037a70b253 Fix for drugged icon not displaying on merc portrait immediately when taking drug from map screen (by Shadooow).
Fix for playing full burst firing sound with less bullets than the usual for the gun burst fire in chamber (by Shadooow).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9011 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-05-07 18:12:32 +00:00
Sevenfm b6f15b2347 Add robots to enemy groups (by rftr).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8956 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-04-03 03:32:40 +00:00
Sevenfm d66a05b0f4 NO_STANDING_ANIM_ADJUSTMENT_IN_COMBAT: apply only for player mercs, to avoid possible problems with AI.
CalcChanceHTH: only use reduced chance for boxers.
AIDoctorFriend, AIDoctorSelf: first change soldier to stationary.
AIDoctorFriend: change target to stationary.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8928 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-02-08 18:27:27 +00:00
Sevenfm 6ad8b22368 CalcChanceHTH: restored higher base chance for melee attacks.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8927 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-02-07 21:07:17 +00:00