Commit Graph
63 Commits
Author SHA1 Message Date
Flugente d6186aca15 Merged revision(s) 6826-6828 from branches/ja2_source_official_2014:
- Minor code improvements and cleanup
- Fix from r6775 is no longer necessary.
- Code improvement: Instead of calling inv.size() repeatedly, just call it once and remember that value

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6829 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-01-26 12:18:43 +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
silversurfer 6e98818e16 New modifiers for enemy item quality in Ja2_Options.ini:
ADMIN_EQUIPMENT_QUALITY_MODIFIER = 0
REGULAR_EQUIPMENT_QUALITY_MODIFIER = 0
ELITE_EQUIPMENT_QUALITY_MODIFIER = 0

These modifiers work just like the existing ones for militia.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6535 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-10-27 09:04:57 +00:00
silversurfer c16971b9f2 New weapon type modifiers for:
- damage
- single shot AP
- burst AP
- auto fire AP

Fixed some parts where the raw item property was used instead of the Get... function that should be used.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6470 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-10-05 15:15:50 +00:00
Flugente 64f7d6e616 new item tag <ItemChoiceTimeSetting> forbids AI from picking an item at night if set to 1 and at day if set to 2
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6262 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-07-30 19:32:49 +00:00
Flugente b53fe0cd72 Militia equipped from sector inventory take along NVGs/sunglasses to use them later
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6259 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-07-29 20:04:45 +00:00
Flugente 7f467f4f80 Fix: militia equipment item fitness function still considered ammo even if MILITIA_USE_SECTOR_EQUIPMENT_AMMO was false, thus possibly ignored guns that had no ammo loaded
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6030 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-04-28 15:58:58 +00:00
Flugente bcbe006a4a feature improvement: if MILITIA_USE_SECTOR_EQUIPMENT_CLASS_SPECIFIC_TABOOS is TRUE, one can taboo equipment for specific militia classes
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6026 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-04-27 00:59:38 +00:00
Flugente a66a3ef61b - militia equipment choosing: object status is taken into consideration for NVGs and sungoggles
- militia equipemnt choosing: do not give a 'bonus' for excess ammo we wouldn't take anyway

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5987 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-04-07 00:49:08 +00:00
Flugente fe8d572068 Fix: ubGunAmmoItem was not set, which could lead to magazines disappearing during reloading
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5906 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-03-07 20:43:58 +00:00
Flugente 50c4982f91 - prisoners give information only on mobile patrols, not on city sectors
- if using militia equipment, items stolen by militia are dropped after combat if their class is distributed to militia by the player
- Fix: do not delete world items with invalid gridno
- Fix: militia drop gear on valid GridNo

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5892 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-03-03 23:26:03 +00:00
Flugente fc2e10314b - Fix: crash when trying to delete an item with invalid GridNo
- Fix: adjusted squadname when discovering NPCs

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5890 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-03-03 08:57:26 +00:00
Flugente 72dbd9e33f - fixed an instance of wrong assignment strings
- prisoner decision messagebox now allows to select a specific prison
- Fix: under certain conditions, calling militia reinforcements with militia equipment selection could get sector items with invalid GridNo to become lost

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5888 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-03-02 19:14:46 +00:00
Flugente c3462f9163 code improvement: no need to evaluate guns in 1st loop, do total evaluation with ammo in 2nd loop
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5885 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-03-01 20:19:55 +00:00
Flugente 8e909f12fc improvement of militia equipment choosing:
- grenade launchers aren't overlooked anymore if sector sorting is bad
- ammo does not need to be converted to crates anymore
- less ammo deletion and recreation necessary
- added code documentation

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5880 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-02-28 02:08:55 +00:00
Flugente 59b2549bd6 - new feature: we can now equip militia with gear from sectors, see http://www.bears-pit.com/board/ubbthreads.php/topics/315664.html#Post315664 for more information
- increased the object flag size to UINT64, this breaks savegame compatibility

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5869 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-02-23 18:32:55 +00:00
Flugente 79d6bb46ed - external feeding checks for invalid gridno
- reordered xmls
- new feature: class specific gun and item choices allows finetuning of a soldier's equipment

WARNING! This exe needs GameDir revision >= 1584, as xmls have been reordered!
More info under http://www.bears-pit.com/board/ubbthreads.php/topics/313782/Re_New_feature_Class_specific_.html#Post313782

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5764 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-01-04 23:25:35 +00:00
Flugente 9e058edf5e Fix: it was still possible to resolve random items in the map editor
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5625 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-10-11 19:17:13 +00:00
Flugente fc49b33398 - random items can also be results of merges and item transformations
- removed a few instances of incorrect random item spawning

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5598 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-10-01 20:42:55 +00:00
Flugente ff157fd96b New feature: random items allow spawn not themselves, but an item from a brad selection
- specify random items in RandomItems.xml
- when the game creates a random item, it searches all vialbe items according to random item class and picks one randomly
- this allows mappers to place items in maps that are more independent of the xml-set used, however the random items themselves msut be the same in map&mod
- can also be used to broaden the enemy gun/item choices selection
- for more reference, see http://www.bears-pit.com/board/ubbthreads.php/topics/310793.html#Post310793

FIX: sector curfew value was interpreted wrong

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5594 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-09-30 21:59:47 +00:00
Wanne f40e7fb118 - Made the "Zombie MOD" optional, so we can decide if we like to build an executable with/without the appearance of zombies
o See: builddefines.h: #define ENABLE_ZOMBIES (then you can turn on/off Zombies in the ingame option screen)
o Poison system is still in the code and not combined with the option "Zombie MOD"
o Gamers reported on the Bears Pit, that an executable compiled WITH the Zombies mod enabled makes the game unplayable slow in tactical screen after a few minutes in turn based/realtime



git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5356 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-07-04 10:30:13 +00:00
Wanne c90f4bce47 - New feature: zombies can now spawn from corpses, if you specify that option in the preferences screen (by Flugente)
o if set to off, no zombies will spawn. This can also be changed in mid-game
o for more information on how this works and how to set it up, see http://www.bears-pit.com/board/ubbthreads.php/topics/295746/Zombies_WH40K_and_more.html#Post295746
o with the tag <PoisonPercentage>, you can now poison guns or ammo. This is the percentage of damage dealt that will be poisonous (see zombie thread for an explanation)
o The zombie option can only be enabled in a single player game

o AI fix: to prevent the endless clock problem, the AI now ends the turn if the same actor calls the decision routine over 100 times in a single turn.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5313 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-05-29 22:49:17 +00:00
Wanne 91087ca8c0 ************************************************************
* Merged Source Code from Development Trunk: Revision 4063 *
************************************************************
- Source Code is merged from: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP
- This will be the Source for the Beta 2011 Test

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4064 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2011-01-18 09:11:09 +00:00
Wanne 14750c6903 **********************************************************
** Big Maps Projects code (incl. Multiplayer v1.5 **
**********************************************************
- Merged Big Maps Project code from BMP+MP trunk (Revision: 3340)
o Complete SVN Revision history: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP
- Before THIS merge, I made a branch of the existing 1.13 source
o SVN Branch: https://81.169.133.124/source/ja2/branches/JA2_rev.3336/src
- Removed old VS 6.0 and VS 2003 project and solutions files, because compilation is broken long time ago
- I will add VS 2010 projects and solution file in the next few days

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3341 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2010-02-28 18:38:52 +00:00
Wanne 80eebe69bd - Bugfix: Enemies should also drop LBE gear (by Roadkill)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3123 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2009-07-22 07:36:42 +00:00
Wanne 335747c3ff Added Headrock's HAM 2.8
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2650 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2009-04-01 12:20:30 +00:00
SpaceViking f26095d86f Space Viking's many mercs changes plus numerous generic bug fixes
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2498 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2009-01-15 01:26:13 +00:00
lalien 43ca24dda8 Merged New Inventory Project into main branch
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2008-03-08 15:15:25 +00:00
MaddMugsy cb36b3db6d -updated game version
-suppressed soldier action data messages in cheat mode
-enabled enemy / militia ammo choosing to be limited by coolness

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1853 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2008-02-26 02:37:23 +00:00
Overhaul 11c4d9648e Added memory leak detection to "new" operator
Prevent merc in slot 0 from disappearing due to errant schedule.  Still need to find and fix schedule though
Prevent attempts to turn or climb roof when soldier collapsed
Fix problems when mortar or RPG randomly assigned to a soldier but cannot be added for whatever reason
Pathing favors beginning path on orthogonal and using as few turns as possible (mostly old behavior).
Prevent interruptions when soldier climbs up, which can cause fall into building just below the target roof position
Fix pauses due to soldiers hurt in previous turn
Fix soldier path not reaching destination when thrown by explosion damage or heavy gunfire
Restore pathing to cave and underground exits
Fix too many AI ending up on the roofs


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1588 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-11-09 09:10:40 +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
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 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 7a27e7105d New attack busy system
Added missing #includes

Added LUA scripting and console

Changed the way tracers are visualized, so they work more like real tracers instead of a light fountain

Fixed signedness of many grid variables used in GetMouseMapPos calls

Fixed enemy weapon choosing:  Sometimes a mortar is chosen but later rejected, but the grenade class was not reset.  Caused assertion failure

Added checks so enemies don't try to chuck RPG grenades with their hands

Now possible to shoot a someone in the head if he's in water

Fixed InitSightArrays to also clear soldier interrupt duel points.  This was causing an assertion failure elsewhere in the code because the interrupt list still had soldiers on it sometimes when this function was called.

Soldiers are much less willing to forfeit their turn over an attempt to use more APs than they have

Removed early setting of muzzle flash.  This would allow enemies to get an interrupt before you even fired.

Fixed item dropping by AI.  If AI tried to drop something while standing it would cause deadlock

Change to greatly speed up closing the sector inventory window in an unloaded sector

Added conditional compile flag to always give robot weapon ready advantage, even for 360 degree sighting


Check builddefines.h for the conditional flags.  Of greatest interest might be LUA_CONSOLE.  This will cause the game to bring up a command console when run.  However this console is severely lacking in many areas.  If anybody knows of an open-source terminal/console that could be used instead, it would be appreciated.  The existing console does bad things when you try to close it, and since it counts as a separate app, it pauses the game while it has focus.

LUA scripting is very limited, basically just proof of concept.  There is one global variable, the Soldiers array.  An array index gives you the soldier in that slot in the currently loaded sector.  The soldier has a few things that can be accessed:  name (short name); fullname (long name); grid (current grid #, can be changed); walkto(grid) (function to walk to another grid); runto(grid) (function to run to another grid)


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@924 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-06-09 09:01:04 +00:00
Lesh c239e693b5 - fix: militia always has equipment one level lower than enemy when slow progress is on (slight re-balance of militia involved battles)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@665 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-01-18 18:41:58 +00:00
Lesh 3188c0ef8e - slow progress for enemy items choice added
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@658 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-01-08 13:45:34 +00:00
Wanne ba83608c40 - bugfix: Wrong chance to hit calculation on RPG rocket launchers
- bugfix: CTD in German version when using auto fire (-> missing German language strings)
- updated German and English language files

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@548 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-09-22 21:10:48 +00:00
Wanne 67663339a3 - bugfix: Enemies do not wear NVGs at night
- add: Missing option screen text for "Random I.M.P personality"

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@541 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-09-20 09:23:48 +00:00
Wanne 8ff617d08c bugfix: New drop item system (XML Drop system)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@514 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-09-08 13:51:19 +00:00
Wanne 32f6cb949e bugfix: Not all Face-Items (Goggles, NVGs, ...) are dropped, when "Drop all items" is selected
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@511 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-09-07 17:54:20 +00:00
MaddMugsy 52eaaf4fcd -quick fix: enemies don't wear sun goggles at night anymore
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@490 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-08-29 16:41:10 +00:00
MaddMugsy 891f687107 -quick fix: enemies don't use NVGs during the daytime
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@488 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-08-29 06:52:35 +00:00
Wanne fce528e1a4 - added a militia drop rate to the xml-drop files.obj
- added drop rates for knives, laws, mortars, launchers (see EnemyWeaponDrops.xml, EnemyMiscDrops.xml)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@478 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-08-26 12:28:27 +00:00
Wanne c4c355f4b6 - Added Kaiden's Vehicle Inventory code
-> VEHICLE_INVENTORY = TRUE (Ja2_Options.ini)
- Bug fix: Vehicles sharing same animations
- Added additional enemy item drop system
    -> New XML-Drop files (EnemyWeaponDrops.xml, ...)
    -> Set ENEMIES_ITEM_DROP = 1 (Ja2_Options.ini) to use the new drop system
    -> Disable "Enemies drop all items" to use the new drop system


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@466 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-08-25 08:06:11 +00:00
MaddMugsy a5a0dfd11a -fixed guns being chosen from too high a level in "Normal Guns" mode
-fixed AI not firing guns when able - this should reduce the amount of running back and forth and also the running up to your guys and crouching

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@332 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-07-07 05:40:20 +00:00
Wanne 36db236079 - Enabled some useful Assert-Messages, so we get notifications about errors in DEBUG Mode.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@330 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-07-06 05:47:28 +00:00
MaddMugsy 367f70176d -fixed new ammo types not coming out of enemy guns properly
-minor AI fixes
-reduced minimum default status for bonus depreciation from 100 to 85

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@251 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-06-17 18:42:57 +00:00
MaddMugsy dae7f064d0 -pre-load enemy weapons with the ammo type that was selected for them instead of the default type
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@247 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-06-17 06:01:44 +00:00
MaddMugsy 0e3276e406 -minor fix to min. bullet calc
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@246 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-06-17 04:50:22 +00:00
MaddMugsy 245ea74d2f -ensured enemies have a minimum number of bullets, rather than a random # of clips (at least 20 bullets) This should stop those guys with the sawed-off shotguns (2rd capacity) from running away after 5-10 shots.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@244 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-06-17 02:47:30 +00:00