1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-19 21:10:12 +02:00

262 Commits

Author SHA1 Message Date
Ivan Savenko
42878af3a6 Better fix for lobby room crash
Always use TCP connection when connecting to self-hosted lobby room.
Effectively reverts 1.6.6 change for lobby connections. Single-player
connections still use intra-process pseudo connection

Main problem is various side effects caused by changing order of
operations. For example, client may inform lobby about joining the room
before server finishes startup, which was not possible before.
2025-02-25 14:05:56 +00:00
Ivan Savenko
c3af0dc469 Remove unused parameters 2025-02-03 18:02:01 +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
Ivan Savenko
7694e2da4b
Merge pull request #4736 from Laserlicht/fix_8th_portal_summoning
Fix multiple small issues
2024-10-07 22:19:17 +03:00
Laserlicht
1c6eaf6336 fix player translation 2024-10-07 18:37:07 +02:00
Ivan Savenko
786f80871e Replace more usages of pointers to packs with references 2024-10-07 14:59:14 +00:00
Ivan Savenko
c1c552d394 Replaced some of pointers to CPack's with references 2024-10-07 14:59:14 +00:00
Laserlicht
a43475042f code review 2024-09-18 22:10:25 +02:00
Laserlicht
21c3cf0960 rename and move window class 2024-09-12 23:35:21 +02:00
Laserlicht
2fbdeb3a5d skippable video intro 2024-09-12 23:23:00 +02:00
Laserlicht
8fc3fe3cc3 scaling 2024-09-12 23:06:33 +02:00
Laserlicht
822fa61bf2 intro rework 2024-09-12 22:28:45 +02:00
Laserlicht
45625f0355 added AB intro; play only when resource exists 2024-09-06 22:57:53 +02:00
Laserlicht
6d9385b8bd outro for RoE 2024-09-05 21:31:17 +02:00
Ivan Savenko
6179521364
Merge pull request #4556 from IvanSavenko/town_building_visit
Implemented explicitly visitable town buildings, e.g. hota mana vortex
2024-09-05 17:21:21 +03:00
Ivan Savenko
81af66d35b Move visit query to a separate class, remove no longer needed Cast.h 2024-09-04 14:32:36 +00:00
Laserlicht
16cbd6a7d2 allow custom loadbar-backgrounds for campaigns 2024-08-31 16:03:42 +02: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
a42afa2910 code review 2024-08-14 21:51:08 +02:00
Laserlicht
9e9a6f1c5f
Merge branch 'develop' into extended_statistic 2024-08-13 00:49:51 +02:00
Ivan Savenko
79c55bc898
Merge pull request #4425 from IvanSavenko/ui_cleanup
Remove old code from UI system
2024-08-12 17:16:03 +03:00
Laserlicht
f42f1de347 extended statistic: Button and data transfer 2024-08-11 22:21:13 +02:00
Ivan Savenko
00605b5129 Remove largely unused defActions member from CIntObject 2024-08-09 14:26:53 +00:00
Laserlicht
9ceb1c567d highscore refactoring 2024-08-02 19:37:46 +02:00
Laserlicht
4f0c3a3608
Merge branch 'develop' into handicap 2024-08-01 21:39:40 +02:00
Laserlicht
3e5df61946 code review 2024-07-29 22:54:42 +02:00
Laserlicht
939dd62491
change variable name 2024-07-29 20:43:41 +02:00
Laserlicht
c103d2a9f7
fix 2024-07-26 21:02:25 +02:00
Laserlicht
53c0d20a57 fix campaign highscores 2024-07-26 20:36:52 +02:00
Laserlicht
832e1531fc handycap percent 2024-07-25 00:28:49 +02:00
Laserlicht
8edf77afcc basic handicap support 2024-07-25 00:28:01 +02:00
Ivan Savenko
1aa391fdf8 Split CGeneralTextHandler file into 1 file per class form
All text processing code is now located in lib/texts.
No changes other than code being moved around and adjustment of includes

Moved without changes:
Languages.h           -> texts/Languages.h
MetaString.*          -> texts/MetaString.*
TextOperations.*      -> texts/TextOperations.*

Split into parts:
CGeneralTextHandler.* -> texts/CGeneralTextHandler.*
                      -> texts/CLegacyConfigParser.*
                      -> texts/TextLocalizationContainer.*
                      -> texts/TextIdentifier.h
2024-07-20 12:55:17 +00:00
Ivan Savenko
696cce7f7f
Merge pull request #4253 from smanolloff/random-port
Bind VCMI server to a random TCP port
2024-07-16 12:25:29 +03:00
Simeon Manolov
9d73b50979
Bind server to a randomly assigned port 2024-07-12 01:06:36 +03:00
Ivan Savenko
6b8f94e6e7 Merge remote-tracking branch 'vcmi/master' into develop 2024-07-11 17:43:44 +00:00
Laserlicht
539ffb3810
fix campaign highscore sum 2024-06-23 15:40:46 +02:00
Ivan Savenko
b8beb4fb13 Fixes for various minor issues detected by Sonar Cloud 2024-06-01 11:48:30 +00:00
Ivan Savenko
9bfe000724 Added semi-workaround method for network thread shutdown:
Currently closing game while network thread is waiting for something is
very bug-prone, since network thread may resume during shutdown and
access partially destroyed client state.

Now if exit has been requested, the very first step would be semi-
graceful shutdown of network thread (via exception throwing). This may
in theory skip some cleanup in non-RAII code, but since game is shutting
down this does not matters much.

This logic applies to:
- shutting down while network thread is waiting for dialogs
- shuttind down while network thread waiting for animations in combat
2024-05-18 11:04:10 +00:00
Ivan Savenko
da9d82b697
Merge pull request #3973 from vcmi/master
Merge master -> beta
2024-05-14 16:59:10 +03:00
Ivan Savenko
22d51bd473 Fix freeze on closing game window while in game 2024-05-14 12:32:22 +00:00
Ivan Savenko
f8e4e41c39 Fix possible thread race on server shutdown:
- Main thread shutting down server from player request
- Network thread shutting down server due to server shutting down
network
2024-05-13 16:00:19 +00:00
Ivan Savenko
d295784f6e Shutdown server immediately without leaving hanging server in main menu 2024-05-13 15:43:05 +00:00
Ivan Savenko
93038b791e Fix connection termination handling 2024-05-13 14:09:59 +00:00
Ivan Savenko
a74d9791a1 Remove indirect calls to CSH from server handler itself 2024-05-11 13:19:07 +00:00
Ivan Savenko
46f2b8b2d7 Attempt to fix weird crash on game start 2024-05-11 13:19:07 +00:00
Ivan Savenko
e89e5d2127 Rename for clarity 2024-04-07 21:22:33 +03:00
Ivan Savenko
0a296add0c apply SonarCloud suggestions 2024-04-07 21:21:48 +03:00
Ivan Savenko
80acd7e77c Simplified and fixed server restart procedure:
- Replaced several assertions with runtime_error's to detect them in
release builds
- Removed multiple dispatchMainThread calls in server shutdown code to
simplify debugging and code flow
- Moved handling of gameplay shutdown and score calculation from
PlayerInterface to ServerHandler (not perfect, but better than before)
2024-04-07 14:19:57 +03:00
Ivan Savenko
829b754091 Implemented matches history in lobby 2024-03-27 13:10:55 +02:00