Commit Graph
40 Commits
Author SHA1 Message Date
Kriplo 5ba65d8377 -fix for older savegames, October 2013 or earlier (thanks to anv).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7026 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-03-06 19:07:24 +00:00
Kriplo a665154a62 Brief: //dnl ch86
- Fixing mapeditor move building and improving some related mapeditor stuff.
Details:
- Change the way exit grids are add, remove, save and load through editor, also add undo option for exit grids and you can place unlimited number of them.
- Fix incorrect gridno save in temporary map file for bigmap exit grids.
- Increase maximum number of light sprite from 256 to 4096 per map.
- Using DEL key for QuickEraseMapTile will now erase ItemPool too, and with improved function DeleteStuffFromMapTile will erase light sprites, exit grids and door locks.
- Cliff hang tiles used for middle cliffs are now possible to erase with when erase button is on.
- Add support for undo door locks, also you can now erase them if erase button is on.
- Move building function is completely rewrite and will properly move exit grids, door locks, lights and items too.
- Removing unnecessary tiles during copy building is improved too.
- Fix undo function for light sprites which now will also store all three types and undo them properly.
- Fix CTD situation if tile elements are deleted and after that items too, then undo will crash mapeditor.
- Fix spawning of item pool cursors during when adding items.
- Fix text glitches over door locks form.
- Fix sticky tooltip when loadsave screen or door locks form is active.
- High ground marking cursors will not be drawn in invisible map tiles anymore to increase speed and maybe fix some render problems but I doubt it.
- Move GLOCK_17_ForUseWithLOS item generation from init.cpp to los.cpp to avoid potential problems if global world items array not set.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7004 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-03-02 11:25:11 +00:00
Kriplo ab5bfe2bf3 Brief: //dnl ch85
- Some fixing and adding position in overhead map to be in center of big map.
Details:
- Calculate overhead map cords from your current position on big maps.
- Fix incorrect placing room numbers in maps with cliffs.
- Fix CTD during deletion of sector items using CTRL+D or CTRL+Del.
- Remove light, door and item cursor and item tiles after coping building.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6888 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-02-08 15:20:13 +00:00
Kriplo 25952e5c50 Brief: //dnl ch84
- Solve issues related to my recent editor fixes.
Details:
- Fix missing condition when using keyboard for load any map from listed profiles in CTRL+L list box.
- Fix CTD during gWorldItems resize after adding certain amount of items.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6867 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-01-31 20:49:35 +00:00
Kriplo 056e5e31c5 Thanks to Flugente, he perform quick fix for overhead map crash after sector is cleared from enemy, but actual problem was created by me in r6744, I overwrite one condition by mistake, so this will fix the real source of problem.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6788 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-01-19 18:17:58 +00:00
Kriplo d0897d912c Brief: //dnl ch82
- Fix glitches in overhead map with cliffs.
Details:
- Overhead map never correctly show maps which contains cliff tiles. Some of glitches was incorrect placement for cliff shadows, not rendering complex multi tiles at edges, draw black line spots mostly close to map edges. All of this glitches also go to radar map during creation.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6744 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-01-09 20:51:02 +00:00
Kriplo a3a9b29ead Brief: //dnl ch83
- Fix BigMaps cliff-prone problem.
Details:
- Bug which prevent merc to go prone and crawl in big maps with cliffs was reported by Buggler who already find source of problem which lies in DB_STRUCTURE_TILE struct variable sPosRelToBase. This variable contains relative position to base tile which and cannot simply be change to INT32 as data from JSD files are loaded into it. However reason for problem is because sPosRelToBase is not updated for quite bunch of structures when map size is changed so add macro which in real time perform conversion and update sPosRelToBase value.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6740 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-01-08 21:16:35 +00:00
Kriplo 37bd981181 Brief: //dnl ch81
- Fix several problems with summary windows and improve map loading to any map for mapeditor.
Details:
- Add option from CTRL+L list box to load any map from any listed profiles.
- Fix incorrect loading of items option in summary window for non vanilla maps.
- Fix improper popup of radio boxes for when items is selected in summary window and summary file or map not exist.
- Summary items information is now show for non sector custom map files too.
- Fix glitches when switching from overhead map to sector summary windows.
- Fix improper opening of exit screen text box during exit from overhead map.
- Change size to fixed macro of all temporary buffers for map filename.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6687 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-12-06 21:14:09 +00:00
Kriplo b2dbc3123b Brief: //dnl ch80
- Polishing and fixing mapeditor.
Details:
- Add scroll map editor items for mouse wheel.
- Fix selection of mapinfo light and smoothing buttons when switching between taskbars.
- UpdateRoofsView now will hide/show onroof tiles and back roof walls too.
- Fix fake light toggle which now will remain after switching to another taskbar also fix incorrect ambient light saving during toggling fake light with HOME key.
- Finish work on HandleMouseClicksInGameScreen function so most draw functions now are single clicked on same tile element instead rapid burst of events which in some situation create stacking tiles problem during save game.
- Fix incorrect value for exit grids if right click on map element without exit grid, also if changing same exit grid then will update same instead to define next available slot from exit grid array.
- Restricted scroll will now disable scrolling when enter in textbox at mapinfo taskbar for basement levels and for proper radar map creation.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6673 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-12-01 22:27:03 +00:00
Kriplo 9a67e804c6 - fix to ch79, lights was not saved during automatic map conversion from mapeditor with -DOMAPSCNV command switch.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6670 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-11-30 19:13:41 +00:00
Kriplo 56b2260ff1 79. Brief: //dnl ch79
- Fix random item problems, add automatic maps conversion, fix some exceptions.
Details:
- Random items are now converted to proper real item if added through mapeditor as world or merc item. However random item will be permanently deleted after map is loaded if randomitemcoolnessmodificator not met expected game progress conditions rather then remain as random item.
- Add command line option -DOMAPSCNV to mapeditor which will automatically create radarmaps and convert all maps to the latest map version, all maps will be written to profile MAPS directory so be sure this folder is empty as any existing maps will be overwritten.
- Fix some exceptions for missing GAP files and strange CTD when we pass command line arguments through VS2010.
- Fix not opening items selection from merc inventory if we first do left and then right click for item choosing.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6668 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-11-29 22:49:48 +00:00
Kriplo e6e8cd75fd - addon to ch78, remove cursor and add any mouse click for exit from MAPUTILITY (radarmap) screen, also fix creation of radarmap without roofs.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6658 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-11-27 22:06:07 +00:00
Kriplo f0c6b73e24 Brief: //dnl ch78
- Some mapeditor cosmetic and CTD fixes.
Details:
- Fix sticky tooltip if perform scroll or go to 'Sector Summary' window.
- Fix accidental mercid delete from textbox if press any key while in 'Profile ID mode'.
- Fix CTD from release if several time swap from RND to any other item button.
- Disable some enabled buttons and mouse area from taskbar when 'Sector Summary' windows is active.
- Checkbox toggles from Mercs bar now remember their state after switching to another taskbar option.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6657 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-11-27 21:05:12 +00:00
Kriplo 614a56fe54 - addon to ch77, fix CTD when swap between random item with less then 12 items and any other item tab.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6653 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-11-25 23:01:48 +00:00
Kriplo e7455c445d Brief: //dnl ch77
- Couple mapeditor and game fixes and radar map creation for any screen resolution.
Details:
- Radarmap is now possible to create from any mapeditor screen resolution.
- Better fix to prevent memory corruption during gWorldItems resize.
- Fix problems with losing attached item because attachment slots was not exist when using NAS, also empty slots are removed which was prevent attaching in OAS.
- Fix tooltip popup for checkbox when button is disabled and prevent sticky tooltips from taskbar when SummaryWindow is active.
- Check if item is valid for 1.12 will be active only for mapeditor, but game will load all items regardless of map version.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6652 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-11-25 21:44:39 +00:00
Kriplo b997811a5d -in previous version committed wrong files :-}
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6571 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-11-09 20:55:11 +00:00
Kriplo 4104fbb248 Brief: //dnl ch76
- Debug performance improvement when working with inventory and UDB.
Details:
- Open UDB was quite slow and then clicking at some attachment slots halted game for few seconds.
- Moving mouse over opened inventory slots with hundreds of items jerking and halting mouse for moment.
- Fix CTD in rare occasions after attach and then remove GL and try attach some improper attachment.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6570 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-11-09 20:49:40 +00:00
Kriplo c9b913127c - Thanks to @Moa suggestions and links for iterators problem under VS2010 debug which throws exceptions after qsort is applied on objects with std::list members, decide to return std::sort for debug version of VS2010 and later although is much much slower. However qsort will remain under all release version and debug versions of older VS as they seems to work fine.
- Put more comments under my previous inventory changes and throw out altering contents of the array under qsort compare function MapScreenSectorInventoryCompare.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6567 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-11-07 20:52:02 +00:00
Kriplo b91bc7b209 Brief: //dnl ch75
- More map editor fixes and map inventory pool performance improvement for big maps.
Details:
- Fix not showing expected messagebox on exit (ALT+x) which also throw exception and goes to improper mapeditor exit.
- Fix second annoying sticky message which shouldn't popup during map loading and performing RemoveProhibitedAttachments.
- Fix CTD when delete all enemies or civilians or all of them in map.
- Fix some std exception when reporting for missing optional xml file.
- Fix memory and map corruption in old mapeditors if loaded old map has item with invalid attachment and we try to attach something else.
- As years ago pInventoryPoolList had migrated from WORLDITEM* array to std::vector<WORLDITEM> it was time to do that with gWorldItems too, all necessary functions which need to be adopted to gWorldItems std::vector type are also changed.
- Resize code for gWorldItems is changed hoping will lead into less corruption problems as now could occur in mapeditor and game when code automatically doing attachment changes.
- Change code for handling map inventory which now should be fast enough to support AIMNAS project which will probably deal with thousands of items per map.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6554 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-11-03 16:26:30 +00:00
Kriplo f008316275 Brief: //dnl ch74
- Couple map editor fixes.
Details:
- Map loading not properly set Vanilla global variable switch.
- Loading AIMNAS maps of version 28 cause CTD due to incorrect StackedObjectData loading sizeof.
- Only in editor mode and if NAS setting is on inseparable and default attachments will be always add, but default attachments will not, so older maps should be converted from mapeditor to new version.
- Fix CTD if try to place items from tab selection which contains no items.
- There was missing part from ch4 for mouse wheel support in mapeditor.
- There was conflict between keyboard and mouse events creating problems when try to select taskbar options by mouse.
- Fix annoying message of using improper attachment during item place if item consist of default or inseparable attachments.
- Remove hints to display if loading map from editor.
- Fix CTD if have previously selected merc and loading another (smaller) map.
- Saving map as Vanilla will check if attachment is valid for 1.12, that means you will lost some stuff from NIV if save in Vanilla mode, so you should always save map in newest format if want play map in 1.13.
- Add correct weight recalculation when saving in Vanilla format using old OBJECTTYPE.
- Remove entry points check during map save as Scheinworld reported problem with basement levels and similar maps which doesn't need entry points.
- Fix displaying wrong map version in summary window because MapInfo is incorrectly saved in all previous mapeditors.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6530 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-10-25 18:48:37 +00:00
Kriplo d83f23ce2b Brief: //dnl ch73
- Fixing bad APs deduction when using blade or blunt weapons and punching in general from different stances when need turn to your target.
Details:
- Fix wrong APs deduction and animation change when go to attack with knife or punch from prone.
- Fix no APs cost for martial artist when perform turning.
- When target was prone there was several problems in defining turnover and stance cost as range to them could vary depending of obstacles between, and as punch or stub in general use same logic put all stubbing and punching under one function MinAPsToPunch which should solve current problems with APs calculations.
- Still there are no turning cost when going to stub or punch from moving, but this problem is not related with MinAPsToAttack but with UIPlotPath which don't add turning cost, hope someone in the future will add this feature which never exist.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6465 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-10-03 20:22:35 +00:00
Kriplo f65719e801 Brief: //dnl ch72
- Fixing bad APs deduction when using hand grenades, mortars, rocket launchers, grenade launchers and attached grenade launchers from different stances and need turn to your target.
Details:
- Add APs cost for stance change and turnover for mortar and rocket launchers.
- Rocket launchers cannot be fire from prone any more as there are no animation for that stance.
- Attached grenade launchers now take raise gun cost for launcher instead for gun.
- No more problems with APs for grenades from different stances and turnover, add proper costs for crouch too as someone add animation for that.
- Fix wrong APs deduction for grenade launcher from prone and turnover in general.
- Fix incorrect values for APs cost under throwing/launching cursor.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6447 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-27 22:03:42 +00:00
Kriplo 5ebe26bc29 Brief: //dnl ch71
- Fix more problems of deducting APs when try to shoot from different stances but need turn to your target.
Details:
- Problems raised after introduction of conditional APs charge in case that you need to rise gun and turn, so charging only higher of this to two value if not prone.
- Another problem is alternative fire mode from hip which is currently allowed only in stand so was missing such condition as well for change scope mode if going down.
- As run into problems from above for our merc, need adopt it to CalcBestShot for AI too.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6414 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-18 09:45:50 +00:00
Kriplo 30cc0160cf Brief: //dnl ch70
- Some APs fixing for throwing knives and backpack, with doing some correction to my previous changes.
Details:
- Do some correction and missing parts to ch58 and ch69.
- Throwing knives will add you bonus for throwing knives to same target as was suppose from v1.12 but never works.
- Fix AI use gun calculation for throwing knives instead for throw.
- Fix incorrect showing and deducting APs when try to shoot from prone with backpack or throw from prone and crouch positions with turning in general.
- Fix cheating when sLastTarget is set just for raise gun in that direction, this was always done after you fire.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6409 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-17 11:33:47 +00:00
Kriplo 569eba300a - small change to ch58 for change facing, so now will first try to turn to last target if exist then to closest enemy.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6404 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-15 18:45:45 +00:00
Kriplo d24b54cb5a Brief: //dnl ch69
- Add alternative fix for CalcBestShot which should remove existing APs problems maybe even create AI deadlier then ever ;-)
Details:
- Existing CalcBestShot simply became inadequate and buggier for so many add ons to game, so compiling with dnlCALCBESTSHOT is alternative option which calculate all turning, stance and raising gun cost for different stances and all available scopes, and after all hoping fix incorrect APs calculation as well, hitrate formula is adapt to 100AP system, also try to optimize a bit to get less AICalcChanceToHitGun calls and to use with different stance decisions.
- From ch58 aiming for burst and autofire was disabled as was causing invalid action handle due to incorrect APs calculation so from now aiming AI also use aiming before bursting.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6403 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-15 15:59:51 +00:00
Kriplo d760d34d7e - somehow lost two condition in previous commit, correct what is missing.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6387 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-10 21:02:53 +00:00
Kriplo f5ac5be03f Brief: //dnl ch68
- Magically appeared reinforcements for enemy and militia just turn after they are called from now could be delayed and randomized.
Details:
- Practically all enemy reinforcement which can populate available slots was always appeared next turn after they are called so now we have game settings under "Strategic Gameplay Settings" for fine tunning enemy and militia reinforce entry:
  MIN_DELAY_ENEMY_REINFORCEMENTS enemy reinforcement will arrive minimum this number of turns after they are called, if 0 then is disabled.
  RND_DELAY_ENEMY_REINFORCEMENTS additional random delay added to minimum when reinforcements will arrive after they are called.
  MIN_ENTER_ENEMY_REINFORCEMENTS minimum enemy units which will enter after above delay is over.
  RND_ENTER_ENEMY_REINFORCEMENTS additional random enemy units to appear after passing delay.
  MIN_DELAY_MILITIA_REINFORCEMENTS enemy reinforcement will arrive minimum this number of turns after they are called, if 0 then is disabled.
  RND_DELAY_MILITIA_REINFORCEMENTS additional random delay added to minimum when reinforcements will arrive after they are called.
  MIN_ENTER_MILITIA_REINFORCEMENTS minimum enemy units which will enter after above delay is over.
  RND_ENTER_MILITIA_REINFORCEMENTS additional random enemy units to appear after passing delay.
- After first delay ends any other reinforcement appeared more frequently or if already arrive (but no free slot), they will pop up soon after slot is free.
- Add option NO_REMOVE_RANDOM_SECTOR_ITEMS under "Strategic Gameplay Settings" to prevent permanent random removal of your sector items.
- Add missing function DisplaySectorItemsInfo.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6386 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-10 20:49:49 +00:00
Kriplo d05d130f33 Brief: //dnl ch67
- Throwing knives had tendency to magically disappear if hit some kind structure.
Details:
- For those who like Dimitri, throwing knives will not disappear anymore if hit some structure or flies into the sky, also using them affect their condition.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6378 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-08 17:20:27 +00:00
Kriplo 570fccf768 Brief: //dnl ch66
- Fix problems with left click on NAS pocket with weapon and attachment in hand also do some patch to JA2SP_INVENTORY_AP inventory manipulation.
Details:
- If have valid attachment for weapon in some NAS pocket and try left click on it weapon will be transfered to HANDPOS, this is fix and attachment box will pop up instead.
- Fix problem with inventory manipulation on when they deduct APs from even on unsuccessful item movement.
- From now during turn based combat you can only attach and reload weapon in your HANDPOS and item handling is forbidden in strategic map as code for APs deduction for item movement is only implemented in tactical screen. So this restrictions apply only during turn based combat and with JA2SP_INVENTORY_AP is turned on.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6375 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-08 08:19:19 +00:00
Kriplo 23384a9199 - Fix out of array bug in GuySawEnemyThisTurnOrBefore function which force AI to run along the latest guy who see your mercs before you manage to hide.
- HEIGHTUNITS_PER_CELL definition must be float.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6372 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-07 18:50:01 +00:00
Kriplo 98f9831057 Brief: //dnl ch60
- Vertical angle formula fix and accidental hits in OCTH.
Details:
- No more accidental hits at target for which OCTH calculate miss, this was especially inflicted to prone targets, cause was vertical angles and ridiculous definition in JSD stance files.
- Rollback to original v1.12 Distance2D calculation, because game use tan not cos function for vertical angle. Bad vertical angles in close distance 3 tiles or less (as Distance3D calculate 8 tiles), means that you will always hit target regardless of OCTH result.
- Also fix distance formula which had wrong factor 2.56 instead of 25.6, at close distance that was problem because height for one level is defined by 256 units per one tile which had value of 10.
- Add little adjustment to vertical bullet angles so bullets spread more in visual ranges.
- Bug fix when dice roll is equal to OCTH which means miss but currently was always treated as hit even when OCTH is pure 0.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6369 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-06 20:44:57 +00:00
Kriplo 1201807b09 Brief: //dnl ch65
- Fix not enough APs for unloaded ammo and removed attachment in map screen, however this will not solve problem if inventory manipulation is on.
Details:
- During the battle if you enter in strategic screen and remove attachment or unload clip and have no free slots to put them, you was stuck and need to reload game (other option was trash).
Now game check if you have enough APs for reload and attach back item.
- This fix solve same problem with clips in tactical screen too.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6367 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-06 18:30:52 +00:00
Kriplo f68f6131b9 Brief: //dnl ch64
- Fixing Tank bursting shells problem, and some other tank related bugs.
Details:
- There are several problem with Tank handling, main was forcing to use gun although already decide to use machinegun which lead to bursting shells.
- Another one was related to machinegun usage as current autofire handling is not supported by TANK BURST animation which had limit to 6 rounds, so decision to fire anything different then 6 lead to complete wrong APs deduction.
- Fix some invalid animation decision as current tank cannot raise gun or move or check for cover.
- Fix problem with wrong return (INT8) although after introduction of 100AP system APs variables are INT16 which create bad APs calculation for tank.
- Fix general problem with burst and autofire when soldier decide to when swap weapons.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6340 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-08-31 10:22:25 +00:00
Kriplo 44d98500f1 - in ch58 forget to check if pointer is null which of course lead to CTD, sorry ;-)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6322 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-08-25 20:55:59 +00:00
Kriplo 571a2940e6 Brief: //dnl ch63
- Fixing AI problems when they use launchers.
Details:
- Seems from implementation of 100AP system and new attachment system and new kind of GL launchers, AI use them improperly or not used at all. Bugs was:
- Bursting grenades from non burst launcher.
- Not use GL if grenade is already in it
- Not firing from rocket launcher if couldn't find hand grenade.
- Refusing to launch grenade from attached GL if couldn't find grenade in other pockets.
- Never fire from single rocket launchers like LAW.
- Incorrect chance to throw calculation for GLs which lead into no decision to throw.
- Whole cylinder of grenades was permanently remove from pocket after reloading launcher.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6321 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-08-25 20:30:46 +00:00
Kriplo 638de03d8d Brief: //dnl ch62
- Ignore firing into dying and breathless targets.
Details:
- AI will ignore attack breathless targets if there are other in better condition.
- AI will not fire into dying targets.
- AI should avoid go into creature gas.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6314 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-08-25 08:40:36 +00:00
Kriplo f06df7741f Brief: //dnl ch61
- Basic support for reducing AI friendly fire.
Details:
- Friendly fire grids are defined during best shot calculation then AI decide depending of soldier character to fire or take other action. Still in autofire accidentally friendly hits could be higher depending of bullets spreading.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6313 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-08-25 07:36:03 +00:00
Kriplo 123b46f2c8 59. Brief: //dnl ch59
- Fix problem AI cannot fire when mercs are on roof, AI calculate chance to hit from all stances.
Details:
- Sometimes AI not fire when target is on roof, happens in situation when previous target was on ground because bLevel was not update.
- Instead to calculate ChanceToHit only from STANDING from now AI calculate chance for all stances, so AI should be more eager to attack.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6311 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-08-24 20:17:16 +00:00
Kriplo 1adc9c542c Brief: //dnl ch58
- Fix several problems which lead into bad or no AI decisions, add optional decision of short autofire.

Details:
- Avoid use of last two locations per turn 
- Fix problems with improper APs calculations for burst and autofire which lead into AI to forcably cancel and end turn for those actions.
- Add option for decide to use short autofire instead of one long to enchance chance to hit.
- After taking cover change facing toward closest enemy to avoid going in status red and rather take proper black decisions.
- Fix bad public noise processing after AI investigate closest disturbance and find nothing, also erase all same noise points in team members if one of them already investigated.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6310 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-08-23 16:27:36 +00:00