130 Commits
Author SHA1 Message Date
Asdow 4fcf03d31a Include cleanup Tactical/.*cpp 2025-12-09 00:35:18 +02:00
steph-pgandmajcosta 9ce1492651 Add visual muzzle flash for invisible soldiers 2025-10-19 09:42:20 -03: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 bfb724eab9 Use SoldierID 2024-12-01 18:23:52 +02:00
Asdow 24656f2810 Use SoldierID 2024-11-30 15:20:18 +02:00
Asdow 0d97e36c34 Use SoldierID 2024-11-21 23:56:44 +02:00
Asdow 34f0b40f93 Convert functions and globals to SoldierID 2024-11-17 14:53:52 +02:00
Asdow 566ead5815 Convert SOLDIERTYPE::ubTargetID to SoldierID 2024-11-15 23:46:15 +02:00
Asdow 131172e41a Convert SOLDIERTYPE->ubPreviousAttackerID to SoldierID 2024-11-15 22:54:44 +02:00
Asdow ee429fd1f4 Convert SOLDIERTYPE->ubAttackerID to SoldierID 2024-11-15 22:51:48 +02:00
Asdow 6a0d02e9b9 Change type from BOOLEAN(!) to SoldierID 2024-11-15 01:03:21 +02:00
Asdow 1345d92521 Convert Soldier Find.cpp to SoldierID 2024-11-14 00:45:50 +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 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
Asdow 03482ffc3d Merge branch 'master' into ExtraMercs 2023-07-26 13:17:49 +03:00
AsdowandGitHub 35109a5615 Guard against possible illegal array access (by Seven) (#121)
ClosestPanicTrigger() can return -1 but its use in indexing gTacticalStatus.bPanicTriggerIsAlarm was not checked in all the places in the code
2023-01-31 20:26:21 +02:00
Marco Antonio Jaguaribe CostaandAsdow 8b1c4effa0 nuke all the #if 0's
scripted commit:

find . -not -path '*/.*' -and -not -path '*/ext*' -type d -exec coan source -R -E {} ';'

https://coan2.sourceforge.net/coan_man_1.html
2023-01-19 00:13:08 +02: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
rftrdev 5000f965e1 Add "Soldier Bounties" mission 2022-10-22 17:54:06 -07:00
Asdow 1f0a8f46e8 Import changes from the local SVN working copy 2022-10-10 10:08:44 +03:00
Sevenfm cdc605d5ab Press [\] to break window glass with crowbar or any two-handed weapon. Weapon can be damaged in the process.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9368 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-04-21 13:00:09 +00:00
rftr fcc21e32dc added new option in Skills_Settings.ini: [Covert Ops] COVERT_TURNCOATS_ACTIVATE_IN_AUTORESOLVE
if enabled, turncoats will automatically activate when entering an autoresolve battle

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9365 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-04-14 06:50:44 +00:00
Sevenfm b8b48e7d2e Only play certain sounds when soldier is visible or if there is player team member near:
- cow sounds
- crow sounds
- animation based sounds
- lock n' load sound for gun
- enter deep water sound

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9295 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-02-10 08:24:07 +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
Sevenfm 531849f7aa Disabled muzzle flash when trying to fire jammed gun.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9281 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-27 10:04:21 +00:00
Shadooow c29e070ccf Fixes the missing muzzle flash lighting when firing in the dark. The flag was actually never set when using NCTH, and UseGunNCTH() that was supposed to set it gets called after the animation control checks whether a muzzleflash is true or not, so I had to add the setting the flag just before that check (by Asdow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9279 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-26 16:12:06 +00:00
Shadooow 828e015027 qol change: if the last movement mode prior to climbing down the roof was running, it won't be reset to walking
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9206 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-10-30 19:34:47 +00:00
Flugente 78087707d1 Fix: if a cow dies from gas, no corpse is created
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9133 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-07-08 19:53:44 +00:00
Shadooow e0e45b83cd Significant overhaul on handling doors regarding to noise:
- significantly increased base noise volume of opening or closing doors
- adjusted the noise volume based on type of the door (metal louder etc.)
- can with string adds +4 points to the noise volume and disallows to use stealth to prevent any noise
- removed the code for movement noise from door handling and replaced it with simpler stealth check
- noise will now come from GridNo of doors, not soldier opening them
- disabled terrain check when the noise comes from doors
- fixed doors always playing sound of closing even when there was no noise (stealth mode)
- whether game plays sounds of opening/closing doors will now be based on whether any of player mercs heard it or not
- game will now show doors being opened/closed if any of our mercs heard it
- disabled the message for player about soldiers hearing noise from doors being opened/closed (no point imo when player can hear it)
- added locator ping when someone opens doors with can with string attached on them

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9056 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-05-27 23:32:50 +00:00
Sevenfm 422c72b957 Fixes NPCs going back to cower animation after collapsing which also caused them not to die properly (by Shadooow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9006 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-05-06 18:38:31 +00:00
Sevenfm b7cc3bbcf8 Fix for Dynamic Opinions feature not respecting ini setting and not allowing it to be disabled easily (by Shadooow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9002 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-05-05 03:40:57 +00:00
Sevenfm c3e961731a Fix: allow interrupts after door opening (by Shadooow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8975 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-04-25 07:31:52 +00:00
Sevenfm 99556e09a5 Fixes female and big male body types being transparent when climbing up roof (by Shadooow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8973 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-04-25 05:35:28 +00:00
Sevenfm fc91cb545a Fixes bug when you sometimes got vision inside building when climbing from the roof (by Shadooow).
Extended explanation: This happens from two reasons, first - there seems to be vision update for all soldiers every 5 seconds. Second, when climbing down the roof, the height level is set to 0 at the very beginning of the climb when merc is still on the roof - which makes him for a split second inside the building in fact. If the automatic vision update is triggered in this split of second, you will see into building.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8969 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-04-24 12:52:39 +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 fe10587437 Show flash light when throwing flares.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8946 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-02-21 16:25:36 +00:00
Sevenfm 02d19f3240 Update tree visibility after changing stance.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8944 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-02-20 17:38:38 +00:00
Flugente c5022fa1e5 New feature: turncoats can be created from enemies and ordered to switch sides
Requires GameDir >= r2535

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=360191&#msg_360191

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8811 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-30 00:13:42 +00:00
Sevenfm 9e1b5338a6 More AI logging information.
PanicAI: use correct movement and stealth mode when determining AP needed.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8768 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-03-08 22:39:21 +00:00
Flugente c8207018e3 Added Battlesounds for melee attacks.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=358569&#msg_358569

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8708 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-11-27 21:46:49 +00:00
Flugente 0ab562c29e - Added new additional dialogue events for commenting upon other merc's skill/kills, comment during bandaging
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23604&goto=356522&#msg_356522
- renamed dialogue enum for clarity

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8648 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-01-21 19:39:07 +00:00
silversurfer 4021450369 - fixed incorrect AP and BP calculation for jumping over fences
- fixed incorrect stance handling for jumping over fences

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8635 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-11-04 17:49:10 +00:00
Flugente 494dbc6e69 Store the profile type in the profile structure and remove superfluous code
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8620 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-09-24 19:36:28 +00:00
Flugente 2dbacd32de The following options have been moved from the campaign the campaign start screen to JA2_Options.ini:
- Maximum number of IMPs (now MAX_IMP_CHARACTERS (Default: 10))
- Enemies drop all items (now DROP_ALL (Default: FALSE))
- Merc Story Backgrounds (now BACKGROUNDS (Default: TRUE))
- Food System (now FOOD (Default: FALSE))
- Improved Interrupt System (now IMPROVED_INTERRUPT_SYSTEM (Default: TRUE))
- Inventory Manipulation Costs AP (now INVENTORY_MANIPULATION_COSTS_AP (Default: FALSE))

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23855&goto=354656&#msg_354656

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8610 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-09-02 15:14:01 +00:00
Flugente a59b75b0be New feature: we have to bury corpses, or their rot causes diseases in sectors
Requires GameDir >= r2436.

Fopr more info, see http://thepit.ja-galaxy-forum.com/index.php?t=tree&th=23828&goto=354321&#msg_354321

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8591 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-08-12 12:42:38 +00:00
Flugente cd5441d875 Added additional dialogue call for death of a character (ADE_NPC_DEATH = 16)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8585 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-07-22 19:06:48 +00:00
Flugente 80674249cc New feature: bloodcat/zombie/bandit raids on player-controlled sectors
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23711&goto=353154&#msg_353154

Requires GameDir >= r2420

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8554 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-04-15 14:42:01 +00:00
Flugente 7b1ba8f7f2 Fix: wrong sound played
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8505 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-11-01 16:54:08 +00:00