Commit Graph
306 Commits
Author SHA1 Message Date
Flugente 8e4961f021 Fix: various compile warnings
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8872 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-07-24 19:27:34 +00:00
Flugente 00313a526b Minor code improvements
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8833 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-07-02 22:11:11 +00:00
Flugente 098dc8e280 Disease update:
- <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
2020-06-25 22:42:44 +00:00
Sevenfm 3eb699c45f Walkman: bonus 20% to morale when in head slot.
Update soldier morale every turn.
Update soldier morale when changing inventory.
Improved code for 'l' hotkey.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8783 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-10 21:20:05 +00:00
Sevenfm 4e34605f86 Red, Black AI: try to use sidearm if not enough AP to shoot with main weapon.
Black AI: improved check to avoid friendly fire.
FindAIUsableObjClass: by default search for weapon with longest range, if fSidearm = TRUE search for fastest weapon.
AICalcChanceToHitGun: if AI_EXTRA_SUPPRESSION = TRUE, always return min 1% for AI.
RangeChangeDesire:
- civilians only want to run away
- added small bonus to range change desire if soldier has no gun or short range weapon
CalcBestShot, CheckIfShotPossible: always check if can shoot at target seen by another soldier.
CalcBestShot, CalcBestThrow, CalcBestStab: initialize attack data.
Removed obsolete code.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8782 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-08 21:24:56 +00:00
Sevenfm d02a4ddd7d Implemented some of the merc05's fixes (http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=24256):
- fix for stopping snitches from preventing misbehavior
- fix for stopping snitches reports
- improved code for refused handcuffing
- fixed item bug with items dropping from backpack after using transformation in turnbased mode
- improved code for dart ammotype effect
- removed assert in AddCharacterToAnySquad to prevent crash when selecting merc in vehicle and plotting travel route
- added EXPLOSV_CREATUREGAS effect in UpdateAniTiles()

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8720 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-12-22 06:22:23 +00:00
silversurfer 6a1fd17026 Fix: Items that were placed by function AutoPlaceObjectToWorld() had incorrect sGridNo so they could end up in inaccessible places.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8690 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-08-20 17:41:56 +00:00
Flugente 84d08a8821 A paramedic can use empty bloodbags (<emptybloodbag>-tag, item #1756) to create blood bags (<bloodbag>-tag, item #1757) from other mercs. These can then boost the health returned by surgery by ONTOP_PERCENT_SURGERY_HEAL_BLOODBAG percent.
Requires GameDir >= r2467.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8662 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-02-10 16:26:48 +00:00
Flugente 08ed5cf378 - New mergetype 15: works like mergetype 6 but lowers status of firstItemIndex by 10%
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8650 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-01-24 21:38:42 +00:00
silversurfer 384572098b - fixed incorrect rounding in several places in the code
- diagonal movement now uses the proper amount of AP and BP

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8634 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-11-03 16:11:21 +00:00
Flugente 2517351acc Dynamic ammo weighting (DYNAMIC_AMMO_WEIGHT in JA2_Options.ini) now also applies to food, drugs, canteens and camo kits.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8624 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-09-29 16:26:20 +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 150b05e0b5 Fix: sound for drinking water played twice
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8557 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-04-18 23:12:33 +00:00
TheBob 209f5f7c1b fixed AI freeze on creatures attacking crows
fixed some broken debug messages

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8508 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-11-20 23:43:16 +00:00
Flugente 6031257dcd New feature: mercs can drag people and corpses
Requires GameDir >= r2386.

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

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8474 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-09-17 22:16:30 +00:00
Flugente a8197d5db7 Fix: crash when attempting to create illegal item
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8460 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-08-26 21:18:02 +00:00
Flugente a7bb8b9fe9 If placing an item fails due to invalid item size, at least inform the player before crashing the game on purpose
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8436 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-07-31 17:46:50 +00:00
Flugente 57c9e16523 New feature: guns can be cannibalized via merge, increasing the status of the first gun while lowering that of the second gun.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=20659&goto=350386&#msg_350386

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8426 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-07-25 17:13:43 +00:00
TheBob 3c4da04532 Cleaned up attachment removal code
Fixed rare issue with squads and movement groups not being defined at game start.
Fixed wrong type declarations in header files

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8407 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-06-12 17:09:25 +00:00
TheBob b60a94afc5 Added: Ctrl+Shift+E now fill LBE items in sector with other items and places them in vehicles first.
Added: Right-Click on remove attachments button on sector inventory screen will not empty LBE items in sector
Changed: SLAY_STAYS_FOREVER disables Slay's hourly chance to leave when unattended
Added: SLAY_HOURLY_CHANCE_TO_LEAVE setting to Ja2_Options.ini
Fixed: a bunch of array index out of bounds bugs
Fixed: a bunch of typos in if contitions
Fixed: BuildListFile() function loading items from index 1 instead 0
Added translation: Polish text for some map inventory screen items
Added translation: English texts for new functionality for other language files
Cleaned up some old TODOs

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8404 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-05-19 13:40:34 +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
Flugente c2b3d1a5a0 Speed up inventory rendering by avoiding unnecessary function calls
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8394 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-03-11 15:35:39 +00:00
silversurfer 5a602f0b9c Fix: incorrect underground check for cave vision bonus and scouting
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8340 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-11-16 16:41:16 +00:00
Flugente 3c836ba191 Items in a slot granted by LBE with the flag LBE_EXPLOSIONPROOF (<ItemFlag> 2147483648) are protected from explosion damage (and cannot cause a chain reaction).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8335 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-10-24 20:15:35 +00:00
silversurfer 372adc37b8 repair and dirt system change:
Dirt is now part of gun status. The original dirt system has been removed. For details see:
http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=20198&goto=347370&#msg_347370


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8325 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-10-19 15:58:02 +00:00
Sevenfm e9a1f4b352 New feature: delayed grenade explosions:
- use transformation menu to change explosion mode
- only Normal/Stun/Flashbang type grenades can be delayed
- AI soldiers will avoid staying close to armed grenades\explosives
- use option DELAYED_GRENADE_EXPLOSION to make all hand\GL grenades work as delayed
- new value AP_GRENADE_MODE = 4 in APBPConstants.ini
- new item flag DELAYED_GRENADE_EXPLOSION

Other changes:
- fixed call to sqrt in DrawExplosionWarning() that prevented compiling in VS2010
- correctly update interface after transformations
- PATHAI: AI soldiers will skip gassed tiles if not in gas already
- InGas check: AI soldiers will avoid mustard gas even when wearing gas mask
- Yellow AI: added check to avoid gas/water/bomb using FindNearestUngassedLand
- gas/flare grenades will always explode instantly even when in bad state
- LegalNPCDestination: locations near armed bombs are not legal
- FindBestNearbyCover: avoid locations near armed bombs

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8324 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-10-18 12:39:06 +00:00
Flugente 5b6611bc61 Code change: When loading gun/looking for a default maazine for a gun while no mag with fitting magsize exists, instead take a magazine of same calibre and ammotype that has magsize bigger (but close to) the originally requested magsize.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8312 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-10-07 19:20:53 +00:00
silversurfer 73e3e1172c Fix: gGameCTHConstants.BASE_CROUCHING_STANCE was missing from handling calculations in NCTH
- removed gGameExternalOptions.fUseNewCTHCalculation as it is not needed anymore
- cleaned up function CalcNewChanceToHitGun

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8281 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-08-06 10:44:42 +00:00
Sevenfm fea2a0d12b Items.cpp: MAXATTACHMENTS limit
lighting.cpp: check return values

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8258 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-06-25 09:18:47 +00:00
silversurfer 90ff5d5626 Fix: AimLevels bonus was displayed for OCTH although it doesn't apply there
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8247 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-06-04 09:56:46 +00:00
Flugente 381acc74a4 If we manually disguise a merc, immediately test the disguise
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8215 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-05-16 10:31:47 +00:00
Flugente 284910e2d5 Changes to covert operations feature (by sevenfm): If the new skill setting COVERT_STRIPIFUNCOVERED is FALSE,
- we can only disguise successfully if we haven't been seen recently (last 3 turns)
- disabled automatic clothes stripping when uncovered
- redisguise automatically if spy haven't been seen by enemy recently and wears correct clothes

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8210 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-05-12 22:27:54 +00:00
silversurfer e43d1b3fb3 Fix: The Brass Knuckles tag didn't count as bare hand attacks anymore since revision 6465. I changed that back because Martial Arts trait includes brass knuckle items. Single attack AP display of such items in EDB was fixed as well.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8207 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-05-08 15:19:39 +00:00
Flugente d0dc6c3230 - Tweaked tunnel vision penalty calculation
- If both body items and weapon have tunnel vision penalties, use their maximum, not their sum

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8134 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-04-03 16:53:17 +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
Wanne 91eef3098c - Equip Milita Improvements: I've written code, which adds attachments to free positions on the gun militia chose to pick up (by navaroe)
- Bugfix: Reinforcements:  Parts of roadblocks were resurrected after reinforcements death (by navaroe)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7995 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-10-15 10:40:58 +00:00
Flugente 8fa2d4402c Rdio sets no longer need a battery.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7974 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-08-14 20:50:27 +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 6c9d75480f Added range modifier for throwing knives
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7885 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-06-01 21:02:07 +00:00
silversurfer ca68c2b620 Fix: EDB displayed wrong number of aim levels if OCTH system was used.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7864 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-05-14 19:51:52 +00:00
Flugente d163df4c13 - mercs only complain about others' diseases after an outbreak
- a radio set can function without batteries if the xml states batteries are not required
- changed 'friendly fire' dynamic dialogue to not only fit firearm-related incidents

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7861 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-05-14 15:28:45 +00:00
Flugente ad8b2525a9 Fix: crash during item transformation on attached items
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7855 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-05-10 13:10:37 +00:00
Flugente 1b8d898226 Disease protection items are no longer required to be worn in a faceslot. The point is that the player should acquire special gear, not inconvenience him to switch gear whenever a merc goes on assignment.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7852 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-05-08 19:08:54 +00:00
Flugente ad5f3e933c - Fix: Launchers launch things that aren't supposed to be launched, like attached scopes
- Fix: mercs complain about non-useable structure construction items, even though these don't care about the useability threshold

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7829 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-04-22 18:46:09 +00:00
silversurfer 8ca4f49d61 Fix: OBJECT_KNOWN_TO_BE_TRAPPED was never set on player owned bombs so even the person who armed the bomb didn't know what he did. From now on every trap that we create gets this flag set.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7811 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-04-11 15:49:11 +00:00
silversurfer 4ef5b58107 Enhancement for scope mode fix in r7792: It is now allowed to use any scope mode except scopes while dual wielding guns.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7804 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-04-01 09:56:47 +00:00
silversurfer 8ef0c1e353 Fix: It's not allowed to use scope modes other than iron sight and alternative weapon holding anymore when dual wielding guns.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7792 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-03-20 21:26:28 +00:00
silversurfer 6e55c159de Changed camo display - now only the highest value is displayed in the camo box instead of a sum of all different types of camo. This also fixes the problem that a laser could drown our camo value because of different types of penalties.
Also camo can no longer take a negative value.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7789 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-03-18 16:29:57 +00:00
silversurfer 4b5fc5bc3c Fix:
- large MOLLE pockets didn't display their volume in EDB
- attaching a filled MOLLE pocket didn't show its contents. Now the contents will be removed and put in the soldiers inventory or on the ground if there is no space.

Enhancement:
Detaching filled MOLLE pockets is possible again. The contents will be moved to soldier inventory (if pocket was on the soldier before) or to the ground (in case of sector inventory manipulation).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7788 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-03-17 18:15:58 +00:00
silversurfer 76689ab99d Enhancement: It is now possible to display attachments and contents of LBE at the same time when game option "Show LBE Content" is active.
http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=20659&goto=340063&#msg_340063

Fixes for MOLLE display and handling:
- MOLLE didn't display attached pockets and their contents when the item was in sector inventory
- MOLLE pockets could be detached although there were still items inside the pocket. This led to items in invalid pockets (MOLLE on soldier) or items vanishing completely (MOLLE in sector inventory). Now it is not possible anymore to detach filled MOLLE pockets. You will have to empty them first.
- MOLLE in a stack displayed the wrong contents as long as their index was not 0.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7783 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-03-15 12:50:30 +00:00