AlexVinS
0190c9804e
formatting
2017-06-06 19:45:34 +03:00
AlexVinS
a31c28ec33
Unified war machine mechanics.
...
* it is possible to define new war machines
* added warMachine field to artifact configuration
2017-06-06 19:18:26 +03:00
ArseniyShestakov
1f9c154ec2
Merge pull request #306 from vcmi/feature/debugOptions
...
Debug features: auto tests, headless and spectator modes
2017-06-06 10:34:06 +03:00
Arseniy Shestakov
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
Arseniy Shestakov
a2284c3209
Automated testing: graceful shutdown for when game is ended
...
Before when CloseServer / LeaveGame applied there was no thread sync on server.
Now server use std::atomic bool for synchronization and graceful shutdown.
2017-06-06 07:30:16 +03:00
Arseniy Shestakov
3f7cb9f893
Client: add some shortcuts for spectator mode
...
Following mode only work when client is started in spectator mode:
F5 - Pause / resume game by locking of pim
F6 - Toggle spectate-ignore-hero
F7 - Toggle spectate-skip-battle
F8 - Toggle spectate-skip-battle-result
F9 - Skip current battle
2017-06-06 07:30:16 +03:00
Arseniy Shestakov
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
Arseniy Shestakov
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
Arseniy Shestakov
f7f7fe1d32
Client: fix headless mode and add automated testing mode
...
Command-line option --noGUI replaced with --headless.
Added option --testmap that will run specified map with AI players
2017-06-06 07:30:16 +03:00
AlexVinS
9f1451c1a3
[Map format] more correct handling of default hero primary skills
2017-06-06 02:37:07 +03:00
AlexVinS
4b2a118ffa
fixed assertion if hero instance in VCMI map have 0 at one of primary skills
2017-06-06 02:01:24 +03:00
Alexander Shishkin
a3b04da5f0
Merge pull request #309 from vcmi/magicTweaks
...
Magic tweaks
2017-06-06 01:55:29 +03:00
AlexVinS
195e979a18
get rid of CBattleInfoCallback::battleCanCastThisSpell
2017-06-05 23:46:55 +03:00
AlexVinS
6c308956f9
get rid of CBattleInfoCallback::battleCanCastThisSpellHere
2017-06-05 23:25:48 +03:00
AlexVinS
2cfb2e6ae0
get rid of CPlayerBattleCallback::battleCanCastThisSpell
2017-06-05 22:53:42 +03:00
AlexVinS
4d430f6ad8
get rid of CPlayerBattleCallback::battleCanCastSpell
2017-06-05 22:16:12 +03:00
AlexVinS
1d1519db5c
ENCHANTER_CASTING trigger tweak
2017-06-05 21:41:27 +03:00
AlexVinS
66cfc2fef9
CSpell::canBeCast tweaks
2017-06-05 21:30:25 +03:00
Alexander Shishkin
8c9d6c1c1d
Merge pull request #308 from vcmi/mapServiceTweaks
...
Map service tweaks
2017-06-05 18:30:52 +03:00
AlexVinS
c82afe7156
switch CMapService API to ResourceID
2017-06-04 22:42:48 +03:00
AlexVinS
e25ed4f358
[Tweak] Use unique_ptr for map header in pregame
2017-06-04 21:11:58 +03:00
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
d84f61fc96
CConnection: use std::static for port conversion
...
Apperantly boost::lexical on Windows will add commas into output.
2017-06-04 16:48:04 +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
4a302d4fe5
CBattleHero::clickRight: more elegant code for side detection
2017-06-03 04:28:03 +03:00
ArseniyShestakov
5b0a0d5959
Merge pull request #305 from vcmi/networkImprovements
...
Network and multiplayer improvements
2017-06-02 15:27:08 +03:00
Arseniy Shestakov
bc6f65af04
PlayerCheated: new netpack to apply losing / winning cheat code
2017-06-02 03:34:50 +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
Piotr
9d5d291e6b
Do not show whether Witch Hut is visited by hero, if was not visited by player yet, fixes #2604 ( #304 )
2017-06-01 23:36:46 +03:00
Arseniy Shestakov
9b867808a7
Multiplayer: threat disconnected player just like if he lost
...
Now even if player disconnected on it's own turn game will continue.
2017-05-31 08:04:31 +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
AlexVinS
c66c66c5ae
Fixed https://bugs.vcmi.eu/view.php?id=2686
2017-05-29 12:42:23 +03:00
FeniksFire
039e3842fc
Aesthetic changes in BattleHex ( #303 )
2017-05-29 10:33:34 +03:00
AlexVinS
8a494b7820
fix
2017-05-28 18:42:36 +03:00
AlexVinS
9718ef1543
Fix
2017-05-28 18:40:13 +03:00
AlexVinS
009bfb8211
cleanup
2017-05-28 17:27:16 +03:00
AlexVinS
70a092f58c
[Refactoring] use virtual method for object specific actions when new map object is created
...
* --TODO
* fixes CID 1366291, CID 1366297
2017-05-28 16:23:42 +03:00
AlexVinS
fc55efb72d
Fixed CID 1375681
2017-05-28 15:16:40 +03:00
AlexVinS
fa6a7bd1b5
Fixed CID 1375682
2017-05-28 15:06:12 +03:00
AlexVinS
25d06c8d70
Fixed CID 1375686
2017-05-28 15:00:55 +03:00
AlexVinS
f5cdaece6f
Fixed CID 1375687
2017-05-28 14:40:36 +03:00
AlexVinS
1c95c51ffb
Fixed CID 1375685
2017-05-28 14:40:36 +03:00
AlexVinS
a7ed27c73f
Fixed CID 1375705, CID 1375709, CID 1375708
2017-05-28 14:40:35 +03:00
AlexVinS
7a1dd7bd7d
Fixed CID 1375707
2017-05-28 14:40:34 +03:00
Alexander Shishkin
f24396f3b3
Merge pull request #302 from FeniksFire/develop
...
Fix http://bugs.vcmi.eu/view.php?id=2677 .
2017-05-28 14:36:12 +03:00
FeniksFire
1f215d2306
Fix http://bugs.vcmi.eu/view.php?id=2677 .
2017-05-28 12:23:03 +02:00
DJWarmonger
4d1fb67594
Sanity check for Coverity #1366290 .
...
(Vector should never be empty, especially for chosen zone).
2017-05-27 21:37:05 +02:00
AlexVinS
df3574b50f
Fixed https://bugs.vcmi.eu/view.php?id=2685
2017-05-27 17:07:11 +03:00