Commit Graph
94 Commits
Author SHA1 Message Date
Sevenfm 306eca7dfc New option NWSS enables New Weapon Sound System.
Increased SOUND_MAX_CHANNELS to 128 for NWSS to work correctly.
New tag in AmmoStrings.xml: <NWSSCaliber>
New tags in Weapons.xml: <ubNWSSCase>, <ubNWSSLast>, <szNWSSSound>
Fixed some warnings.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8780 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-05 23:58:07 +00:00
Sevenfm 5b1ea7e795 Hotkeys for quick transformations:
Shift+T - transform item in hand (improved code)
Shift+O - transform scope
Shift+L - transform flashlight
Shifr+Y - transform laser

Fixed some warnings.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8779 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-03 05:14:47 +00:00
Sevenfm 5784135c29 Improved code for alternate mouse commands (option ALTERNATE_MOUSE_COMMANDS).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8778 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-02 20:41:36 +00:00
Sevenfm c0f36bc6c2 Hotkeys:
- use SHIFT key to move in formation
- Ctrl+Alt+G: toggle formation
- G: toggle light effects

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8777 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-02 20:05:31 +00:00
Sevenfm 7810a35a96 [F] key should correctly show CTH for different types of attacks:
- gun
- launcher
- grenade
- thrown knife
- punch
- toss item

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8775 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-03-24 20:32:13 +00:00
Sevenfm 560219ac36 Fixed delayed mode for grenades.
Changing delayed mode for grenade launcher only possible with DELAYED_GRENADE_EXPLOSION = FALSE.
Minor code improvements and warning fixes.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8771 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-03-14 10:39:18 +00:00
Sevenfm 3e07b01a45 Removed old zombie AI code.
Improved AI path tweaks:
- tanks prefer moving in straight directions to avoid sliding effect
- combat jeeps prefer moving on roads (PAVED_ROAD, DIRT_ROAD)
- armed vehicles avoid moving into buildings (FLAT_FLOOR)
- increased value to avoid light and corpses for enemy soldiers

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8770 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-03-09 23:21:25 +00:00
Sevenfm a30d8c6833 Scale tactical ambients and sector steady ambients with general effects volume.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8769 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-03-09 20:29:50 +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
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
Sevenfm a09c0a8b33 Multiplayer LOBOT fix (by Asdow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8766 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-27 18:23:38 +00:00
Sevenfm a94a32aa97 Solution for Visual Studio 2019 (by Asdow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8765 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-27 18:19:27 +00:00
Sevenfm 8b53d273f9 New tags in CivGroupNames.xml: Side, CustomSide allow setting custom side for civilian group.
NewEye: fix possible bug.
InitShopKeeperSubTitledText: correctly initialize data.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8764 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-27 10:51:45 +00:00
Sevenfm 9d1ebb6eb9 Render performance fixes (by Asdow)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8763 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-24 19:35:34 +00:00
Sevenfm 4e4a1ff0c7 Disabled face icons for big faces.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8762 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-24 10:49:51 +00:00
Sevenfm 55f1c956cc Don't show face gear for big faces.
Don't show face icons for dead soldiers.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8761 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-24 10:33:05 +00:00
Sevenfm 32482f20f6 New option AI_DECISION_INFO enables extended logging for AI decisions.
Moved zombie AI into separate file ZombieDecideAction.cpp
New zombie AI:
- simplified code
- advancing using cover
- if zombie cannot reach any opponent, he tries to hide
- if zombie cannot reach opponent and cannot hide and he is under fire, he will retreat, seeking cover away from known opponents
- if zombie doesn't know enemy location, he will try to run to closest friend who knows enemy location
- new zombie AI has extended AI logging
More water splash sounds (Data\Sounds\Misc\Splash1.ogg .. SplashN.ogg).
CalcCoverValue: 
- allow moving into shallow water if it provides better position
- special calculations for zombies: zombie is very dangerous at close range
- if soldier has no gun, use different calculation based on distance instead of CTGT
FindBestNearbyCover: zombies only choose spots that provide sight cover.
Added functions for extended AI log.
ClosestReachableDisturbance:
- if soldier is zombie and he cannot climb, skip location
- zombies do not attack vehicles
- improved check to avoid choosing dying opponents
EstimatePathCostToLocation: return 0 if checking for zombie which cannot climb and path needs climbing.
RoamingRange: always max roaming range for zombies.
SightCoverAtSpot, ProneSightCoverAtSpot:
- improved max sight range calculation
- added option for unlimited sight range check
New AI functions:
- AIDirection
- AICheckIsSniper
- AICheckIsMarksman
- AICheckIsMedic
- AICheckIsMortarOperator
- AICheckIsGLOperator
- AICheckIsOfficer
- AICheckIsCommander
- AICheckIsMachinegunner
- AIGunInHandScoped
- AIGunScoped
- AIGunRange
- AIGunClass
- AIGunType
- AIGunDeadliness
- AIGunAmmo
- AIGunAutofireCapable
- FindObstacleNearSpot
- InSmoke
- CorpseWarning
- CorpseEnemyTeam
- CorpseMilitiaTeam
- AICheckUnderground
- AnyCoverAtSpot
- AICheckHasWeaponOfType
- AICheckHasGun
- AICheckShortWeaponRange
GetCorpseAtGridNo: additional check for valid gridno.
More zombie raise sounds (Data\Sounds\Misc\ZombieRaise1.ogg .. ZombieRaiseN.ogg).
GetCorpseRotFactor: improved code to return FLOAT value between 0 and 1.
New debug topic id TOPIC_DECISIONS for logging AI decisions.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8760 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-21 23:33:25 +00:00
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
Sevenfm b29e9700f3 Fixed incorrect integer calculation.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8706 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-11-22 14:24:21 +00:00
Sevenfm e1657cefb7 Improved movement noise calculation.
Fixed max array size bugs.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8698 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-10-22 20:45:43 +00:00
Sevenfm 7908dc2ff3 Reverted resetting next action in CancelAIAction() as it doesn't work as expected.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8697 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-10-18 21:31:19 +00:00
Sevenfm ef46feb9b1 Fixed bug introduced in r8695.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8696 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-10-06 18:44:19 +00:00
Sevenfm 30df6c350a CalcTargetMovementOffset: better integer calculation for max tiles penalty.
SOLDIERTYPE::initialize: initialize additional data.
EVENT_FireSoldierWeapon: if shooting soldier is invisible, locate screen to target spot.
CancelAIAction: reset next AI action.
FindBestPath: improved gas avoiding code.
InGas: improved code, also check the spot itself.
LegalNPCDestination: disabled additional checks to prevent AI deadlock.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8695 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-10-03 16:49:04 +00:00
Sevenfm 54e7c1e24d DrawCTHIndicator: bAimTime -> bShownAimTime fix.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8694 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-09-25 18:40:51 +00:00
Sevenfm 7342e39858 Fixed incorrect attacker's extra strength calculation in CalcChanceHTH()
Fix: don't allow opening inventory panel if soldier is not available during interrupt.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8691 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-08-23 20:23:44 +00:00
Sevenfm afb0c368b9 Disabled auto fast forwarding for talking faces.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8688 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-08-13 22:00:49 +00:00
Sevenfm c7cac0dff2 FindClosestBoxingRingSpot: player boxer should try to move out of ring as close to Darren as possible.
LUA: added new functions SetgfBoxersResting(), SetgubBoxersRests() to change boxers status.
ResetBoxers(): keep gfBoxerFought[] unchanged as it will be reset every day at 15:00 by HourlyQuestUpdate() in HourlyUpdate.lua

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8687 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-08-13 09:39:47 +00:00
Sevenfm 92171038ed updated r8524 fix to work in 1024x600
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8645 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-12-10 16:20:13 +00:00
Sevenfm 9aa6618910 InitSoldierStruct: initialize additional data used to display suppression effects
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8644 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-12-09 03:56:57 +00:00
Sevenfm 389f40ba3d Fix: flashbang effect in a building without flat roof
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8642 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-11-26 15:51:36 +00:00
Sevenfm d8ce2d312d ChanceToGetThrough: check that weapon exists, additionally initialize usAttackingWeapon, ubTargetID, bDoBurst and bDoAutofire which are used by FireBulletGivenTarget(), replace fake Glock17 with fake Minimi for better range
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8641 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-11-10 16:24:30 +00:00
Sevenfm 5d04583e13 - update "improved auto fast forward" feature
- disable radio animation for invisible soldiers and soldiers in water

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8603 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-08-26 01:24:06 +00:00
Sevenfm f8b34b35d7 NumberOfTeamMatesAdjacent: fix vanilla bug
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8511 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-12-19 11:17:32 +00:00
Sevenfm c24a5da97a - UseGunNCTH: initialize fBuckshot
- CreatureDecideActionBlack: use CreatureDecideActionRed instead of DecideActionRed

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8468 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-08-31 15:46:33 +00:00
Sevenfm fb61c74e40 - fix min/max bug in EVENT_SoldierApplyItemToPerson
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8466 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-08-29 18:07:43 +00:00
Sevenfm f4cbb59720 - DisplayLoadScreenWithID: use strcmp to correctly compare strings
- CalcThrownChanceToHit: fix integer calculation
- CalcBestThrow: allow CTH bonus for mortars, new less restrictive CTH check to allow attack


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8443 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-08-09 14:32:16 +00:00
Sevenfm 6ce47c4cef - new option: ENEMY_JAMS in [Tactical Gameplay Settings] allows enemy gun jams
- take into account unjam AP cost for jammed weapon
- improved AI_BETTER_COVER option

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8409 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-06-21 07:40:36 +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
Sevenfm e7fe040722 CalcChanceToHitGun, CalcNewChanceToHitGun: set fCantSeeTarget = true when shooting at empty invisible tile
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8301 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-09-14 07:07:40 +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
Sevenfm 762fb79c09 CalcEffVolume fix: sleeping state check
Attacks fix: 100 AP system for HitRate calculation
EstimatePath fix: ignore person at destination if we are estimating path cost
FindFlankingSpot: use full search range

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8265 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-07-03 09:53:56 +00:00
Sevenfm 9b2e65cade Punching: don't use kick animation when attacking with weapon in hand
Stealing: don't turn to attacker when lying prone (to prevent possible endless clock)
Bayonet:
- fix: disable wirecutters cursor in bayonet mode
- always use STAB attack for bayonet
- always give MELEE bonus when using bayonet

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8263 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-06-25 10:52:47 +00:00
Sevenfm f8d9a538cd Taunts update:
- TAUNT_INFORM_ABOUT (check that this opponent is really new)
- TAUNT_ALERT (say taunt only when red alert raised, if it's no initial alert, use TAUNT_INFORM_ABOUT instead)
- TAUNT_SUSPICIOUS (only when yellow alert is raised)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8262 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-06-25 10:41:13 +00:00
Sevenfm 90594fb43f ShowEnemyWeapon: bVisible fix
MinAPsToPunch fix: allow correct calculation when no target gridno supplied
World Items: don't allow max repair threshold less than current object status

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8261 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-06-25 10:31:55 +00:00
Sevenfm eaca08b7e9 Drop/pick up backpacks using Shift+B, Ctrl+Shift+F:
- added check for DropPackFlag
- added message for soldiers changing backpack status

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8260 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-06-25 10:24:07 +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
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
Sevenfm d2c1579786 HandleSnitchExposition: assignment instead of value check
HourlySnitchUpdate: NUM_PROFILES limit
Strategic AI.cpp: MAP_WORLD_X * MAP_WORLD_Y limit
RemoveMPButtonsForMapScreen: MAX_MP_BUTTONS limit
WrapString: '/0' char instead of '\0'

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8257 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-06-25 09:04:58 +00:00
Sevenfm 120507a9fd UpdateStrategicDetectionLevel fix: reset detection level
ScoutIsPresentInSquad: allow scouting only if soldier is not in a vehicle and not on assignment
StartCivQuote fix: uninitialized ubCivQuoteID2

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8256 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-06-25 08:48:40 +00:00