Commit Graph

  • e5f8518674 Red AI: - set default bAimShotLocation when checking if shot is possible - remove second CheckIfShotPossible() call - only use reloading before suppression fire if weapon is autofire capable and can swap clips Sevenfm 2020-09-28 07:32:09 +00:00
  • 8c8115e3f2 Red AI: - reload before suppression fire less often in dangerous situation, also check AP_MINIMUM so we don't reload when really low on APs - use CanNPCAttack() check only for sniper and suppression fire as only these actions need usable gun - when trying to step back to deploy mortar, check if we can reach the spot and have enough APs Sevenfm 2020-09-28 05:05:52 +00:00
  • 6194bbdbd8 Hopefully improved r8658: - check weapon magazine size and chance to say phrase when using gun - always reset fSayAmmoQuotePending in InternalReduceAttackBusyCount() Sevenfm 2020-09-28 04:41:15 +00:00
  • 144cdc0131 FindAmmoToReload: added assert messages to indicate that searching attached weapon failed. DecideAction: initialize bWeaponMode = WM_NORMAL to prevent FindAmmoToReload from crashing. Sevenfm 2020-08-31 16:35:56 +00:00
  • 4344c2caf8 Suppression: - disabled ubAdjacentSoldierCnt check as it doesn't work correctly - improved adjacent tile check to avoid out of bounds values Sevenfm 2020-08-20 04:24:44 +00:00
  • f5162b31d2 Fixed minor error in previous commit. Sevenfm 2020-08-18 08:28:25 +00:00
  • fa557a0dea New option AI_SHOOT_UNSEEN (disabled by default): allow AI to shoot at recently seen/heard enemies (targets that nobody from soldier's team sees currently). CalcBestShot: - improved hit rate calculation, take into account possible options INCREASE_AIMING_COSTS, FIRST_AIM_READY_COST_DIVISOR - minor code improvements New AI function LOS_Raised checks LOS with forced raised gun status, to get max view distance with scope Sevenfm 2020-08-18 08:23:39 +00:00
  • b49de1de60 Removes the noexcept keywords and fixes the jenkins build that's in here https://jenkins.maeyanie.com/job/JA2%20Build/ (by Asdow) Sevenfm 2020-08-16 11:03:42 +00:00
  • 95a4bde357 CalcBestThrow: - improved AI code to avoid hitting friends with grenades - correctly set usGrenade for mortar attacks Sevenfm 2020-08-16 04:20:31 +00:00
  • 43e0f70a87 A patch to fix one blitter function for when LOBOT is in use and a merc is prone. (by Asdow) Sevenfm 2020-08-15 16:46:04 +00:00
  • 6e87488da6 Reworked the DrawMap function. Flattens the large switch in it, removes the need for a few if checks that were done in every iteration of the old switch case loop and also shades all the map sectors using only one call to Lock- and UnlockVideoSurface instead of continuously locking and unlocking the surfaces when shading every single map element. (by Asdow) Sevenfm 2020-08-15 12:55:33 +00:00
  • 5eaec6881e Added a nullpointer check to a DDraw call, gets rid of one FIXME. (by Asdow) Sevenfm 2020-08-15 12:40:37 +00:00
  • c7d1acff01 fix: climbing related AI deadlocks (by anv) Sevenfm 2020-08-13 04:54:23 +00:00
  • 7111f40e54 Fixed a few very minor memory leaks. (by Asdow) Sevenfm 2020-08-13 02:33:39 +00:00
  • 2cdf1b2f0a Changed the way the STI file for CTH indicator is loaded to prevent the game from constantly loading and unloading the graphics file from the disk every time the function gets called. Now it's only done once per the lifetime of the game. (by Asdow) Sevenfm 2020-08-12 11:54:12 +00:00
  • ecf4e42fac Added static keyword to three vectors in CalculateCoverFromEnemies and resizing them to 0 at the end of the function so we're not constantly creating and destroying them at every call of DisplayCover function. Speeds it up a little bit. (by Asdow) Sevenfm 2020-08-09 14:01:32 +00:00
  • 5903abee09 Various AI improvements. Sevenfm 2020-08-07 12:12:31 +00:00
  • 93c41f2f97 AI suppression fire improvements. Sevenfm 2020-08-06 07:53:12 +00:00
  • e9107eab34 CalcChanceHTH: - slightly lowered base chance - reduce chance if defender is blind - reduce chance if attacker is blind - bonus for boxers for attacking from the back Sevenfm 2020-08-02 16:55:46 +00:00
  • e959d6893b Added new soldier flags: SOLDIER_BACK_ATTACK, SOLDIER_SNEAK_ATTACK (work for punch and stab attacks only). ClosestKnownOpponent() now can return ID of closest opponent. CalcCoverValue: improved code to avoid friendly fire. EVENT_SoldierBeginPunchAttack: use supplied gridno as sTargetGridNo may not be set yet Sevenfm 2020-08-02 16:35:10 +00:00
  • 1a31b21ea4 Fix: Re-enabled the condition check for mercs to enter tactical screen from map screen. Someone removed it, which made it possible to enter tactical with no mercs in the sector. silversurfer 2020-08-01 15:22:26 +00:00
  • 5b71be4045 CalcCoverValue: improved friendly fire check. Sevenfm 2020-07-31 12:02:45 +00:00
  • 6b706f2747 Increased max possible soldiers stored for friendly fire check to 256. Friendly fire chance code also checks for soldiers of the same side and optionally neutral civilians. CalcCoverValue: check friendly fire chance for each position, penalize position if friendly fire chance is high (needs AI_BETTER_COVER = TRUE) Sevenfm 2020-07-31 10:26:07 +00:00
  • 8e4961f021 Fix: various compile warnings Flugente 2020-07-24 19:27:34 +00:00
  • 5036772e1b - Fix: outdated text - Fix: animation loops until new order given Flugente 2020-07-24 19:25:47 +00:00
  • 0c4997f6ec Improved feature: structures can be dragged. Which ones is defined in a new xml. Flugente 2020-07-23 22:11:23 +00:00
  • c8737017ff Fix: nullpointer access Flugente 2020-07-22 21:30:39 +00:00
  • 7931497b9c Fix: - when USE_XML_SQUADNAMES was TRUE, the squad box was shifted upwards over the column headers, causing clipping issues - when READ_PROFILE_DATA_FROM_XML was TRUE, the game would still read profile data from prof.dat, if the old inventory system was used silversurfer 2020-07-17 11:22:29 +00:00
  • ce61a0b85b Fix: if no squad name is provided in xml, fall back on hardcoded name Flugente 2020-07-15 21:23:53 +00:00
  • e14444f14a Multiplayer: Disabled rooftop climbing, because its not syncing correctly between the clients Wanne 2020-07-13 17:43:36 +00:00
  • 93db0bb728 - Fix: assignment not displayed consistently in personnel page - Fix: bizarre function Flugente 2020-07-12 16:48:32 +00:00
  • 0165ba5bed Print out details of savegame loading process to easier identify bottlenecks Flugente 2020-07-10 16:51:08 +00:00
  • 39d79a0bb4 Fix: dragging soldiers is frequently cancelled Flugente 2020-07-09 20:46:41 +00:00
  • 1e66fe2ba7 Multiplayer: - Disabled fragments, because this can crash the game when stepping on a mine, ... - Enabled rooftop climbing Wanne 2020-07-09 09:32:49 +00:00
  • 9bc4b2bfb6 Translated a few German Texts Wanne 2020-07-08 22:11:29 +00:00
  • 3e41299596 Accept sounds for dragging a body in other formats than .ogg Flugente 2020-07-08 22:02:55 +00:00
  • aa0d52f790 Translated a few German texts Moved // TODO.Translate comments Fixed missing \n in text Wanne 2020-07-08 19:30:44 +00:00
  • dc23302696 Fixed compilation error when trying to compile JA2UB version Wanne 2020-07-08 18:46:45 +00:00
  • 5f54d43760 Fixed compilation error (sqrt) when compiling in Visual Studio 2010 Wanne 2020-07-08 18:28:31 +00:00
  • 1e101b2065 Use macro where appropriate for easier maintenance Flugente 2020-07-07 19:47:52 +00:00
  • 6de9deae63 Fix: mercs staffing a facility for global propaganda cause mine income to drop to 0% Flugente 2020-07-06 22:36:56 +00:00
  • 04fda674e5 Fix: radio operator in a city can give movement commands to any militia in a non-city sector Flugente 2020-07-06 21:25:45 +00:00
  • 3864aca117 Display item names in merchant inventory (by bfant) Flugente 2020-07-05 12:48:12 +00:00
  • c8627c7234 - Fix: wrong face displayed on insurance website - Chg: no insurance payout on suspicious deaths (no enemy presence during merc death, or merc died from friendly fire) Flugente 2020-07-05 12:03:44 +00:00
  • 7215d004fc Fix: unnecessary call for intel-based arms dealer inventory is called very often if the lua function is empty Flugente 2020-07-04 20:07:53 +00:00
  • 974526cba0 Fix: when failing to apply a gasmask to another soldier, the message still states success Flugente 2020-07-04 20:05:39 +00:00
  • ce06c37827 Added safety check Flugente 2020-07-04 18:52:34 +00:00
  • 76302328c2 Don't check whether an explosion damaging a room pisses of civilians if there is no room to begin with Flugente 2020-07-04 18:51:58 +00:00
  • 8c2c0dd71d Only display IMP gear cost if costs exceed the free amount (IMP_PROFILE_COST), mention the free amount Flugente 2020-07-04 17:30:46 +00:00
  • ad59900b3d Fix: individual militia in impassable sectors cannot be dismissed via website Flugente 2020-07-04 14:47:40 +00:00
  • 0544227958 Fix: militia can retreat to impassable sectors in autoresolve Flugente 2020-07-04 14:46:19 +00:00
  • af04fe4b53 Fix: killing Doreen after having already convinced her to leave peacefully does not fully remove the loyalty gain for the peaceful solution, despite that being intended Flugente 2020-07-03 23:18:15 +00:00
  • 000de06890 Fix: incorrect travel time calculation outside of pathing Flugente 2020-07-03 20:40:22 +00:00
  • 00313a526b Minor code improvements Flugente 2020-07-02 22:11:11 +00:00
  • de24b4df88 Fix: noticable lag on slow machines or while debugging when plotting a path in strategic view Flugente 2020-07-02 21:58:45 +00:00
  • 9f167f16c6 Fix: if DYNAMIC_IMP_PROFILE_COST is TRUE, the IMP cost is too high(by sun_alf) Flugente 2020-06-30 20:23:25 +00:00
  • 8119662904 New feature: the refilling of the queen's army resevere now requires her to train recruits, which the player can disrupt to some degree (by sun_alf) Flugente 2020-06-29 20:12:53 +00:00
  • 308631ee25 - There can now be effectively unlimited battle sounds for NPCs. - Activated some NPC voices that never played. Flugente 2020-06-26 20:44:59 +00:00
  • 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 Flugente 2020-06-25 22:42:44 +00:00
  • 4e86046d0c Store 32 instead of 31 disabilities Flugente 2020-06-20 16:14:46 +00:00
  • d33bc9123c Mercs can now have multiple disabilities at the same time. Flugente 2020-06-20 15:47:43 +00:00
  • 7899cc1f1e Fix: disabling cover display left coloured remnants outside the screen (by Asdow) Flugente 2020-06-18 18:49:37 +00:00
  • dd9f2c28e8 Minor code cleanup Flugente 2020-06-17 22:27:20 +00:00
  • f1bd0f8e8e Fix: crash if player offer area exceeds 255 fields (possible on high resolutions) Flugente 2020-06-17 22:24:52 +00:00
  • 01d8bbf408 Fix: illegal array access if resolution exceeds monitor resolution Flugente 2020-06-17 22:22:26 +00:00
  • 3b3abc2bc6 We can play external dialogue lines for NPC merchants via the lua function HandleNPCMerchantQuote(...) Flugente 2020-06-17 20:21:39 +00:00
  • f0c6511ca4 Added general modifier to grenade throw AP cost Flugente 2020-06-15 23:12:48 +00:00
  • 97fa0c8e90 Added interface functions fo lua Flugente 2020-06-11 18:33:20 +00:00
  • a48bd9a8a0 Fix: previous fix excluded non-RPCs from dialogue replacement Flugente 2020-06-02 18:37:18 +00:00
  • d5d4db6066 Fix: do not call lua dialogue replacement function for RPCs Flugente 2020-06-02 17:27:20 +00:00
  • 948ad8caf1 Fix: crash after heli landing in UB (by Asdow) Fix: unnecessary town initialization in UB (by Asdow) Flugente 2020-06-01 20:53:22 +00:00
  • f0c8db784a New feature: exploration assignment indicates items on the map Flugente 2020-06-01 20:46:45 +00:00
  • b25a4be4e7 Fix: compiler warnings Flugente 2020-05-30 14:26:16 +00:00
  • e932393eae minor code cleanup (by sun_alf) Flugente 2020-05-30 13:34:57 +00:00
  • 51e2c6b293 Minor code cleanup (by Asdow and sun_alf) Flugente 2020-05-30 13:24:33 +00:00
  • c5022fa1e5 New feature: turncoats can be created from enemies and ordered to switch sides Flugente 2020-05-30 00:13:42 +00:00
  • 0f13599775 Fix: jeeps were not accounted for Flugente 2020-05-29 17:41:29 +00:00
  • b1cfc516af Fix: unnecessary transaction Flugente 2020-05-29 17:40:43 +00:00
  • 0f3dd1035a Fix: AllowReinforcementsOmerta was not used Flugente 2020-05-25 20:31:10 +00:00
  • fac4927bc6 Bigmaps lockbusting fix: removed incorrect type cast (as suggested by Franimus). Sevenfm 2020-05-24 06:17:18 +00:00
  • 0f44c83b71 Fix: bad colours in Militia Overview Flugente 2020-05-19 22:35:32 +00:00
  • 84afe6b160 GetSoldierAboveGuyPositions: - use max value so that animation and text do not overlap - lowered Y offset for crouched stance Sevenfm 2020-05-18 06:04:34 +00:00
  • ea1892c788 New feature: factories allows facilities to create items Flugente 2020-05-17 20:52:27 +00:00
  • 4dc40912e4 Fix: Requirements opinionevents OPINIONEVENT_CIVKILLER and OPINIONEVENT_CIV_ATTACKER were different, leading to situations were mercs complained about harming civilians, but not about killling them Flugente 2020-05-17 14:20:17 +00:00
  • 952408b961 Improvements for BaseTable: - Separator colour can be set - Fixed column length calculation - checkboxes are now possible Flugente 2020-05-17 14:13:57 +00:00
  • 04a66f8b7c New experimental NCTH options: LIMIT_MAX_DEVIATION, LIMIT_GROUND_SHOTS. Sevenfm 2020-05-14 15:53:31 +00:00
  • d9c8a1c398 New tag <shotAnimation> in AmmoTypes.xml allows defining custom shot animation. Sevenfm 2020-05-13 06:31:11 +00:00
  • 42a85e96ba Increased MAXATTACHMENTS to 60000 for Aimnas to work. Sevenfm 2020-05-05 21:47:25 +00:00
  • 03d7fd5266 DrawItemUIBarEx: use GetGunOverheatDisplayPercentage so that OVERHEATING_DISPLAY_JAMPERCENTAGE option can have effect. Minor code improvements. Sevenfm 2020-05-05 16:34:15 +00:00
  • 7f8fc44a7d Improved code to update scope mode when changing stance. ChangeScopeMode: use NOWHERE instead of 0 as incorrect target gridno. Sevenfm 2020-04-30 00:48:52 +00:00
  • b729583bcb Switch from alt weapon holding when changing stance in realtime. Sevenfm 2020-04-29 06:15:36 +00:00
  • 0e9e13e838 fix: travel time wasn't correctly calculated for survivalist and background speed bonuses enhancement: new calculations for travel speed bonuses of survivalist and backgrounds silversurfer 2020-04-27 20:34:51 +00:00
  • 22cb49668f Added dialogue event for planting bombs/mines (ADE_BOMB_HAS_BEEN_PLANTED) Flugente 2020-04-26 20:02:10 +00:00
  • bc2a3dd0fc UIHandleNewBadMerc: create soldier at interface level. RemoveBlood: correctly remove blood on specified level. UpdateBloodGraphics: update rendering. Sevenfm 2020-04-26 05:37:05 +00:00
  • 9995b70ee9 CalcBestThrow: - for mortars and grenade launchers, first try to find non smoke grenade/shell - don't use mortar in building or underground - don't use grenade launcher underground - blinded soldier cannot use mortar/grenade launcher - when calculating safety margin, correctly use BuddyItem defined for single shot RPG - limit ubSafetyMargin to TACTICAL_RANGE / 2 in case radius set too high in XML - use flares only at night - use ValidOpponent() check to determine opponent - use new knowledge functions - allow attacking recently seen/heard opponents with mortar/grenade launcher - improved code to spare grenade, don't spare: non lethal grenades, if some friends killed, when under attack, STATIONART/SNIPER, when on the roof, when there are friends under attack nearby - increase possible distance from opponent when opponent in a building or when using gas grenade - improved check for gas/smoke when using gas/smoke grenade - don't use smoke grenade if there's already smoke nearby (it can spread to this tile later) - improved code for AP to attack calculation - when attacking enemy in a building with mortar, allow shooting on the roof above the enemy, hoping that roof will collapse - limit RPG use, unless can hit several enemies, shooting at tank or opponent is in a room - soldiers should use RPGs against tanks/jeeps more often - modify smoke attack value depending on range (less effective if too far from opponent) Sevenfm 2020-04-23 02:54:36 +00:00
  • 32b6ffe70f Improved watched location AI code: - check that we can see enemy if we raise weapon when considering using noise spot as watched location - prefer hiding first when in dangerous place if hiding is possible Sevenfm 2020-04-20 22:14:45 +00:00
  • 3fe13b9161 Increment watched location when soldier hears enemy and can possibly see noise location. Sevenfm 2020-04-20 20:10:30 +00:00
  • 2147de571e Restored AI decision delay when recruiting new troops. Sevenfm 2020-04-20 18:24:56 +00:00
  • 8051e9b064 ASD: don't change reinforcement pool when unlimited reinforcements enabled. Interrogate prisoner: don't change reinforcement pool when unlimited reinforcements enabled. EvaluateQueenSituation: - allow recruiting when pool size drops below iQueenPoolIncrementPerDifficultyLevel, this should result in more stable strategic AI behavior - with default values, recruiting can result in up to 8 days of doing nothing, I think that skipping once cycle of decisions should be enough Sevenfm 2020-04-20 16:43:14 +00:00
  • 2f576684ac VR r2348 fix - loading .jpc.7z with a single image would cause exception as file was not considered open (by anv) Sevenfm 2020-04-20 00:20:37 +00:00