1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-30 08:57:00 +02:00
Commit Graph

299 Commits

Author SHA1 Message Date
Alexander Shishkin
7e1b0d71c5 Added option for saving generated maps on client side (#307)
* new configuration option 'general.saveRandomMaps'
* maps being saved to 'userCachePath/RandomMaps'
* no deletion of old random maps
* map filename generated based on template name and random seed
2017-06-04 20:33:28 +03:00
Arseniy Shestakov
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
Arseniy Shestakov
4b0f702e7e Add LeaveGame netpack and avoid replying on it and CloseServer 2017-06-02 02:51:44 +03:00
Arseniy Shestakov
c7e7a4d7be Make usage of boost::interprocess optional
If shared memory allocation failed on client server will be started without shared memory option.
Only downside of this is that server wouldn't be able to fallback to random port if default is busy.
2017-06-02 02:44:41 +03:00
Arseniy Shestakov
cc163c4e05 Refactoring of networking code on server and client
* Avoid server crash on dummy connect / disconnect.
* Avoid server crash when host left from PreGame.
* Server print it's state with name when it's waiting for connection or in pregame.
* Server will use random port if specified port is busy.
2017-06-02 02:44:39 +03:00
Arseniy Shestakov
db5a52a0f8 Multiplayer: gracefully handle player loss unless it's a host
We don't want server to shutdown after just one of players lost the game.
2017-05-31 08:04:26 +03:00
Fay
b5daa24982 Android support (#299)
* AI libs registering shenanigans on android;
* Fixed resolution aspect + mouse event scaling;
* Proper server init/deinit (through android IPC);
Enabled threaded init in CMT;
* Prevented a deadlock in logger on some devices;
* Fixed frozen intro frame after interrupting the video;
Added android progressbar displaying during initial data loading;
* Hacky fix for choppy animations during heroes movement (should look better now, but it's definitely not a good solution);
* Changes/fixes for new android launcher building process;
* Fixed app hang after getting SDL_QUIT when activity was destroyed;
* Functioanal, configurable advmap swiping support;
* VCMI changes cleanup;
Added few missing VCMI_ANDROID guards on swipe mechanics;
* Removed unneeded sleep in server startup code for android;
* Removed android ioapi hack (fixed in newest ndk);
* Removed unused android's library loading logic;
* Added android's swipe option to settings schema;
* Moved NO_STD_TOSTRING to be defined in global.h instead of build files;
2017-05-25 20:57:20 +03:00
Dydzio
88952aefff Restart button fix (#288) 2017-03-19 16:58:46 +03:00
FeniksFire
3de891b4b4 Moving/dividing classes from BattleState to separate files. 2017-03-17 16:48:44 +01:00
AlexVinS
d003abea6f Fixed CID 1197624 2016-12-05 02:52:34 +03:00
AlexVinS
80666fb134 Tweaks 2016-11-25 22:12:22 +03:00
AlexVinS
dc39fb2d14 Removed useless CPack::type field.
* it was an ancient network protocol artifact
2016-11-18 17:45:59 +03:00
DjWarmonger
9db3bfcbf2 Merge pull request #212 from vcmi/refactoring/serialization2
Apparently it works - both new and old saves load at least.
2016-11-01 17:25:39 +01:00
Ivan Savenko
256f43f467 Fixes zero-initialized fileVersion member in deserializer 2016-10-29 19:52:19 +03:00
Vadim Markovtsev
ab7a0d64eb Fix formatting 2016-10-28 23:37:20 +02:00
Ivan Savenko
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
Vadim Markovtsev
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
Vadim Markovtsev
34cf92cb9b Change logging style 2016-10-03 20:32:01 +02:00
Vadim Markovtsev
eac5aab396 Survive client<->server ABI mismatch 2016-10-02 22:45:00 +02:00
Arseniy Shestakov
f721d22dfb CClient::loadGame: throw proper error if server save is missing 2016-09-19 04:56:20 +03:00
Arseniy Shestakov
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
Arseniy Shestakov
452e28d183 Remove some useless includes found by cppclean
This of course was tested and shouldn't break anything
2016-08-26 04:42:16 +03:00
Arseniy Shestakov
a90b657b86 Add reset to some static variables on client 2016-08-25 15:52:20 +03:00
Arseniy Shestakov
10dbbead2d Fix indentation of logging code and around it
That wouldn't be as big issue if problem affected few files, but it everywhere in codebase.
Fixed it everywhere since in most files that is the only code with wrong indentation.
2016-03-12 04:46:21 +03:00
DjWarmonger
d775e40eba Fixed typo. 2016-02-09 15:15:45 +01:00
DjWarmonger
4de0f0f973 Compile fixes for MSVS. 2016-02-09 11:08:20 +01:00
ArseniyShestakov
4e8486da7b Merge pull request #160 from vmarkovtsev/issue/2388
Fix 2388 obelisks puzzle revealing
2016-01-27 20:49:03 +03:00
Vadim Markovtsev
e8db456beb Reset obelisks upon game end
Otherwise, the static variables are preserved and lead to wrong values in next new game.
2016-01-20 13:02:52 +03:00
Zyx-2000
43b364bcd4 compilation fixes... 2016-01-16 19:00:53 +01:00
Zyx-2000
cf61837ced replaced std::string with boost::filesystem::path in several places 2016-01-16 16:36:16 +01:00
Arseniy Shestakov
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
ArseniyShestakov
87eaa78ffd Restore testing option changes overriten by merge 2015-12-19 12:12:35 +03:00
Ivan Savenko
a051a08a46 Merge remote-tracking branch 'origin/issue/2306' into develop 2015-12-18 22:21:11 +02:00
ArseniyShestakov
1ec7d14637 Client: add command line options to simplify multi-instance testing
Use these when you need to run multiple instances of VCMI simultaneously.
--testingport is port used to start server. Override port number from configuration files.
--testingfileprefix is prefix for auto save filenames.
Both options has to be set in order to work.
2015-12-13 22:14:37 +03:00
Vadim Markovtsev
c5ebec0d1f Fix the second crash (dynamic_cast failure) 2015-10-27 09:09:42 +03:00
Alexander Shishkin
fca4deaad2 Merge pull request #122 from vmarkovtsev/feature/warnings
Fix warnings produced by recent Clang build
2015-10-14 07:28:47 +03:00
Vadim Markovtsev
e4b1ef1405 Add "override" to virtual overriden methods 2015-10-13 21:05:36 +03:00
AlexVinS
2677d4a677 Fixed action cancel on active stack remove 2015-10-08 08:15:29 +03:00
AlexVinS
685deddac1 Start spell-relatet files reorganisation
* moved existing files to separate directory
-> todo: split mechanics
2015-02-26 08:39:48 +03:00
AlexVinS
aa5e9fc959 get rid of global debug macros. 2015-02-14 22:43:16 +03:00
AlexVinS
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
AlexVinS
3bca68fd2d Initial refactoring
* reduce registerTypes* templtates instantiation
2014-12-21 17:29:42 +03:00
Patrick Simmons
407755ee77 Minor multiplayer load bugfixes 2014-10-25 19:05:50 -04:00
Patrick Simmons
1dabdf7b3a Minor fixes to multiplayer load game support 2014-10-25 19:05:50 -04:00
Patrick Simmons
6aa3c11084 SUCCESS! 2014-10-25 19:05:49 -04:00
Patrick Simmons
7babdccd59 This is very wrong but works better than anything else I've tried. 2014-10-25 19:05:49 -04:00
Patrick Simmons
41da0ad2e6 multiplayerload changes (committing so I can revert...) 2014-10-25 19:05:49 -04:00
Patrick Simmons
3685e96042 Revert "multiplayer load changes"
This reverts commit 368d2c8836cc6e3b5af9cf71e892bf4515f26bda.
2014-10-25 19:05:49 -04:00
Patrick Simmons
99a63c4bbd multiplayer load changes 2014-10-25 19:05:49 -04:00
Patrick Simmons
cfa6f46d62 VERY buggy, unusable, but progress is being made... 2014-10-25 19:05:49 -04:00