Commit Graph

199 Commits

Author SHA1 Message Date
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
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
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
8e88b36723 - removed pathfinder from GAE and all references 2012-09-22 21:39:13 +00:00
Mark Vejvoda
871b6c4a6e - removed deprecated 'fast' pathfinder that wasn't fast enough and is not going to be used 2012-09-22 21:05:06 +00:00
Mark Vejvoda
e0bf4df646 - cppcheck round #2 cleanup 2012-09-22 20:37:42 +00:00
Mark Vejvoda
1c211e4ce6 - lots of code cleanup from the cppcheck 2012-09-22 20:13:57 +00:00
Mark Vejvoda
b1cc8592fd - deprecated the ini setting: EnableFastPathFinder 2012-09-22 17:51:42 +00:00
Mark Vejvoda
5458f7abb4 - units now use a random # from 10-20 cells to determine how often they refresh their path 2012-05-12 01:06:55 +00:00
Mark Vejvoda
dc270fbbaa - rollback the last pathfinder change its no good 2012-05-12 00:50:15 +00:00
Mark Vejvoda
ef39f93457 - try to speed up water rendering a bit, but especially pathfinder 2012-05-12 00:01:05 +00:00
Mark Vejvoda
2d6cda1f6f - more pathfinder tweaks to try improve performance 2012-05-09 23:56:14 +00:00
Mark Vejvoda
ee6eed20a2 - fixed the build on windows 2012-05-07 01:37:43 +00:00
Mark Vejvoda
1b2b1f9821 - improved the new pathfinder using hashmap 2012-05-05 06:23:09 +00:00
Mark Vejvoda
f79222defa - more pathfinder in progress changes, nothing to test yet 2012-05-05 04:38:49 +00:00
Mark Vejvoda
3ff0796bec - some in progress pathfinder work 2012-05-04 21:03:52 +00:00
Mark Vejvoda
85f98e8f55 - added ini setting to enable new pathfinder (its off by defualt now).
EnableFastPathFinder=true
2012-05-04 16:48:14 +00:00
Mark Vejvoda
771ff91c1c - added a new pathfinder to test to see if it performs better than the old one 2012-05-04 14:57:59 +00:00
Mark Vejvoda
897346d1f5 - added the beginning work to support translatable techtrees 2012-05-02 20:46:47 +00:00
Mark Vejvoda
2c8b1739e5 - removed printf's as they slowed down pathfinding 2012-05-01 05:12:38 +00:00
Mark Vejvoda
624237ed47 - attempt to tweak the pathfinder a bit for performance when units are consistently having a hard time pathfinding we scale back their max cell count used in pathfinding until they have better success in pathfinding 2012-04-29 04:45:51 +00:00
Mark Vejvoda
b8fb60b325 - speed up the pathfinder a bit 2012-04-21 03:42:25 +00:00
Mark Vejvoda
dbb116f250 - load of changes to get things compiling under VC++ 2010 (with updated deps seperate for vc2010) 2012-04-20 01:04:05 +00:00
Mark Vejvoda
6e7d4aeec5 - speed up some heavily used functions 2012-04-17 07:51:45 +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
7f0b439d5d - some initial work for pathfinder changes (nothing enabled yet)
- added savegame info for network games to start thinking about how to allow players to reconnect to a network game.
2012-04-13 20:20:40 +00:00
Mark Vejvoda
c1f617481e - bug fixes for load saved game (now fixes loading on windows) and corrects memory bug for loading saved games on all platforms. 2012-04-04 15:36: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
2f885406e0 - added logic to delay AI player from path finding more than 10 units per frame (we make him think he is blocked and he will retry another frame) 2012-03-31 19:50:45 +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
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
5d6b73517f - fixed crash in AI on close 2012-03-17 21:29: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
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
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
66f44ff7c4 - more cleanup from cppcheck (using eclipse plugin now) 2011-12-02 17:46:02 +00:00
Mark Vejvoda
d33e1174a5 - bugfixes related to cppcheck report
- bugfixes found using valgrind (memory leaks)
2011-12-02 16:07:59 +00:00
Mark Vejvoda
6aa079390d - try to avoid a hang when multiple runtime errors occur at the same time.
- attempt at small speed boost in pathfinder
2011-10-05 21:46:41 +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
77a2fa7d48 - getting fanatical about memory cleanup so that valgrind output is more useful 2011-09-30 23:55:07 +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
21005cc1e7 - in headless mode skip call to set window icon 2011-09-27 17:15:56 +00:00