Commit Graph
94 Commits
Author SHA1 Message Date
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 1a8db5d15b More conversions to SoldierID 2025-06-27 19:58:20 +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 327046925b Converto to SoldierID 2024-11-18 23:20:42 +02:00
Asdow ef9aa1b027 Convert to SoldierID 2024-11-17 22:29:31 +02:00
Asdow 74d752d452 More conversions to SoldierID 2024-11-17 18:15:36 +02:00
Asdow f58cf588a6 Mark TacticalStatusType::sSlideReason as _UNUSED
Removed from function call parameters at the same time.
It was supplied to SlideTo, SlideToLocation and SoldierLocationRelativeToScreen but was never used.
2024-11-17 14:20:37 +02:00
Asdow 75deccbc44 Convert SOLDIERTYPE::ubRobotRemoteHolderID to SoldierID 2024-11-15 23:56:26 +02:00
Asdow b98732daa7 Convert gusSelectedSoldier to SoldierID 2024-11-15 19:06:34 +02: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 dc8fffb471 Fix: use system time instead of game time for breaking AI deadlock as game time is affected by fast timer mode, as a result breaking AI decision before it can execute normally.
Allow to break AI deadlock manually by pressing ESC key after 10 seconds, auto break AI after DEAD_LOCK_DELAY seconds.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9383 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-05-10 18:45:19 +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 d028282b39 Focus skill: no watched location interrupt bonus if focus is active.
Improved data initialization.
Smart tree top hiding: increased max distance to hide tree in vertical direction.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8950 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-03-05 07:01:51 +00:00
Sevenfm 5b8f91912f First decay light effects and then decay smoke effects, because fire can create light.
Dynamic creation of light effects for fire and signal smoke (ADD_LIGHT_AFTER_EXPLOSION option).
Fixed/improved code to decay light effects so that ubDuration works correctly.
Note: <ubRadius> tag is not used for light effects as they cannot spread, light is always created with <ubStartRadius> and can only decay later.
Improved code to decay smoke effects.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8767 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-03-03 17:48:43 +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 0992a423e7 New feature: mercs with a gun-related trait (New trait system only) can use the 'Focus' skill via the skill menu ([$] in tactical). This skill grants an interrupt modifier bonus in the targeted area, but also a penalty outside of it.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=20659&goto=350400&#msg_350400

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8432 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-07-26 13:49:38 +00:00
silversurfer 0c521e2623 Fixes (by The_Bob):
- Fixed never ending interrupt bug (cats/bugs got interrupt when out of breath)
- Added condition to interrupt code for minimal breath left to get interrupts
- Tweaked timer control code

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8401 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-04-14 19:03:55 +00:00
silversurfer fef0722178 Fixes (by The_Bob):
- Fixed random freeze on win8/10
- Fixed crash on mercs entering sector
- Fixed crash when using cover display (del/end)
- Fixed attachment popup showing incompatible attachments (crash/freeze/confusion on clicking the option)
- Fixed attachment popup positioning
- Fixed LBE contents corruption/deletion
- Fixed access violation (out of array bounds) in interrupt code
- Fixed a bunch of random old stuff
- Got the project to build on VS2015
- Improved popup class handling of grayed out options
- Improved performance of get item assignment check (added by Flugente)
- Added Ctrl+Space bind for testing/fixing broken LBE contents


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8399 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-04-12 08:09:12 +00:00
Sevenfm 17ce3e4473 Replaced Assert(pTempSoldier) in StartInterrupt with NOBODY and NULL checks.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8300 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-09-13 20:14:11 +00:00
Wanne 1e51250475 Multiplayer: Completely disabled interrupts in a COOP game, because it is still buggy. So the ALT + E workaround on the server (to give turn back to client on stuck interrupt) should not be needed anymore
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8296 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-09-12 18:03:19 +00:00
Flugente 99f5be0ed7 New feature: interactive actions allow various actions (hacking/reading/drinking/...) from user-defined xml acttions. The exact results can be set in a lua function.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23144&goto=346447&#msg_346447

This is fully savegame compatible.

GameDir >= r2333 is required.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8278 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-08-02 19:03:28 +00:00
Flugente ce6e63831d New feature: environment hazards pose danger to soldiers in certain sectors - first use are snakes that attack anybody in water sources in swamps.
Requires GameDir >= r2327.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8266 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-07-03 21:26:45 +00:00
Sevenfm b1eb11941a FindSoldierByProfileID fix: check last soldier in player team
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
2016-06-25 09:44:25 +00:00
Flugente 9e97538d89 New feature: enemy combat jeeps fill the role between infantry and tanks. For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=344628&#msg_344628
This is savegame compatible. GameDir >= r2305 required.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8114 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-03-20 18:45:51 +00:00
Flugente d1e1759aa2 Removed ENABLE_ZOMBIES-define
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8047 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-01-31 17:54:51 +00:00
Flugente 4d9140da57 New Feature: Drug System Overhaul. The drug system has been completely overhauled.
Requires GameDir >= r2257.

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

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7896 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-06-28 17:47:25 +00:00
Flugente 7a163e8a3e Simplified ImprovedAutoFastForward feature (allows to accelerate only invisible enemies) (by sevenfm)
Now single option IMPROVED_AUTO_FAST_FORWARD=TRUE by default
Removed options:
AUTO_FAST_FORWARD_ENEMIES
AUTO_FAST_FORWARD_MILITIA
AUTO_FAST_FORWARD_CIVS
AUTO_FAST_FORWARD_CREATURES
ENEMY_CLOCK_SPEED_PERCENT

Also a small fix (additional update of AutoFastForward status when soldier arrives at new gridno)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7828 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-04-21 21:50:47 +00:00
Wanne deba6d7ac0 Merged from revision: 7757
Multiplayer Bugfix: Reverted the "endless interrupt bugfix" for the pure client, because it was not working correctly, and the server could not press ALT + E to give the turn back to the client, if stuck.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7758 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-02-28 12:54:15 +00:00
Wanne e000abcc57 Merged from revision: 7586
Multiplayer Bugfix:
- Improved (fixed) interrupt endless clock when enemy interrupts (CO-OP game) (tested by Woquit)
- Override turn (ALT + E): Now it is possible again for the server to give the turn back to itself
- Updated MP Version Number to 3.1

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7587 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-10-18 14:08:28 +00:00
Wanne 00999d673a Merged from revision: 7565
Multiplayer Bugfix: Fixed endless clock on enemy interrupt on the server, by reverting the non working interrupt fix which was introduced in revision 5623
- INFO: The endless clock on the client still occurs on certain enemy interrupts, but this can be fixed by pressing ALT + E on the server and giving the turn back to the client.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7566 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-10-14 18:22:18 +00:00
Wanne 9734b094fc Merged from revision: 7099
Minor fixes/improvements for existing features (by Sevenfm)
1) Slightly reduced the size of merc's healthbar to fit general ja visual style.
2) Removed some unnecessary options for SHOW_HEALTHBARSOVERHEAD, SHOW_COVER_INDICATOR.
3) Several minor fixes.
4) New option: ENEMY_CLOCK_SPEED_PERCENT - set clock speed during enemy turns.
With this option, player can set default speed to comfortable value (100-120) and set increased speed for enemy turns (150-200).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7100 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-03-20 09:17:39 +00:00
Wanne 36131f3bf1 Merged from revision: 6949
- Multiplayer: Only output the notification info message about stucking enemy in a CO-OP game!

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6950 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-02-20 13:12:53 +00:00
Wanne 44cf72a2e0 - Fixed compilation error for JA2UB define (by anv)
- Added missing string to _FrenchText.cpp
- Renamed the "#if (defined JA2UB)" to "#ifdef JA2UB" so we are consistent through the code


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6719 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-12-28 18:27:09 +00:00
Wanne b9b58fe790 Ctrl + D in turnbased - skip player interrupts for that turn (by Sevenfm)
- This only works for singleplayer
- This only works for Old interrupt system

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6682 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-12-05 08:08:20 +00:00
Flugente 3e70a9d6dc mercs entering combat via air who do not have the 'airdrop' background receive a penalty on their interrupt level
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6651 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-11-25 19:43:07 +00:00
Flugente 596b08ca70 - renamed AC_SUPPRESSOR to AC_MUZZLE
- mercs with average refinement get a morale penalty if they care extremely about refinement and the other merc is a slob or snob
- added code for soldier-specific interrupt modifier
- added belgian and portoguese nationalities
- Fix: race, sexism etc. xml data didn't correctly overwrite PROF.DAT data

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6519 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-10-21 17:57:39 +00:00
Kriplo d760d34d7e - somehow lost two condition in previous commit, correct what is missing.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6387 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-10 21:02:53 +00:00
Kriplo f5ac5be03f Brief: //dnl ch68
- Magically appeared reinforcements for enemy and militia just turn after they are called from now could be delayed and randomized.
Details:
- Practically all enemy reinforcement which can populate available slots was always appeared next turn after they are called so now we have game settings under "Strategic Gameplay Settings" for fine tunning enemy and militia reinforce entry:
  MIN_DELAY_ENEMY_REINFORCEMENTS enemy reinforcement will arrive minimum this number of turns after they are called, if 0 then is disabled.
  RND_DELAY_ENEMY_REINFORCEMENTS additional random delay added to minimum when reinforcements will arrive after they are called.
  MIN_ENTER_ENEMY_REINFORCEMENTS minimum enemy units which will enter after above delay is over.
  RND_ENTER_ENEMY_REINFORCEMENTS additional random enemy units to appear after passing delay.
  MIN_DELAY_MILITIA_REINFORCEMENTS enemy reinforcement will arrive minimum this number of turns after they are called, if 0 then is disabled.
  RND_DELAY_MILITIA_REINFORCEMENTS additional random delay added to minimum when reinforcements will arrive after they are called.
  MIN_ENTER_MILITIA_REINFORCEMENTS minimum enemy units which will enter after above delay is over.
  RND_ENTER_MILITIA_REINFORCEMENTS additional random enemy units to appear after passing delay.
- After first delay ends any other reinforcement appeared more frequently or if already arrive (but no free slot), they will pop up soon after slot is free.
- Add option NO_REMOVE_RANDOM_SECTOR_ITEMS under "Strategic Gameplay Settings" to prevent permanent random removal of your sector items.
- Add missing function DisplaySectorItemsInfo.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6386 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-10 20:49:49 +00:00
Flugente 3bc5ff75cc significantly cleaned up includes (by IoP)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6056 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-05-02 22:42:08 +00:00
Wanne 4456539663 - MP: Put the interrupt fix code in a define "INTERRUPT_MP_DEADLOCK_FIX
o It seems the fix does not work 100% and if the fix code is enabled the ALT + E feature does not work correctly (for now, disabled the fix)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6036 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-04-29 19:45:32 +00:00
Flugente 9ea7ebf393 New Feature: Multi-turn actions allow mercs to perform actions intended on a specific gridno over multiple turns. Currently demonstrated on the adding/removing/filling of sandbags.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5777 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-01-06 03:51:09 +00:00
Flugente f6ae18533f - Optimized a few code bits
- Enemy ranks has now size 20 instead of 500
- Fix: losing your disguise makes you lose your disguise again

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5687 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-11-15 00:03:39 +00:00
Flugente 51342b0669 - Fix: fully repairing a gun did not always clean it
- Fix: need to sleep modifiers from food were applied wrong
- Fix: under certain circumstances, player mercs won an AI interrupt, leading a deadlock or - potentially - AI-controlled player mercs

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5686 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-11-14 01:23:13 +00:00
Wanne b1596f0c63 - Removed the "USE_HIGHSPEED_GAMELOOP_TIMER" define. Now highspeed timer and new way of dequeuing events are always enabled when building an executable
o This makes the code more easy to maintain
o Highspeed timer seems to run fine (after months of tests)


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5643 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-10-25 19:00:12 +00:00
Wanne 02085a8422 - MP Bugfix: Fixed the nasty interrupt bug (endless clock), when playing in COOP and the pure client got interrupted by the enemy AI (by haydent)
o As a workaround the server had to press ALT + E to give the turn back to the client. Now this workaround should not be needed (hopefully ) :)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5623 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-10-11 18:20:21 +00:00