Commit Graph

71 Commits

Author SHA1 Message Date
SoftCoder 865a665bf0 - round 2 of cppcheck code cleanup 2017-10-09 20:21:14 -07:00
SoftCoder 26581a77d2 - first round of cleanup from cppcheck report 2017-10-09 19:09:36 -07:00
titiger 97d4023d92 unit must be placed in center of faked size square 2016-12-10 21:10:38 +01:00
titiger cd8530f69e new tag <ai-build-size> 2016-12-10 16:01:26 +01:00
SoftCoder 56494f3cd2 - finally fixing issue #102 (bad cell visible handling when fog of war turned off) 2016-05-27 16:15:27 -07:00
SoftCoder ed6f169d97 - attempt to see if this helps deal with oos when fog of war off 2016-05-23 09:51:50 -07:00
SoftCoder 7e0494bb28 - some bug fixes based on coverity scan 2015-11-25 21:16:29 -08:00
titison 850a9a7dc0 -AI can't command non-commandable units anymore
-Removed non-selectable
2014-08-07 21:00:27 +02:00
SoftCoder b9d6b38e8f - coverity based bug fixes - round #1 2013-12-13 23:04:12 -08:00
Mark Vejvoda 66761ba760 - code cleanup based on additional gcc warnings 2013-11-19 06:42:32 +00: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 856e6fd88e when using team switch, AI player will now always answers YES if he already lost the game 2013-11-10 04:26:20 +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 0ead6a36dc full support for translated techtrees 2013-06-13 08:55:48 +00:00
Mark Vejvoda 2c1b181bc7 a bunch more code cleanup from cppcheck 2013-05-26 06:03:32 +00:00
Titus Tscharntke 4e6e96b125 AI scouting switched back to something we had before "THE BUG" 2013-02-12 21:17:21 +00:00
Mark Vejvoda 9bc6d33f1d - bug fixes to stabilize the windows build 2013-02-09 06:57:05 +00:00
Mark Vejvoda cfb9b61168 - rollback AI so nig can test anarchy bug 2013-02-06 23:58:49 +00:00
Titus Tscharntke 3ea6a02d95 no return in void methods 2013-02-05 22:00:50 +00:00
Mark Vejvoda b2be14ca33 - updated the AI's scouting logic
- updated from transifex
2013-02-05 06:56:59 +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 d02f91d2e0 - bugfix for AI not using correct build spacing 2013-02-03 23:29:16 +00:00
Mark Vejvoda 1a49588a45 - added smarts to the AI so it takes note of very active battle locations and scouts there. 2013-01-12 01:55:13 +00:00
Mark Vejvoda 1dbcabf12c - minor feature request added from sourceforge, when command given cannot be executed, sometimes we show the requirements of the command so the user knows why it failed 2012-11-10 19:39:55 +00:00
Mark Vejvoda 5c15a0e9f4 - cast to unsigned int for all calls to srand 2012-10-30 17:12:04 +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 c5ac0cc8e3 - fix min player for headless game message 2012-10-06 17:50:27 +00:00
Mark Vejvoda c39da4cd69 - code cleanup from cppcheck 2012-10-06 02:10:23 +00:00
Mark Vejvoda 4e195e10af - updated random seed generation to be more random 2012-09-27 06:42:57 +00:00
Mark Vejvoda 897346d1f5 - added the beginning work to support translatable techtrees 2012-05-02 20:46:47 +00:00
Mark Vejvoda c8fdc9269f - fix win32 build
- cleanup a lot of win32 compiler warnings
2012-04-16 20:15:57 +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 a23a9396c2 - added new over-ridable minimum spacing between buildings for the AI player 2012-04-02 16:11:13 +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 bb44cfdb7b - cleaned up some constants in prep for allowing override of more things in the AI 2012-03-30 21:56:15 +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 c5331b7e8a - initial work to save game state to XML. Current only saves when out of synch or game end occurs and saves to same folder as log files and file is called: megaglest-saved.xml
(Currently we store way too much info but this is a starting point)
2012-03-10 03:27:25 +00:00
Titus Tscharntke 780cb81324 wherever you try to hide yourself, ultra cpu will find you too now after a while :-D ..... 2011-09-27 21:51:29 +00:00
Mark Vejvoda 7d53df698a - added new in-game popup menu and new ability to switch teams in game (turned off by default in advanced settings) 2011-09-21 06:51:28 +00:00
Mark Vejvoda bb68106912 - phase 3 of cppcheck verbose fixes 2011-09-01 18:08:56 +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 6fdc8db138 switching off random pathfinding intervals becasue it causes unit "warping" while walking ( more see forum ) 2011-06-26 23:51:37 +00:00
Titus Tscharntke 105e639bd8 Mega also scouts to random ressource places .Only first tech type ressource is used to navigate now (which is typically gold) more improvement needed regarding this aspect ;pathfinder back to 900 2011-06-25 18:14:20 +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 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 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
Mark Vejvoda 3ed636aae2 - fixes for some threading shutdown bugs
- We now display when a screenshot is taken in game showing an ingame console message
- Updated AI to attack closest attackers
- Updated found enemy to be closest attacker
2011-03-28 21:04:47 +00:00