Commit Graph

70 Commits

Author SHA1 Message Date
titiger a5e759fdd1 AI should not morph units currently busy with building something 2016-12-12 14:51:16 +01:00
SoftCoder d6dbb187cc - fixed some bugs discovered by coverity scan 2016-01-20 21:34:23 -08:00
SoftCoder 7e0494bb28 - some bug fixes based on coverity scan 2015-11-25 21:16:29 -08:00
SoftCoder 8210485a42 - a few bugfixes related to coverity scan 2014-12-15 19:44:26 -08:00
SoftCoder b9d6b38e8f - coverity based bug fixes - round #1 2013-12-13 23:04:12 -08:00
Mark Vejvoda 9268aaf279 - a few minor bug fixes related to code warnings
- code cleanup based on additional gcc warnings
- enabled additional gcc compiler warnings
2013-11-19 06:14:06 +00:00
Mark Vejvoda 1d3859ff32 - windows x64 updates to get things compiling on vc2012 x64 2013-11-02 11:04:52 +00:00
Mark Vejvoda ad0fb1d6f7 cleaned up code based on feedback from cppcheck 2013-10-25 05:45:54 +00:00
Mark Vejvoda ab413f1d0c small code cleanup from cppcheck 2013-09-19 06:32:47 +00:00
Mark Vejvoda d4a6645a4d - more code cleanup and game lobby force refresh bugfix when data changes 2013-09-19 01:19:36 +00:00
Mark Vejvoda 3a5c99bca5 small code cleanup to see if this corrects any memory issues 2013-09-18 22:44:04 +00:00
Titus Tscharntke 6f85a6aa4a old air behaviour for resource production. new one is reachable via ini switch NewResourceBehaviour=true 2013-08-29 22:30:09 +00:00
Mark Vejvoda f617866237 - attempt to see if this handles resource associated units better 2013-08-10 06:53:16 +00:00
Mark Vejvoda 97b8979a6c added AI logging for resource unit type logic 2013-08-02 21:46:55 +00:00
Mark Vejvoda 1247f1e965 a little refactoring and try to fix some of the AI logic for food producers 2013-08-02 00:08:16 +00:00
Mark Vejvoda 8d36c07a61 make AI smarter when needing more resources, prefer units that 'give back' resources over producers 2013-06-20 20:04:19 +00:00
Mark Vejvoda 54a28b6fb5 see if this makes the AI produce more food quickly when needed 2013-06-15 07:29:59 +00:00
Mark Vejvoda 0ead6a36dc full support for translated techtrees 2013-06-13 08:55:48 +00:00
Mark Vejvoda 8066502f9b fix a few areas that vc++ 2012 pointed to as potential bugs 2013-06-08 03:40:04 +00:00
Mark Vejvoda 4499308888 fix a few areas that vc++ 2012 pointed to as potential bugs 2013-06-07 23:17:27 +00:00
Mark Vejvoda f87b8b6ee2 - updated code to protect against null pointers and uninitialized values and threading issues 2013-02-04 08:30:43 +00:00
Mark Vejvoda de1f7c53d9 - improve AI performance a bit and ALSO update the AI so they harvest sooner when running low on consumables 2013-01-12 01:11:53 +00:00
Mark Vejvoda ff58a868b3 - attempt to bugfix windows using proper printf syntax for data types 2012-11-10 06:37:23 +00:00
Mark Vejvoda 28d65e8d55 - cleanup from last checkin (corrections) 2012-10-26 03:08:40 +00:00
Mark Vejvoda 3419127632 - proper way to handle size_t objects (cleanup warning on other platforms) 2012-10-26 02:42:10 +00:00
Mark Vejvoda 011e0263b0 - lots more code cleanup, using safe buffer size code to avoid buffer overflows 2012-10-19 01:31:20 +00:00
Mark Vejvoda 5e42c6dc03 - loads of code cleanup based on verbose output from the latest git version of cppcheck 2012-10-06 07:06:40 +00:00
Mark Vejvoda 2a80dd7c3c - more cppcheck code cleanup 2012-10-06 03:42:31 +00:00
Mark Vejvoda 8c0bf75bf5 - got built in memory leak working. Just edit leak_dumper.h and uncomment:
//#define SL_LEAK_DUMP
- got better / more accurate stack dumps when we detect errors in game.
- Both of these need to be worked on in windows next, win32 may not compile for now until i fix it on that platform.
- BE VERY CAREFUL when working in leak_dumper.* it may cause GCC and your system to crash if you don't know what you are doing!
2012-04-14 21:21:09 +00:00
Mark Vejvoda 030582c1ef - added a new EnumParser class to convert enum to string and vice versa
- factions can now customize some more of the AI behavior
2012-03-31 05:54:24 +00:00
Mark Vejvoda 9286130138 - bugfixes and code cleanup found using cppcheck 2012-03-28 06:25:57 +00:00
Mark Vejvoda c0f3658faa - bugfix for network scenarios to NOT close unconnected network slots before loading, they will turn into AI players (this is required because the scenario code may require those factions)
- added ability to morph and indicate the morph command should ignore resource costs, add this to the command type:
<ignore-resource-requirements value="true" />
2012-03-27 03:23:03 +00:00
Mark Vejvoda e6028a0555 - allow logging of AI behavior to logfiles using: AiLog=10
(this produces a logfile for each AI player called aix.log where x is the ai player #)
- changed some AI behavior so that AI player can use overidable min static resource count from faction xml
- changed some AI behavior so that AI player is more smart about producing resource producers and resources.
2012-03-17 19:22:03 +00:00
Mark Vejvoda 5f95b08c17 - a ton more load game state now working (including commands) 2012-03-13 15:21:25 +00:00
Mark Vejvoda 9852325da6 - fixed Martiño Figueroa's name in all copyrights in source code
- added copyrights to files that were missing it
2011-12-14 07:40:48 +00:00
Mark Vejvoda a4798e6d72 - added upgrades to ai behavior xml tags 2011-10-04 17:15:08 +00:00
Mark Vejvoda 8729c32b68 - bugfix AI, no longer try to build a farm type unit if the faction does not have a unit that is able to build it yet
- new optional feature added to tell each faction some basic info regarding which units should take priority when building,producing and morphing
2011-10-04 06:49:44 +00:00
Mark Vejvoda d44959d69c - phase 1 of cppcheck verbose fixes 2011-08-31 23:10:43 +00:00
Mark Vejvoda 2c80543889 - attempt to group command execution so units given the same command at the same time will work more smartly (closer units go first and so on) 2011-07-05 04:37:35 +00:00
Titus Tscharntke 7344250c5c well formatted change from 2367 again 2011-06-24 16:18:10 +00:00
Titus Tscharntke 1de2d5340d revert to 2366 2011-06-24 16:14:39 +00:00
Titus Tscharntke e58ddd35b4 fixes build bug reported in forum/ adds some better mega-cpu behaviour / fixed some bugs ( I hopefully did not added new ones :-D ) 2011-06-20 23:51:13 +00:00
Mark Vejvoda 070b8b76e6 - more AI enhancements to better handle repair and build positions 2011-05-01 07:24:37 +00:00
Mark Vejvoda efc6b7ee1d - ensure a good number of AI workers particpate in the repairing of castles 2011-05-01 06:02:49 +00:00
Mark Vejvoda f71f83d2b8 - bugfix for AI repairing fixes a long standing legacy bug where the AI never repaired units with a cell map starting with a 0 at the first x,y in the cellmap (like magic faction). 2011-05-01 05:36:04 +00:00
Mark Vejvoda ae9d20a6cf - bugfix for new AI repair logic to properly detect damaged castle type units 2011-05-01 03:23:15 +00:00
Mark Vejvoda c979ea1254 - more AI enhancements, now units that harvest AND attack will be more wise when choosing to attack, (think persian) since they need to harvest more than they need to attack when harvester count is very low.
- AI Units now place higher priority on repairing 'castle' style units when looking for something to repair.
2011-04-29 23:42:16 +00:00
Mark Vejvoda d297a68b36 - bugfix for AI players to ensure the unit they want to repair has another unit that is able to repair it before trying to repair a damaged unit so the AI doesn't waste time. 2011-04-29 05:37:35 +00:00
Mark Vejvoda d8c337ae7b - bugfix for resource usage checking
- added new techtree validation in validation report to tell if a techtress has resources that are ununsed by the techtree
2011-04-06 17:50:20 +00:00
Mark Vejvoda 99f7038a86 - added logic for AI players to ignore resources that they cannot harvest and are not unit requirements. 2011-04-06 15:44:33 +00:00