1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-11 01:10:26 +02:00
Commit Graph

193 Commits

Author SHA1 Message Date
da117e9255 Code style: remove void from constructors without arguments 2018-01-13 11:51:47 +03:00
805b5215de Client threading tweak 2017-11-16 14:15:43 +03:00
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
09df2dcfbb fixed possible race condition 2017-07-12 19:40:14 +03:00
2c525fc76e Attempt to fix headless tests crash. 2017-07-12 17:02:25 +03:00
bd27636cd9 Merge pull request #316 from FeniksFire/improvingTheBattle
Refactoring.
2017-06-28 19:55:03 +03:00
4113bdab01 Moving some files from lib to the battle subdirectory. 2017-06-26 15:26:08 +02:00
eeff7ee315 Few minor code improvements
* All command line options now case insensetive.
* SDL_VIDEO_X11_DGAMOUS unused in SDL2 so it's removed.
* Added current year into the --help output for client and server.
* Moved DO_NOT_START_SERVER into session settings.
2017-06-26 04:56:28 +03:00
1a60c1a94b Shared memory refactoring and command line control options
Now client accept following options:
 --disable-shm - disable shared memory usage
 --enable-shm-uuid - use UUID for shared memory identifier
UUID is useful when a lot of clients starting simultaneously.
Needed for testing and was easier to implement than alternatives.
2017-06-06 07:30:16 +03:00
18161d3688 Client: implement spectator mode via command-line options
If running with --spectate/-s CPlayerInterface will appear even without human players.
Following command-line options also available:
 --spectate-ignore-hero
 --spectate-hero-speed=N
 --spectate-battle-speed=N
 --spectate-skip-battle
 --spectate-skip-battle-result
Boolean options can also be changed in runtime via client console:
 set spectate-ignore-hero on / off
Spectator mode also:
 - Work with --onlyAI option when starting game or loading saves.
 - Allow to use any cheat codes.
 - Give recon on towns and heroes.
2017-06-06 07:30:16 +03:00
d95c74941b Client: add onlyAI option support for saved games
When --onlyAI option used all human players will be replaced with AIs during loading.
2017-06-06 07:30:16 +03:00
6642816b1e Client: server port and testing options cleanup
Now we only pass port as ui16 instead of std::string
2017-06-04 08:49:23 +03:00
5b76c3f4eb Rebase of codebase changes for refactored serializer
Some of newer fixes not yet merged there and save compatibility a bit off.
2016-10-27 18:12:20 +03:00
4bcc43d3d0 Fix Mantis #2234
CPlayerInterface instances were removed from CClient::playerint with
clear() and finish() was not called on each. Added multiple insurance.
2016-10-22 16:22:00 +02:00
23b7a803b6 cleanup 2016-10-01 20:07:36 +03:00
1cbe9e1b8b Client: add donotstartserver option. Alternative way to start a game
Option is useful for server profiling also let me test MP over network and much more.
Also there is issues with boost::interprocess on some systems under Windows and this is the way to bypass them.
2016-09-16 20:01:44 +03:00
ef05a56e49 cleanup 2016-08-30 05:13:45 +03:00
9fd1cff090 Refactoring: always use std prefix for shared_ptr, unique_ptr and make_shared
Long time ago it's was used without prefix to make future switch from boost to std version easier.
I discusses this with Ivan and decide to drop these using from Global.h now.

This change wouldn't break anything because there was already code with prefix for each of three cases.
2015-12-29 05:43:33 +03:00
e4b1ef1405 Add "override" to virtual overriden methods 2015-10-13 21:05:36 +03:00
e82dfb5a85 fixed mantiss 0002254 2015-09-04 18:08:25 +03:00
21aaad6972 MoveHero: add transit movement option
Transit is new option for hero movement. If it passed for movement then hero can get get on tile without visiting of object on it.
Currently it's will be only allowed is object under destination is teleport.
2015-03-08 17:04:09 +03:00
25656aa586 Add showTeleportDialog everywhere except actual code for AI and player
Just like TeleportDialog it's based off showBlockingDialog, but as number of package is higher when possible showTeleportDialog will be after other dialogs handling code.
2015-03-08 16:52:50 +03:00
2b88a914ff Fix client build
* use regular overloaded methods for client serialization.
(serialize template not needed if connection.h already included and save/load code is different)
2014-12-21 22:33:20 +03:00
41da0ad2e6 multiplayerload changes (committing so I can revert...) 2014-10-25 19:05:49 -04:00
cfa6f46d62 VERY buggy, unusable, but progress is being made... 2014-10-25 19:05:49 -04:00
6c0c03d74b Refactoing of pathfinder <-> client/AI interaction to remove dependency on selected hero
- finished removal of server-side setSelection
- disabled some broken code (AI & cheats). TODO: fix
2014-09-21 16:42:08 +03:00
78709e223b Breaking things - trying to remove server-side knowledge of selected objects 2014-09-19 00:18:49 +03:00
731aedf3a1 Split CIntObjectClasses into multiple smaller files. This should be the last change in files 2014-07-15 10:14:49 +03:00
a0689fa377 Refactoring of hoverText from objects:
- removed hoverText field
- split getHoverText() method into 3:
- - getObjectName() for generic name
- - getHoverText(Player) for player-specific text
- - getHoverText(Hero) for hero-specific strings
2014-06-24 20:39:47 +03:00
ad632d1e8a Moved FoW management from CGObjectInstance to callback 2014-06-24 20:39:47 +03:00
2b45e13c5c c++03 -> c++11 switch:
- use std versions of function, bind and ref
- OVERRIDE -> override
- NULL -> nullptr
- use std versions of random distributions

NOTE: this may be last revision that supports gcc-4.5
2013-06-26 11:18:27 +00:00
17403b544c Various fixes for quick combat.
Replaced several boost::bind usages with lambdas.
2013-06-23 16:09:15 +00:00
4a0587d500 More work on auto-fight.
Dynamic libraries return smart-pointers to what they create.
2013-06-22 21:47:51 +00:00
2be2143844 Game interfaces can register another interfaces to receive info on game events. 2013-06-22 18:22:44 +00:00
254f194220 Some very early work towards autofight feature.
Added EmptyAI to the solution.
Passing callbacks by shared_ptr.
2013-06-22 14:47:20 +00:00
f95e6c233b It is possible to set on visit query that object is to be removed after visit is over.
Fixes #1263.
2013-05-14 13:42:52 +00:00
5c2473d436 Support for saving/loading in player interfaces, including VCAI.
Minor changes.
2013-05-09 11:09:23 +00:00
e8354908c3 Big change: Introduced new mechanism to handle queries. It should not cause any visible changes ATM apart from fixing several long-standing bugs realted to handling post-visit/battle/levelup callback, including infamous creature bank issues: #955, #1053, #1063, #1191. Needs testing.
Minor changes:
* default log level set to trace
* LOG_TRACE raii guardian lifetime will last till the end of block
* compile fixes
* minor refactorings
2013-04-20 11:34:01 +00:00
dbec99ffc7 * PlayerColor and TeamID refactoring 2013-03-03 17:06:03 +00:00
602827d1ae * MSVC compilation fixes
* campaign epilogues and minor fixes
2013-02-23 19:16:14 +00:00
d45a554fec Significant changes to saving system. Now both client and server store their lib part.
Desync detection upon loading. Fixed many desyncs. (more remain)
Monsters won't have creature count 0 even if that is set as creature properties.
2013-02-18 22:37:22 +00:00
9e00090c42 * refactoring, a few intriguing problems remain 2013-02-13 23:55:42 +00:00
bda766b697 * refactoring 2013-02-12 19:49:40 +00:00
86dc9386d6 * refactoring, including a generic solution for IDs 2013-02-10 23:24:57 +00:00
0003d30991 * refactoring 2013-02-08 22:42:46 +00:00
9dd60b6dbe * refactoring
* moat damage went to config file
2013-02-08 21:17:39 +00:00
af5287c193 * fixed opening custom campaign selection window
* artifact positions refactored
* vstd::advance allows moving between enum values
2013-02-06 23:24:43 +00:00
25663ce7af * fixed vector<bool> serialization
* refactoring
2013-02-04 19:43:16 +00:00
8769f67c5d * JsonReader can convert to enums
* refactoring
2013-02-03 21:05:44 +00:00
8e3de98059 * restoring campaign features
* minor improvements
2012-09-21 17:59:54 +00:00