Commit Graph

470 Commits

Author SHA1 Message Date
Mark Vejvoda
a0b87ba7eb attempt to see if this fixes out of synch 2013-05-23 23:55:28 +00:00
Mark Vejvoda
a94787654d attempt to see if this fixes out of synch 2013-05-23 23:52:46 +00:00
Mark Vejvoda
cd2177fc1e attempt to see if this fixes long standing out of synch bugs 2013-05-23 00:33:30 +00:00
Mark Vejvoda
5b664fb1a2 - bugfix for transifex tutorial download files now loaded into UI
- updated each thread to provide its name
2013-05-21 20:28:42 +00:00
Mark Vejvoda
5cfc4d07a0 added logging of threaded unit actions 2013-05-21 05:43:57 +00:00
Mark Vejvoda
f98d9fdddc attempt to see if this corrects out of synch, i COULD NOT reproduce the out of synch with my winxp and linux 64 systems, perhaps titi had different ini values between linux and windows? 2013-05-21 00:38:35 +00:00
Mark Vejvoda
418d4bed0b more logs to track out of synch 2013-05-20 22:54:07 +00:00
Titus Tscharntke
218c540bea In graphics option new screenmodes are "tested" now.
Animate only a given number of objects in tilesets.
2013-05-19 12:30:10 +00:00
Mark Vejvoda
8fd82a4f7d add more world synch logging and disabled potentially dangerous ini properties that were still referenced in the pathfinder to see if this was the cause of out of synchs (due to old settings that affected the pathfinder) 2013-05-19 05:16:21 +00:00
Mark Vejvoda
8408526b12 code cleanup based on cppcheck results 2013-05-17 03:59:34 +00:00
Mark Vejvoda
0c9679b8b2 some code cleanup 2013-05-17 02:14:43 +00:00
Mark Vejvoda
bca6b5a8fb better logging of unit movement header and footer info 2013-05-17 01:32:29 +00:00
Titus Tscharntke
883cfbbd27 Default for twoFrameAnimation smoothing is false. 2013-04-17 00:56:04 +00:00
Titus Tscharntke
88e2756ac2 new switch for animated tileset objects with only two animation frames: smoothTwoFrameAnim="true".
( std::sin was used with intention, no need for streflops in this case )
2013-04-17 00:12:54 +00:00
Mark Vejvoda
ac992b431d - attempt to fix threaded client stability and fixed some server side network bugs to also improve its stability 2013-03-09 20:57:06 +00:00
Mark Vejvoda
aec3ff1f63 - bugfix for restoring explorations on loading a saved game 2013-03-06 15:02:17 +00:00
Mark Vejvoda
c63da54bbd - attempt to improve performance when units are blocked badly (this is not backwards compatible with other builds, will create out of synch) 2013-02-22 06:52:51 +00:00
Mark Vejvoda
286dc58aa6 - bugfix for unit sight on game load 2013-02-19 07:13:49 +00:00
Mark Vejvoda
8916a86b8c - bugfixes for load / save game for in progress joining 2013-02-19 06:41:56 +00:00
Mark Vejvoda
69925fb887 - bugfixes for joining network games 2013-02-19 04:53:24 +00:00
Mark Vejvoda
54c026bb3e - bugfixes for in game joining 2013-02-17 07:15:01 +00:00
Mark Vejvoda
9d19ff2b57 - added the first draft of joining games in progress 2013-02-15 18:25:10 +00:00
Mark Vejvoda
646d11f143 - if unit harvests a resource, stops and harvest the same type again they do not need to return to the store house 2013-02-12 21:51:25 +00:00
Mark Vejvoda
589962868b - added ability for units to return harvested resources in an emergency by clicking a store house when a unit has a load 2013-02-12 08:44:12 +00:00
Mark Vejvoda
a71c3d239f - added unit auto repair a buidling if the meeting point is on that building 2013-02-12 03:41:59 +00:00
Mark Vejvoda
9bc6d33f1d - bug fixes to stabilize the windows build 2013-02-09 06:57:05 +00:00
Mark Vejvoda
adc62b7df8 - updated code to protect against null pointers and uninitialized values and threading issues 2013-02-05 00:01:40 +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
d9fac85d21 - added more debug logging 2013-01-27 07:26:35 +00:00
Mark Vejvoda
93438d42f4 - attempt to see if this fixes units that do not attack when right clicking enemy
- see if this fixes crashes when using color picking
2013-01-23 21:03:00 +00:00
Mark Vejvoda
7ecc7325ac - trying to trace nig's crash (more debug info and safer code) 2013-01-23 14:51:28 +00:00
Mark Vejvoda
51a0b50bc2 - applied changes from Muwuum for full translatable game experience 2013-01-16 21:16:59 +00:00
Mark Vejvoda
69a15d4544 - added a new skill to toggle fog of war for any command. 2013-01-11 18:40:47 +00:00
Mark Vejvoda
7b99501697 - added a new skill to toggle fog of war for any command. 2013-01-11 18:18:58 +00:00
Mark Vejvoda
5d2066fdbb - added a new thread manager to try to see if it takes less CPU cycles while the thread controller waits for slaves to do their work. To enable the experimental thread manager set: EnableNewThreadManager=true 2013-01-10 21:16:28 +00:00
Mark Vejvoda
b14167d209 - small fix for fog of war cache 2013-01-04 20:35:38 +00:00
Mark Vejvoda
b96eba3829 - a better way to cache fog of war and use much less memory 2013-01-04 18:00:51 +00:00
Mark Vejvoda
1f49886755 - re-enabled fog of war cache to improve performance
- improve xml file loading speed
2013-01-03 17:30:59 +00:00
Mark Vejvoda
3997bafa2f - do not show burn particles on attack boost if the boost is not decreasing the hp 2012-12-29 01:01:14 +00:00
Mark Vejvoda
63e3313e6b - bugfix for attack-boosts on morphed units 2012-11-22 01:52:01 +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
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
64058b17e7 - code cleanup from cppcheck
- added more checks when loading models, maps and textures
2012-10-20 07:15:13 +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
c39da4cd69 - code cleanup from cppcheck 2012-10-06 02:10:23 +00:00
Titus Tscharntke
3db7d017e3 removed camera stuff from unit and the camera following a unit is much more smooth now. ( Not finished, work in progress ) 2012-09-26 00:15:37 +00:00
Mark Vejvoda
9e75b9144c - removed cell marker from popup menu and moved to hotkeys (f2 add f3 remove)
- added a new experiemntal feature called 'follow unit'. select 1 unit then press f4 and when the unit moves the camera tries to look from the units perspective. To turn this off select no unit and press f4.
2012-09-24 17:13:27 +00:00
Mark Vejvoda
8e88b36723 - removed pathfinder from GAE and all references 2012-09-22 21:39:13 +00:00
Mark Vejvoda
1c211e4ce6 - lots of code cleanup from the cppcheck 2012-09-22 20:13:57 +00:00
Titus Tscharntke
5b6ffbd361 again new morphing feature: better way to handle the blocked places for morphing units 2012-09-21 23:45:59 +00:00
Titus Tscharntke
00c9a4c15c hopefully last bugfix for new reserved morph space feature. 2012-09-21 00:21:23 +00:00
Titus Tscharntke
4f19451a6a dying units did not clear their fields the way it was meant :) 2012-09-14 23:46:01 +00:00
Titus Tscharntke
ed91a7c59b morph with blocking places works now. I still want to cleanup this after some discussion with softcoder ( some things marked with TT ) 2012-09-13 21:50:07 +00:00
Titus Tscharntke
75032c3287 reserve unit place while morphing. (first try) 2012-09-11 21:16:24 +00:00
Mark Vejvoda
0f5cb29919 - build silhouette now uses team colour and you see all team players building placement
- improve performance when rending cell markers
2012-06-22 13:30:15 +00:00
Mark Vejvoda
acc2a5f9c9 - show light green with alpha silhouette of building when unit is moving to a location to build another unit 2012-06-22 04:58:44 +00:00
Titus Tscharntke
ca39f8c6b1 new try with changed fighting behaviour of ultra and mega;
fix for "*" in chat
2012-06-04 21:53:20 +00:00
Mark Vejvoda
345b2e670b - added local mg version label to custom game menu 2012-05-12 02:21:21 +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
2d6cda1f6f - more pathfinder tweaks to try improve performance 2012-05-09 23:56:14 +00:00
Mark Vejvoda
3ff0796bec - some in progress pathfinder work 2012-05-04 21:03:52 +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
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
aa831dbb61 - inlined a few more functions 2012-04-17 15:25:31 +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
3b8dd289ac - updated cmake to check for support of backtraces in gcc compiler
- fixed numerous bugs / warnings from cppcheck
2012-04-16 19:29:37 +00:00
Mark Vejvoda
a37dc8a7b3 - fix headless server crash due to new call to setgama in headless mode
- a few code optimizations to start to improve performance
2012-04-16 06:14:10 +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
9aca26a0f0 - bugfix for unit selection segfault on game exit
- added thread hardening to try to ensure we never try to delete a thread more than once.
2012-04-12 20:43:19 +00:00
Mark Vejvoda
76c3fa1949 - fixed segfault when a unit is selected and they die (this is a long standing bug and not related to savegame) 2012-04-12 15:38:53 +00:00
Mark Vejvoda
22f43f4267 - added new lua method for setting the direct position of a unit (can be used for teleporting):
setUnitPosition(int unitId, Vec2i pos)
2012-04-11 05:41:40 +00:00
Titus Tscharntke
4aae520da6 Highlighting rendering without cycling through all units each frame ... 2012-04-04 22:57:32 +00:00
Titus Tscharntke
6c12bfbec8 Improved resource object selection implementation which allows highlight effects now too.
Generally changed highlight effect to something more obvious
2012-04-04 00:30:16 +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
Titus Tscharntke
d8ba2443cf new switches "count-unit-death-in-stats", "count-unit-production-in-stats" and "count-unit-kill-in-stats" for unit.xml ( allows better "resource" production for example ) 2012-03-30 23:38:05 +00:00
Mark Vejvoda
45b92f4316 - allow for a scenario based faction to be 'neutral' by specifying a team # of 9
- added some new lua methods:
networkShowMessageForFaction(text,header,int factionIndex)
networkShowMessageForTeam(text,header,teamIndex)
2012-03-30 05:53:33 +00:00
Mark Vejvoda
af5c38b4c4 - fixed save / load of fire particle when unit is burning 2012-03-30 03:20:33 +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
163271203d - tilesets now support animated models:
<model path="models/copter_sit.g3d" anim-speed="190"/>
2012-03-26 23:24:29 +00:00
Mark Vejvoda
98351fedba - bugfix when morphing, do a level check to see if the morphed unit should have its level updated based on current kills 2012-03-25 20:38:05 +00:00
Mark Vejvoda
bc3cc07aba - corrected multiple model processing based on hp
- fixed cmake scripts (thanks Andrew Clarke)
- fixed streflop files to ignore softfloats if not used during build
2012-03-24 18:30:49 +00:00
Mark Vejvoda
a7e45eb354 - added the ability to record all game command to a replay file. To test saving / loading games from a replay file, add this to glestuser.ini:
SaveCommandsForReplay=true
2012-03-20 04:53:26 +00:00
Mark Vejvoda
b481fbcbb5 - proper save and restore for particles 2012-03-19 21:35:54 +00:00
Mark Vejvoda
6571281a48 - proper restore of meeting point 2012-03-17 22:08:04 +00:00
Mark Vejvoda
8d5de12d42 - added some particles to load game logic 2012-03-14 07:23:41 +00:00
Mark Vejvoda
4481151c5b - check if unit is dead when loading game and do NOT set cell map for dead unit 2012-03-13 23:51:39 +00:00
Mark Vejvoda
d4ca1c36cb - fixed some particle issues 2012-03-13 23:18:09 +00:00
Mark Vejvoda
0ea22572dd - fix ally list when loading games 2012-03-13 23:10:48 +00:00
Mark Vejvoda
aa93999dce - fixed map placement when loading untis from file 2012-03-13 22:55:11 +00:00
Mark Vejvoda
d1a0eeca2e - check for null for particles 2012-03-13 22:37:47 +00:00
Mark Vejvoda
917adc8c98 - bugfix for game save and load (string buffer was too small for one item) 2012-03-13 21:58:31 +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
e3fde99359 - fixed gamma correction so it works now
- added more state when loading saved game
2012-03-13 01:34:14 +00:00
Mark Vejvoda
9271d7d7f6 - initial loading logic for loading of saved games.
- currently we always save the game during out of synch or on game quit.
- added a new commandline option to load the last saved game, this doesn't do much yet, just creates units in the map locations they were when the game was saved
./megaglest --load-saved-game
2012-03-12 23:08:22 +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
4ad42518c0 - updated for better handling of streflop on different platforms
- attempt for bugfix on windows when socket send buffer is continuously full
2012-02-10 06:21:06 +00:00
Mark Vejvoda
c11266d529 - fix custom player colors for mods 2011-12-14 23:01:13 +00:00
Mark Vejvoda
157c052a82 - allow mod's to change player colors 2011-12-14 22:42:38 +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
2dd2afb296 - changed selection code to use color picking, can disable using new ini setting:
EnableColorPicking=false
2011-12-13 01:30:52 +00:00
Mark Vejvoda
609bc528d2 - fixed fog of war bug in map preview for connected client
- in headless mode keep three caches in case its related to out of synch
- comment out spurious irc console text
2011-12-03 01:19:54 +00:00
Mark Vejvoda
01ea0787a3 - a few more updates to cut down on RAM use for headless server 2011-12-03 00:39:03 +00:00
Mark Vejvoda
8bdf863636 - cleanup of masterserver global flag
- attempt to cut down on resources required for masterserver mode to minimize RAM
2011-12-02 22:04:02 +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
Titus Tscharntke
1cd6520335 fast commands only for fighting / no regeneration when in "be_build" state 2011-11-29 00:54:38 +00:00
Mark Vejvoda
21d06fd386 - bugfix for hp regeneration (Thanks for pointing this out Ishmaru) 2011-11-28 06:25:20 +00:00
Mark Vejvoda
03a7a72ef5 revert network code back to beta1 code 2011-11-27 05:27:50 +00:00
Mark Vejvoda
fbb3f0b8e5 - faction threads now use semaphores to signal completion lowering cpu use on main thread 2011-11-26 23:11:33 +00:00
Mark Vejvoda
3cdf50c399 - a load of bugfixes including:
- proper handling of invalid client connects, after 6 bad attempts in a 60 second period of time the IP address is blocked from the current game
  - Added check for invalid particles for tileset objects
  - Made messagebox wider in game mod menu
  - Fixed numerous threading issues discovered while testing on my 8 core CPU
  - a Little bit of rendering cleanup
2011-11-23 08:00:09 +00:00
Mark Vejvoda
2d367bd26e - added new lua functions from Muwum:
new events:
    unitAttacked
   unitAttacking
 
   methods:
   lastAttackedUnitName()
   lastAttackedUnit()
   lastAttackingUnitName()
   lastAttackingUnit()
   giveKills(unit,amount)
2011-11-16 21:38:12 +00:00
Mark Vejvoda
0039354c15 - added name to attack-boosts and shared attack boosts per unit type 2011-11-11 04:17:55 +00:00
Mark Vejvoda
0b62b4137e - added a validation / warnhing logic to handle cases of duplicate resource values entered in XML 2011-11-10 22:36:44 +00:00
Mark Vejvoda
1e34bc66c1 added a detailed error message to try to hunt down a bug discovered by Elimnator 2011-11-10 21:00:50 +00:00
Mark Vejvoda
0b511efe36 bugfix for particles, proper checking for valid particle states when using particles 2011-11-05 05:45:02 +00:00
Mark Vejvoda
0f6e8ba928 attempt to bugfix attackboost segfault discovered while playing vs Romans 2011-10-30 06:12:40 +00:00
Mark Vejvoda
ca45749cd8 see if this fixes command transitions issues outstanding 2011-10-28 22:49:00 +00:00
Mark Vejvoda
64eeba93cb bugfix for command transition not properly resetting status 2011-10-28 04:37:10 +00:00
Mark Vejvoda
4223567f2b attempt to fix weird command transition behavior 2011-10-28 04:17:26 +00:00
Mark Vejvoda
421e38cab4 cleaned up the code a bit for the command transition 2011-10-28 01:22:36 +00:00
Mark Vejvoda
b08516e7de fixed command transition choppiness 2011-10-28 01:11:42 +00:00
Mark Vejvoda
fdb2b65bf7 make transition to new command less choppy 2011-10-28 00:51:01 +00:00
Mark Vejvoda
f2e497f855 bugfix for switching to another command should be immediate and not wait until the current skill in finished 2011-10-28 00:22:03 +00:00
Mark Vejvoda
c6fe352da7 disabled 'grouped' commands to see if this is the cause of out of synch (try this out guys) 2011-10-26 00:30:58 +00:00
Mark Vejvoda
b1ed59959e - bugfix so player who dies and becomes an observer can hear sounds from other players units 2011-10-12 16:03:55 +00:00
Mark Vejvoda
e25e925ff0 - bugfix for ep regen being done twice per tick 2011-10-12 02:46:31 +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
aed293bba2 - fixed a bunch of memory leaks that will hopefully mean less overall memory requirements. 2011-09-28 06:57:42 +00:00
Mark Vejvoda
21005cc1e7 - in headless mode skip call to set window icon 2011-09-27 17:15:56 +00:00
Mark Vejvoda
2a86cb4f7d - added support for proper quiting and console input/output in headless mode. Type: quit followed by return into the console to properly shutdown in headless mode. 2011-09-27 10:16:09 +00:00
Mark Vejvoda
9caff9dac3 - in headless mode avoid init of sdl's video surface so that we stay in console window (no graphics window shown) 2011-09-27 07:01:08 +00:00
Mark Vejvoda
c68aa74fcf - more updates for headless mode (try to avoid using opengl completely), server now runs at around 20 MB RAM at game start. 2011-09-27 05:29:57 +00:00
Mark Vejvoda
ebc174be03 - cleanup some compiler warnings 2011-09-25 04:09:54 +00:00
Mark Vejvoda
ece2927350 - attempt to fix command grouping 2011-09-25 04:07:59 +00:00
Mark Vejvoda
42bbbd2e42 - trying to bugfix crashes with grouped commands 2011-09-23 18:54:35 +00:00
Mark Vejvoda
72c12a3459 - another attempt to fix command grouping bug (its now turned on be default again), please test for crashes or out of synch 2011-09-22 20:42:06 +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
15cad68faf - attempt to fix a segfault in grouped units 2011-09-09 20:30:13 +00:00
Mark Vejvoda
41dfe298d3 - re-enable grouped commands for better unit moving (was previously causing out of synch but i think it works properly now) 2011-09-09 17:49:10 +00:00
Mark Vejvoda
bb68106912 - phase 3 of cppcheck verbose fixes 2011-09-01 18:08:56 +00:00
Mark Vejvoda
57afc2d715 - phase 2 of cppcheck verbose fixes 2011-09-01 01:11:23 +00:00
Mark Vejvoda
d99a8236ae - added the ability to synch unit particles with model animation using start-time and end-time attributes 2011-08-27 06:52:17 +00:00
Mark Vejvoda
7bc9394e85 - fixed some bugs around hp regeneration and attack-boost 2011-07-22 20:06:48 +00:00