Commit Graph
609 Commits
Author SHA1 Message Date
Overhaul 13288fd750 Fix memory leaks in strategic pathing
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1536 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-10-20 08:40:25 +00:00
Overhaul b170dbb1e5 Fixes to reduce the number of compile warnings. Still many more to fix
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1535 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-10-20 08:32:53 +00:00
Overhaul 4bb41616eb Fix to prevent rain and storm from happening at once
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1534 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-10-20 08:28:50 +00:00
Overhaul 035359edf0 Fix AI units to reload/rechamber off-hand when necessary
Fix to prevent soldiers from climbing the wrong building while moving toward a disturbance
Fix to prevent soldiers from doing nothing when a climb point is not nearby
Fix improper indexing of directions

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1533 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-10-20 08:19:17 +00:00
Overhaul dd0d6ea66d Fixed appearance of save game corruption when a game with different inventory set is loaded. Note that such games can still cause odd behavior and CTD's
Fixed old-style behavior when creating a soldier struct (caused memory corruption and leaks)
Fixed soldiers unable to fire if an error happened while firing the off-hand weapon
Fix animation system problems with soldiers interrupted while changing stance, such as twitching and not being able to navigate around obstacles
Prevent splitting money while an item is in the hand, which would result in losing the original item
Fix reverse of X,Y when checking visibility through a roof, which could make soldiers falsely visible/invisible
Prevent militia from simply waiting on the border when enemies are known to be in the sector
Fix stack overflow for soldier inventory debug display
Optimized A* pathing and cleaned up VS2K5 specific code
AI can now use all climb points for climbable buildings, not just a random few
Fix to not allow flat roof butted against slanted roof to be identified as a climb point
Prevent soldiers who cause an interrupt from a special action from continuing on their path after being interrupted
Prevent soldiers who enter or leave deep water from moving a space too far and turning back
Prevent soldiers from trying to crouch while in shallow water
Make soldier turn in the closest direction when he must get up from prone and turn then fall back to prone
Allow a soldier to swat for a tile before returning to prone if unable to return to prone immediately after a turn
Fix civilians that should show up in a sector, missing because of others that aren't
Fix a memset on a C++ class
Place Skyrider in a sector near his helecopter once available and the helicopter is present
Fix soldier corruption if too many shots burst-spread into too few tiles
Include both first and last tile in spread when some locations must be skipped
Fix to shoot at last location in burst
Fix to remove other previous spread locations when calculating a new spread
Fix to reload or rechamber off-hand when necessary, such as having a pistol shotgun in that hand


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1532 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-10-20 08:09:03 +00:00
Overhaul eeb82168b5 Fixed update of items for which auto/burst does not apply when swapped into the hand
Moved helicopter in Estoni so that it is unblocked by a weed and can therefore appear completely
Fixed conditions where the game should remain paused but doesn't, and where it should unpause but doesn't


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1531 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-10-20 07:13:44 +00:00
Overhaul e879d3103c Removed some unnecessary anonymous structures
Fixed print-screen for full-screen mode


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1530 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-10-20 07:05:06 +00:00
Overhaul b25087e3e8 Added LUA support:
Control over rain and ambient light, as well as light fixtures
 Ability to change number of static enemies in a sector
 Ability to create enemy groups and set their waypoints
 Ability to set soldier APs, change stance, and change level


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1529 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-10-20 07:01:16 +00:00
Overhaul ea68cd14ff Added profiler support
Fixed memory leak and CTD with editor summary info
Added extra VS2K5 property pages for debug support


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1528 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-10-20 06:56:34 +00:00
Wanne b43ec593fe - bugfix: for expert difficulty level, that leads to adding INSANE_ELITE_BONUS after applying of EXPERT_ELITE_BONUS (thx to Scorpion)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1501 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-10-11 18:05:50 +00:00
AalaarDB ece5d551c1 Fixed bug where if a merc with an extended ear, and out of normal talking range, tried to interact with a shopkeeper the game would crash.
Now the merc will run up to the shopkeeper and then interact.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1444 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-09-28 00:38:47 +00:00
AalaarDB 5df2c69d10 Readded AStar code, see email for more details.
Fixed bug in AStar code.
Fixed night combat chance to hit
Optimized worst case scenario pathing to be faster.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1438 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-09-25 21:37:01 +00:00
SpaceViking 0d820f3c43 Fix problem where nothing can be picked up from the strategic screen.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1431 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-09-25 05:19:36 +00:00
SpaceViking 79333dbf84 Initialize variables to code that adds soldiers onto tactical field
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1427 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-09-24 05:37:53 +00:00
lalien ebd1e97d37 - removed variables that are not used
- some fixes on soldier direction calculations

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1403 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-09-20 14:35:33 +00:00
lalien 5a0abb4a14 - Removed non backward compatible code due to violation of §20 of JA2 1.13 Development Rules
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1402 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-09-20 13:43:27 +00:00
Wanne ce385421f1 - bugfix: Sam sites with index >=5 lacks ability to train militia (fixed by Lesh)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1376 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-09-16 11:11:09 +00:00
Overhaul 5035e83261 Fixed CTD in editor when changing detailed civ placement from wheelchair to jeep
Fixed memory corruption in detailed placement due to old-inventory behavior
Added Editor.slf to files JA2/Editor will load from
Fixed FindBestPath to not search for a path to NOWHERE


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1362 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-09-14 07:27:14 +00:00
Overhaul 2a4e963983 Fixed a problem with wrong variable name, and modified infant spit index to match the new Vanilla friendly index
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1357 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-09-13 06:01:33 +00:00
Overhaul ffc70e9723 Fixed buffer overrun for LUA strings
Made direction variables more consistent as unsigned chars.  Several function prototypes updated for this.
Many memory leaks plugged:  External options, video overlays, laptop file lists, tactical message queue, strategic pathing, autobandage, merc hiring, detailed placements, crate in Drassen, tactical placement
New functions and attributes for soldiers in LUA (still for debugging at best): Soldier.APs (current APs), Soldier.changestance (changes stance, uses game heights)
File catalog ignores .SVN directories (game load speedup)
Fix CTD in mouse regions
JA2 window now refuses to move to negative coords
Checks to prevent DirectX-related infinite loops due to minimizing and task switching
Invading enemies should now appear on the borders even when reinforcements disabled in .ini
Suppression should no longer work on mercs in medium water
Infant/Young creatures use restored spit instead of Molotov
Creatures begin with their 'guns' (spit) 'locked and loaded' (cartridge in chamber)
Further fix to AXP and AlaarDB's weapon ready check:  Now 'firing' is always counted as 'ready'.
Prevent mercs from falling and flying back through obstacles
Check whether battle group is even set before testing its location for battle setup
Burst spread locations now limited to 6, the limit within the soldier struct
Extra burst spread locations zeroed out so that they aren't used unless necessary
Spread code now only shoots at locations in the spread, and will shoot at all 6
Only mercs in the sector where autobandage happens will be made to stand up after it's done
Throwing a grenade at the tail of the plane in Drassen should not result in a CTD
Reset attack busy count when loading a new sector


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1347 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-09-11 11:19:03 +00:00
AalaarDB 63a7b27b29 Added BinaryHeap.cpp for AStar pathfinding, somehow it got missed.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1346 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-09-10 22:37:25 +00:00
AalaarDB c099151b37 Added AStar pathfinding.
It can be removed easily by undefing USE_ASTAR_PATHS.
See AStar thread in mod discussion forum for changes.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1331 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-09-08 03:18:32 +00:00
SpaceViking 10208ca5af Bug fix for militia movement on strategic screen not setting group ID for battles.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1312 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-09-04 04:06:23 +00:00
AalaarDB ef04b0790d Fixed bug where wrong chance to hit was displayed by completing AXP's previous bugfix.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1280 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-26 06:09:34 +00:00
Wanne 146230752e - Bugfix in ChooseFaceGearForSoldierCreateStruct(). Wrong HeadPos was set.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1278 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-25 15:46:05 +00:00
lalien c656cffed5 - replaced NOBODY with TOTAL_SOLDIERS in range checks (NOBODY definition will be changed from 156 to -1 later)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1255 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-22 18:29:35 +00:00
Wanne cd8ad6e8b8 - Added missing #include "Map Information.h" to Points.cpp
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1254 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-22 17:44:52 +00:00
lalien 85152e7a05 - replaced NO_SOLDIER with NOBODY
- replaced NO_MAP_POS with NOWHERE

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1252 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-22 14:54:41 +00:00
lalien f035858e3f - removed breath reduction for soldiers that are not in loaded sector
- added bug fix from build 1240 (fixed freeze in tactical - enemy soldier attempted to throw item at himself (save from pyg))

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1251 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-22 14:29:14 +00:00
AalaarDB 3f6ff281a3 Fix for 1% chance to hit target when distance is > 52
Camo and other effects are taken into account when aiming at a body part
Max Distance Visible is more consistent in being calculated based on the soldier and direction rather than a fixed number

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1239 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-21 10:21:56 +00:00
Overhaul c01ba3f6f1 Fix for militia transported to NOWHERE during autoresolve in a different than current sector
INS for overhead map is back!
Weapon CTH at extreme range now calculated with soldier's real sight max


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1237 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-21 07:51:09 +00:00
lalien f4bbb51e07 - reverted the "Fix for chance to hit being 1% at distances > 52" because it removes visibility limit
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1231 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-20 11:40:28 +00:00
AalaarDB dd6c4f56a1 Fix for chance to hit being 1% at distances > 52
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1228 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-19 21:25:35 +00:00
Overhaul fccef1faea Fix for AI seeking climb point in toxic gas
Fix for civilians trying to climb the roof to seek noise
Fix for punching and stabbing
Transparent change: Gave names to anonymous structs in OBJECTTYPE


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1225 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-18 19:03:20 +00:00
Wanne 29b883f59d new exe build (1202)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1203 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-14 18:23:58 +00:00
Overhaul c9fb501033 Fix for the "CONT" that won't go away
Fix points calculation in BaseAPsToShootOrStab
Tweaks to inventory, soldier, and merc profile structs
Fix for divide by 0 in CalcBestShot


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1199 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-14 07:48:45 +00:00
Wanne 6b6700ce96 - bugfix: HE Ammo Bug (thx to Callahan)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1195 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-13 18:08:41 +00:00
Overhaul 6ec2c5da7d Initialized many variables
Fix for enemy invasions and reinforcements


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1192 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-13 03:39:54 +00:00
Wanne ca8cb7b89a - bugfix: Sometimes if you press with the right mouse button on the radarmap, the overhead map view was not displayed
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1173 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-07 22:20:15 +00:00
Wanne ce31084ae7 Removed most of my thousands "WANNE" comments which goes back 2 years when I changed to higher resolutions. These were only internal comments for me, so they didn't include any useful meaning for others.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1172 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-07 21:39:23 +00:00
Overhaul 30bccc0d73 Fix for missing enemies in mobile group when player invades
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1170 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-07 10:03:05 +00:00
Overhaul 6de05c3fe1 Fix AI deadlock when multiple soldiers occupy the same tile
Fix to reset Pablo so that future thefts can also be punished


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1169 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-07 05:10:05 +00:00
Overhaul f5e3e7d7ff Fix for uninitialized group in reinforcements
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1168 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-07 04:22:10 +00:00
lalien 5926a62a05 - allowed militia to wear camo
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1155 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-05 00:47:19 +00:00
Overhaul c6514b0774 Fix for mouse movement when clicking on mercs. In windowed mode would move the cursor to odd places on screen
Enemy group invasion tactics fixed.  Now reinforcements come from all directions, same as from surrounding stationary reinforcements
Removed shuriken check
Fix for mercs turing lame


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1154 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-04 04:19:18 +00:00
Wanne 2db9c118a2 Added Breath APs fix from Kaiden
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1153 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-03 23:31:44 +00:00
Overhaul bef9d82933 Fix for freeze when AI killed by mines or other self-inflicted wounds
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1150 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-02 09:04:59 +00:00
Wanne 17449feabd new exe build (1147)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1148 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-01 22:42:46 +00:00
lalien d5d3294024 - added range check for light sprites
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1143 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-01 10:15:43 +00:00
Overhaul b07d18f9f4 Editor: Disable light sprites that are not in bounds. Actually happens in some sectors (ie Drassen)
Editor:  Fix for use of uninitialized variable in undo
Editor:  Fix for clipping bounds that are offscreen (causes crash)
Fix for AP bonus reading from INI
Fix mine indexes when looking for creature infestation of mines
Final (?) fix for militia reinforcements.  Also a change:  If you refuse reinforcements, none will come for the entirety of the battle
Increase size of cover and LOS grids to fit max radius
Fix for uninitialized light level in DistanceVisible
Move CheckForEndOfBattle to end of ReduceAttackBusy, to remove a possible militia invalidate upon promotion
Change the way Alt-L handles reloading


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1142 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-01 08:58:34 +00:00