Commit Graph
326 Commits
Author SHA1 Message Date
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
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
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
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 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
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 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
Overhaul c462fd7744 More detailed error messages for failed saves
Yet another phantom militia fix

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1124 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-26 05:26:38 +00:00
SpaceViking 3e997fa0e1 Don't have monster spit cause fiery explosions
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1120 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-25 12:41:40 +00:00
Overhaul b559e8601d Removed an inconsistency between quickload and regular load
Turned on heap checking for debug builds.  *Could cause memory to run low if game runs for extended periods
Fixed assertion message for case where soldier groups try to cross impassible terrain
Fixed inventory memory leak


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1110 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-24 09:14:56 +00:00
SpaceViking 48527d4aa5 Fix problem with items with default attachments not comparing to base items correctly
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1109 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-24 06:44:11 +00:00
lalien 4b42b95a8c - fixed memory leak in new inventory
- fixed some variables not being initialized
- fixed swapped parameter in LOS.cpp
- added variable range check in lighting.cpp, the cause of wrong index value still not fixed

 


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1095 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-22 01:09:21 +00:00
Overhaul b7859a710f Efficiency improvements for soldier->soldier sighting
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1091 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-21 08:10:00 +00:00
lalien 9e92cefbfa - fixed some variables not being initialized
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1089 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-20 18:16:54 +00:00
lalien 429ca31658 - fixed Ctrl+M not moving items from/to the roof
- fixed Ctrl+S, Ctrl+F, Ctrl+M, Ctrl+R affect not visible items

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1078 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-19 14:29:05 +00:00
Overhaul 9d71fc89f0 Massive effort to reign in militia problem. Still has issues :(
Fix:  If only some of mercs go to a lower level (mine, basement, etc) but do not choose to "GO TO SECTOR", sector is still inaccessible from strategic map.  However, watch for triggers that might happen on first visit to a sector, that fail.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1076 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-19 08:33:17 +00:00
Sergeant_Kolja cab825a382 The Bug "pObject corrupted", aka "Toni SKI crash" or 6 Shuriken stacking crash" is triggered for debugging here, but only in _DEBUG build. In Release, nothing is changed. In _DEBUG, the code will DebugBreak() and if no Studio running, it will AsserMsg(). But this happens only if the corruption was _detected_. Not when it has happened :-( It is only a starting point for further excavation, and better than having nothing...
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1070 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-17 20:12:29 +00:00
Sergeant_Kolja c75026b151 Fixed two bugs:
1st) Weight Overflow, mostly when calculating Weight of Creature Spit Ammo. This has no Ammo, so the old code calculated accidentally -1.6f, resulting in 0xFFFF integer

2nd) GetAttachmentComboMerge() improved. Now a base item can be merged with _different_ 2nd items to result in _different_ merges. Before, a base item was only able to be merged to _one_ result. F.I. if we want to make a Dart gun from Dart pistol by adding (a buttstock and) wheter a steel tube /or/ a Gun Barrel Extender, the old code wouldn't work for the Gun Barel Extender, since it would never been tested, if there is a Gun Barrel.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1069 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-17 19:59:25 +00:00
SpaceViking a778a657b9 Fixes for more structures not being initialized.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1065 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-17 03:07:12 +00:00
SpaceViking cec7853cf9 Fix bug where structure was not being initialized. This caused occasional crashes when dialog with text was displayed.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1064 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-17 02:38:05 +00:00
Overhaul 8e75433dd1 Militia and friendly AI now mark mines for OUR side.
Related to above, militia deadlock fixed
Crash if console hasn't been brought up when text is sent to it fixed

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1058 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-15 20:34:43 +00:00
Overhaul 7384ae7268 Newly placed tanks now drag away old wreckage if present
Console line input only backspaces to beginning of line

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1050 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-14 08:09:59 +00:00
Overhaul 99e45d697e Fix to make soldier continue towards destination if previous path ended with a special move
Re-integrated LUA and console.  Still many things to finish though.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1048 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-14 04:25:07 +00:00
lalien 0c6b247cf5 - new shortcut: Shift+M moves all items in sector to location of selected merc
- fix for array initialization


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1047 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-13 23:32:44 +00:00
Overhaul ec4d1f6e24 Fix to stackable throwables:
Stop assertion failure for stack of 6 throwables.  
Report correct damage and AP for stacked throwables.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1036 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-07-09 11:06:57 +00:00