1
0
mirror of https://github.com/vcmi/vcmi.git synced 2026-05-04 20:45:35 +02:00
Commit Graph

378 Commits

Author SHA1 Message Date
Ivan Savenko 03041199ee Merge pull request #6788 from Laserlicht/server_discovery
[1.7.2] Server discovery
2026-02-09 21:27:50 +02:00
Laserlicht 5e7d782403 refactoring 2026-02-07 21:47:56 +01:00
Ivan Savenko eac93ff7ea Try to fix strange freeze on AI receiving turn pause query 2026-02-01 17:37:49 +02:00
Laserlicht e49ab0ad8b move to lib/network 2026-02-01 14:34:43 +01:00
Laserlicht 7333c863b6 server discovery 2026-01-25 13:28:01 +01:00
Ivan Savenko ac19bbb84a Fix empty tavern and crash in puzzle map on using quick load 2026-01-18 14:35:22 +00:00
Andrej Dudenhefner 8bddd8f4e3 add quick save (F8) / quick load (F9) functionality for single player and hotseat games on adventure map and in combat
- add LobbyQuickLoad pack
- add hotkeys F8, F9 to adventure map and battle
- check whether quick save matches current settings
- ask before quick load
- notify about quick save
- use CResourceHandler for file existence test
- update localization
- externalize buttons to vcmi-extras
2025-12-04 09:16:35 +01:00
Laserlicht 134017a7cd basic multiplayer support 2025-10-25 17:55:25 +02:00
Michał Zaremba 3e486a779d Fix incrementing conn and player IDs 2025-10-17 16:56:01 +02:00
Michał Zaremba 35543bef7a Revert "Fix incrementing PlayerConnectionID"
This reverts commit 48a683ae49.
2025-10-17 16:56:01 +02:00
Michał Zaremba ea261ae48f Rework handling some errors and uncought exceptions 2025-10-01 11:00:56 +02:00
Laserlicht 75f965c93a remove allresources 2025-09-14 15:29:14 +02:00
Michał Zaremba 48a683ae49 Fix incrementing PlayerConnectionID 2025-09-02 22:37:32 +02:00
Michał Zaremba 44557c3558 Fix PlayerConnectionID regression 2025-08-31 05:54:03 +02:00
Ivan Savenko 52da332640 GameHandler now uses GameConnectionID instead of connection pointers 2025-07-19 18:04:20 +03:00
Ivan Savenko 3576efc3f3 Initial version of antilag support 2025-07-19 18:04:20 +03:00
Ivan Savenko 58de180083 Split CConnection into GameConnection and IGameConnection classes 2025-07-19 18:04:20 +03:00
Ivan Savenko 3d63284c51 Extracted interface through which GameHandler interacts with VCMIServer 2025-07-19 18:04:20 +03:00
Ivan Savenko 2ad186130f Split MapDefines file on .h per class basis 2025-07-07 18:16:42 +03:00
Ivan Savenko 2cd29c1893 Rework campaign bonuses storage in type-safe form
Replaced campaign bonuses from using 3 integers to store anything with
type-safe version that uses std::variant that ensures that all bonuses
are in correct state.

Also removed "interesting" solutions like storing primary skills using
bit shifts.

Prerequirement for HotA campaign support
2025-06-15 17:01:14 +03:00
Ivan Savenko cc6f65d8da Resolve Sonar issues in server code 2025-05-27 22:02:13 +03:00
Ivan Savenko 508c54c23a Fix game startup 2025-05-23 15:18:07 +03:00
Ivan Savenko 8255a4b9ae CGameHandler no longer inherits CGameInfoCallback, reduce direct access
to gamestate
2025-05-23 14:17:25 +03:00
Ivan Savenko 4b30336d03 Fix issues detected by Sonar 2025-05-11 19:50:57 +03:00
Ivan Savenko 71d742ab19 Fix handling of campaign bonus where player can select color to play 2025-04-29 12:14:14 +03:00
Ivan Savenko 829739da24 Reduce usage of implicit conversions to int 2025-04-27 14:57:31 +03:00
Ivan Savenko 4d57a8ed36 Prefer to pass CGameState as reference instead of pointer 2025-04-27 14:57:31 +03:00
Ivan Savenko 6d65641a43 Gamestate is now passed as shared pointer 2025-04-27 14:57:30 +03:00
Ivan Savenko b6026084ea StartInfo in gamestate now use unique_ptr 2025-03-08 14:04:51 +00:00
Ivan Savenko 4a6a8f9496 Merge pull request #5496 from IvanSavenko/std_thread
Replace boost::thread with std::thread
2025-03-08 16:03:55 +02:00
Ivan Savenko 2fdf40e7a9 Remove connection pointer from CPack 2025-03-03 10:46:00 +00:00
Ivan Savenko 5f052165fe Fix missing names for some threads 2025-03-02 14:33:11 +00:00
Ivan Savenko 844dfb1604 Removed usage of boost::thread from vcmi, except for AI 2025-03-02 14:33:11 +00:00
Ivan Savenko 645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
Ivan Savenko 0548f325e4 Merge branch 'master' into 'develop' 2025-02-21 13:59:34 +00:00
Ivan Savenko 4b824d05e2 Do not allow heroes banned for player as starting heroes
- `disposedHeroes` is now in map header, for use in map selection
- heroes that are marked as unavailable for player will now be hidden
from starting hero selection
2025-02-14 10:43:55 +00:00
Ivan Savenko 048fc503c3 Do not start listening for connections in single-player games 2025-02-03 17:24:02 +00:00
Ivan Savenko d9244cf061 Remove network connection from local games
This removes need for TCP network connection in single-player games.

Instead, game will now create internal pseudo-connection that performs
client<->server communication by posting sent messages to client/server
asio::io_service'a.

This should fix gameplay aborting on switching to another app on iOS (and
apparently, on Android in some cases)
2025-02-03 17:24:02 +00:00
Laserlicht 78e933a968 add broadcast to translation 2024-12-01 18:29:07 +01:00
Ivan Savenko 14a3c6ad14 Fix freeze on closing server before starting the game
Fixes possible freeze that seems to be caused by client shutting down
socket before sending its final LobbyClientDisconnected packet, leading
to server not processing disconnection of host correctly, which in turn
causes client to wait server shutdown forever.

Looks like regression from #4722

- Fixes #4912 and its duplicates
2024-11-25 17:31:20 +00:00
Laserlicht 452762cd78 change datetime format 2024-10-30 23:23:56 +01:00
Ivan Savenko 604e3b5c67 Merge pull request #4763 from IvanSavenko/herohandler_split
Split CHeroHandler.cpp/.h into 1 file per class
2024-10-14 19:05:48 +03:00
Ivan Savenko 10ad0fc760 Split CHeroHandler.cpp/.h into 1 file per class
All parts of CHeroHandler.cpp are now in lib/entities/hero
Adjusted includes to use new paths
No functionality changes
2024-10-13 14:01:09 +00:00
Ivan Savenko a8e84c55f6 Fix some of the new warnings from sonarcloud 2024-10-11 10:45:29 +00:00
Ivan Savenko c0f5c7c0ea Replace pointer with reference in pack apply functions 2024-10-07 14:59:46 +00:00
Ivan Savenko 48fb58e7a0 Replace few more pointers with references, remove manual delete call 2024-10-07 14:59:14 +00:00
Ivan Savenko cc6d6b0d63 Replaced unique_ptr with simple references to packs 2024-10-07 14:59:14 +00:00
Ivan Savenko 371eac070f Fixes for player disconnection handling
- Fixed lack of notification if player disconnects via connection loss,
e.g. app crash / network going down
- Replaced notification via chat message with notification via info window
2024-10-04 12:48:50 +00:00
Ivan Savenko b84af1a6de Significantly simplify packs applying
Apparently our logic for packs applying with types registration is
overcomplicated and by now completely unnecessary - it became redundant
after introduction of visitor pattern.
2024-08-26 19:48:46 +00:00
Laserlicht 3e5df61946 code review 2024-07-29 22:54:42 +02:00