Commit Graph
3190 Commits
Author SHA1 Message Date
Sevenfm 73cbc27ea4 Play sound when dragging something (Sounds\Misc\DragBody1.ogg .. DragBodyN.ogg).
Mercs always make movement noise when dragging.
Stop dragging if another merc starts dragging this merc/body.
Stop dragging if dragged merc gets up from collapsed state.
Stop dragging when changing stance/cowering under suppression.
Fixed grenade pin sound for signal smoke.
CalcBestShot: if new opponent is dying and best opponent is ok, ignore new opponent.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8759 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-20 12:28:55 +00:00
Sevenfm 4fb6369368 AI pathing: avoid deep water if not in deep water already and not SEEKENEMY (allow max 2 tiles of deep water for other soldiers).
CONSIDERED_NEUTRAL: removed dying check as it may cause problems with AI.
Improved code to avoid moving into gas/deep water/light/artillery danger zone.
ClosestReachableDisturbance: 
- skip dying opponent if found not dying
- when in deep water, skip opponents in deep water
ClosestKnownOpponent: skip dying opponent if found not dying.
RedSmokeDanger: consider deep water as safe from artillery strike.
Allow deep water flanking for soldiers of ENEMY_TEAM with SEEKENEMY orders and CUNNINGSOLO attitude or athletics trait.
CalcBestShot:
- dying, cowering or unconscious soldiers have very low priority
- added safety checks
- if best opponent is dying and new opponent is ok, use new opponent
DecideAction: improved deep water checks.
Red, Black AI: when SEEKENEMY soldier is in deep water, move to closest opponent on the ground.
FindNearestUngassedLand: 
- increased max search distance to 35
- added speed optimization
- removed max AP budget
FindNearbyDarkerSpot:
- increased max search range to 25
- added speed optimization
- removed max AP budget
FindFlankingSpot: added condition to allow deep water flanking


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8758 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-17 19:20:28 +00:00
Sevenfm 019eccb5b9 Restored Flugente's frozen soldiers which were disabled by accident (by Asdow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8757 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-16 18:45:43 +00:00
Sevenfm 0330e6c1a8 Improved code to avoid dangerous locations.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8756 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-16 14:08:47 +00:00
Sevenfm 8e9f9cb8a1 LOBOT code (by Asdow, original code by Bio).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8755 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-15 16:19:35 +00:00
Sevenfm 25701acf7b Added LegalNPCDestination check to AI location search routines.
SearchForItems: avoid locations with bombs or red smoke danger.
FindFlankingSpot: removed check for edge of the map.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8754 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-15 13:38:41 +00:00
Sevenfm fe838ad7d9 Enemy soldiers will try to avoid being hit by artillery strike.
FindBestNearbyCover:
- penalty to locations in red smoke danger zone
- avoid moving into red smoke danger zone if not in red smoke danger already
FindNearestUngassedLand: 
- improved code
- try not to move closer to known enemies.
- calculate path with correct movement mode
FindNearbyDarkerSpot: 
- improved code
- calculate path with correct movement mode
FindFlankingSpot:
- avoid locations near bombs
- avoid moving into red smoke danger zone

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8753 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-15 12:54:59 +00:00
Sevenfm a6271e2e47 ExpAffect: don't spread fire on water.
StructureHit: check water level.
Only normal, stun and flashbang explosives create water explosion.
Increase max force when throwing items into water (to compensate for no bouncing).
Increased splash volume from LOWVOLUME to MIDVOLUME.
InternalIgniteExplosion: no fragments in water.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8752 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-13 15:57:10 +00:00
Sevenfm b57e4eba00 Play splash sound when thrown item hits water.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8751 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-12 19:11:50 +00:00
Sevenfm 631250227c Tweaked animation speeds:
- faster sidestepping
- faster radio animation
- faster ninja kick and focused punches and kicks

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8750 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-12 17:47:19 +00:00
Sevenfm f51442d03d Only check for fExplodeOnImpact in OBJECT_DETONATE_ON_IMPACT if item has IC_EXPLOSV class. This fixes situation when random items are thrown incorrectly.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8749 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-12 17:40:05 +00:00
Sevenfm af988b958f New option ADD_LIGHT_AFTER_EXPLOSION (TRUE) - create light effect for fire and signal smoke effects.
NewSmokeEffect() now accepts new parameters:
- ubDuration sets custom effect duration
- ubRadius sets custom effect radius
- ubGeneration allows creating smoke effect with defined generation

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8748 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-10 14:57:54 +00:00
Sevenfm 6005382920 New option NEW_RANDOM (default TRUE) enables new code for random number generation.
Fixed PreRandom(1) bug in AddPlacementToWorld.
AddPossiblePendingEnemiesToBattle: use Random(4) instead of GetRndNum(3) for random insertion code.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8747 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-09 18:35:04 +00:00
Sevenfm 90db9fa346 Moved fire.ogg to Data\Ambient
Moved SSA folder to Data\Ambient

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8746 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-09 07:26:19 +00:00
Sevenfm 7e0606932f New options to control Sector Steady Ambients:
ENABLE_SSA (default FALSE)
VOLUME_SSA (default 50)
DEBUG_SSA (default FALSE)

Increased number of sound channels to 64.
SoundPlay(): show more information when failed to play sound.
PlayVoiceTaunt(): limit max number of voices to 99.
vfs::String::as_utf16(): show original string if failed to convert.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8745 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-08 19:35:10 +00:00
Sevenfm 39c773e0c6 Voice taunts update: changed civgroup name format from %02d to %d, to allow using civgroups with 3 digit numbers.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8744 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-07 10:43:27 +00:00
Sevenfm 74443ca8a9 New option TAUNT_VOICE (FALSE by default): if true, will play sound file instead of showing text.
New option TAUNT_VOICE_SHOW_INFO (FALSE by default): if true, will show debug info when playing voice taunt.
Restored JA2TESTVERSION for SpreadPatternLog.txt
Allow taunts from militia when using voice taunts.
Don't show noise text messages from militia (if on our side).
Fixed incorrect OKLIFE check in CheckStatusNearbyFriendlies().

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8743 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-07 10:13:16 +00:00
Sevenfm e4d30987bf Fix possible bug when executing AI_ACTION_STOP_COWERING.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8742 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-06 17:18:49 +00:00
Sevenfm 1455409057 AI:
- before deciding anything, stop cowering animation
- before deciding anything, stop giving aid animation
- before deciding to raise weapon, check if weapon can be raised
- simplified scope check
- removed duplicate code in Red AI

Added missing actions to gzActionStr[].
Fixed OKLIFE checks.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8740 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-25 19:02:53 +00:00
Sevenfm 17fee15f2b GetIdOfMineForSector: use correct min/max values for bSectorZ.
Minor code improvements.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8739 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-24 20:35:14 +00:00
Sevenfm 0048e75c80 Added new options:
- ENABLE_TA enables fire ambient sound
- VOLUME_TA controls fire ambient sound volume

Fire ambient sound is played in a loop when there is active fire effect on screen.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8738 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-24 10:06:06 +00:00
Sevenfm 352a344308 Added new option AI_PATH_TWEAKS which controls various experimental path tweaks for AI: avoid gas, deep water, light at night.
Added experimental path tweak: AI tanks prefer moving in straight directions to avoid sliding effect.
Set default value for options AI_EXTRA_SUPPRESSION, AI_NEW_MORALE, AI_BETTER_COVER, AI_MOVEMENT_MODE to TRUE.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8737 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-24 09:14:38 +00:00
Sevenfm 77f5a7770d l_SetMercProfiles: allow serting zero values for sSectorX and sSectorY.
Added more restriction for using grenades in CalcBestThrow:
- blinded soldier can only attack recently seen/heard opponents
- limit explosives type when attacking zombies
- limit smoke grenade use
- limit explosives type when attacking robots, vehicles and tanks
- don't use grenades against dying enemies
- limit explosives type when attacking collapsed enemies
- don't use flare if soldier is in light
- don't use flares against opponents on roof

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8736 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-20 18:01:18 +00:00
Sevenfm 26a1b0aa5a New option SHOW_BACKPACK_OWNER (TRUE by default): show backpack owner's name on the ground and in taking items interface.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8735 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-19 19:38:30 +00:00
Sevenfm c023f21694 New option AI_MOVEMENT_MODE enables AI movement mode tweaks.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8734 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-18 09:25:25 +00:00
Sevenfm 160829eb53 Added weapon raising sound.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8733 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-18 06:49:52 +00:00
Sevenfm 3ef41189b2 New option BACKGROUND_TOOLTIP_DETAILS (TRUE by default) can be used to enable or disable showing background details in laptop.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8732 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-16 12:32:21 +00:00
Sevenfm cbc1b8c5e3 New background property: <animal_friend> will refuse to attack animals, unless attacked by that animal.
New background property: <civgroup_loyal> will refuse to attack neutral members of the same civilian group.
Fixed array bound in GetTileSetIndexVector().

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8731 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-15 20:27:00 +00:00
Sevenfm 9c563c9c8a Improved AI path tweaks.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8730 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-12 09:17:51 +00:00
Sevenfm 168f9b9f6d Improved AI path tweaks.
FindBestNearbyCover: avoid moving into light if not in light already and not under attack.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8729 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-12 09:07:31 +00:00
Sevenfm f54a91718b Play grenade pin sound (supports custom grenade pin sound with <sSound> tag in Weapons.xml)
Help AI associate noise with enemy presence: 
- melee attack noise type changed to NOISE_BULLET_IMPACT
- HTH attack noise type changed to NOISE_BULLET_IMPACT
- grenade pin noise type changed to NOISE_GRENADE_IMPACT
- launcher attack noise type changed to NOISE_GUNFIRE

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8728 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-11 17:15:17 +00:00
Sevenfm 6386338422 Lua code improvements.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8727 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-09 12:19:56 +00:00
Sevenfm e35c52821f Improved Lua code:
- default values
- array bounds
- min/max values
- correct variable types

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8726 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-09 12:11:18 +00:00
Sevenfm 9e6412a937 Lua: initialize return values to prevent returning garbage if soldier is not found.
Improved r8104 fix to allow Fatima quest (civilians and NPCs with profile can go off screen).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8725 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-08 17:17:59 +00:00
Sevenfm a802c3db63 Added more nationalities.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8724 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-07 16:37:54 +00:00
Sevenfm f10590587a New option AUTO_HIDE_PB (TRUE) enables auto hiding of the progress bar when mouse cursor is on the top map row.
AI soldiers will now avoid staying at top map row.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8723 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-05 08:20:42 +00:00
Sevenfm 58308434f7 FindNearbyDarkerSpot should return INT32 value to prevent bugs when used with big maps (by bfant).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8722 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-01 10:14:37 +00:00
Sevenfm 470bae3c20 New option AI_TACTICAL_RETREAT (false by default) controls tactical enemy retreat from battle.
Moved options AI_YELLOW_FLANKING, AI_EXTRA_SUPPRESSION, AI_NEW_MORALE and AI_BETTER_COVER to [Tactical AI Settings]
AI_NEW_MORALE:
- zombies always have high morale
- always low morale when soldier is blinded
- neutrals always have low morale even if they have guns, so they don't run into the heat of battle
- prevent hopeless morale when not under attack
UpdateAniTiles: also check EXPLOSV_CREATUREGAS (from merc05's fixes)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8721 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-12-30 08:45:08 +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
Sevenfm 3efe899526 HandleItemPointerClick(): use correct target level.
CalcPreRecoilOffset(), CalcRecoilOffset(): fix counterforce calculation for weapon resting feature.
SOLDIERTYPE::GetAPBonus(): use THROUGH_STRATEGIC_MOVE instead of soldier's facing direction to determine sector type.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8719 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-12-22 05:57:52 +00:00
Sevenfm 0b2e16ac93 Improved r8524 fix to work with 1280x720 resolution.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8718 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-12-21 13:05:46 +00:00
Sevenfm 0a6277c6b1 InternalDropBlood: use correct data to determine blood type.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8717 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-12-07 00:08:10 +00:00
Sevenfm 0e8c086a9a NCTH: improved laser bonus code.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8716 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-12-05 08:48:26 +00:00
Sevenfm b367fad899 Switch scope mode to default for suppressed soldier if he uses alt weapon holding.
Improved AI path tweaks.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8715 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-12-04 13:27:24 +00:00
Sevenfm 92b6f40a17 Improved AI path tweaks.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8714 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-12-04 12:05:11 +00:00
Sevenfm 219a1c76e2 Experimental path AI tweaks:
- avoid light at night
- avoid corpses
- avoid deep water
- avoid gas/fire

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8713 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-12-03 21:52:36 +00:00
Flugente c92290155f Character lines can be replaced before playing via HandleReplaceQuote(...) in Overhead.lua.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8712 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-12-02 22:02:04 +00:00
Flugente 8ace6a2954 Added dialogue events for using a lockbomb (ADE_LOCKBOMB) and sniper warning (ADE_SNIPERWARNING)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8711 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-12-01 20:34:46 +00:00
Flugente 61c6972efa Complaints about sexual harassment now use separate voice lines
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8710 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-11-28 22:24:49 +00:00
Flugente c9025796aa improved comments
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8709 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-11-27 23:31:16 +00:00