1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-16 10:19:47 +02:00
Commit Graph

258 Commits

Author SHA1 Message Date
Ivan Savenko
fe918de2df Remove invalid assertion 2024-02-19 00:36:21 +02:00
Ivan Savenko
9ebd194ab1
Merge pull request #3609 from IvanSavenko/single_process
Allow running server as part of client process
2024-02-14 12:06:22 +02:00
Ivan Savenko
7c34d48258 Minor fixes and corrections to network-related code. No functionality
changes.
2024-02-12 18:57:20 +02:00
Ivan Savenko
74f9b03516 Fix crash on closing client while server is active 2024-02-12 16:36:13 +02:00
Ivan Savenko
0fc0ad238b Fixes for server shutdown logic, implemented connection aborting for
local server
2024-02-11 17:55:02 +02:00
Ivan Savenko
0d263c5571 Implemented option to run server as a thread with shared VLC 2024-02-11 17:55:02 +02:00
Ivan Savenko
38ba42ef7a Rename 'c' to 'logicConnection' 2024-02-11 16:26:27 +02:00
Ivan Savenko
f2ecd4cf11 Merge branch 'develop' into 'lobby' 2024-02-11 16:13:13 +02:00
Alexander Wilms
522cb571b3 Remove redundant virtual specifiers
`grep -nr virtual | grep -v googletest | grep override > ../redundant_virtual.txt`

```python
import os

with open("../redundant_virtual.txt") as f:
    for line in f:
        print()
        line: str = line.strip()
        print(line)
        tmp = line.split(":")
        file = tmp[0].strip()
        code = tmp[-1].strip()
        print(file)
        print(code)
        new_code = code.replace("virtual ", "", 1)
        # https://superuser.com/a/802490/578501
        command = f"export FIND='{code}' && export REPLACE='{new_code}' && ruby -p -i -e \"gsub(ENV['FIND'], ENV['REPLACE'])\" {file}"
        os.system(command)
```
2024-02-10 20:46:13 +01:00
Ivan Savenko
1a144fc516 Some progress on private rooms support 2024-02-10 19:02:25 +02:00
Ivan Savenko
d4bedd8d8d Fixed handling of match server crash 2024-02-04 19:58:09 +02:00
Ivan Savenko
7dee24edae Cleanup 2024-02-03 23:30:16 +02:00
Ivan Savenko
1b6ac1052a Properly lock UI mutex on accessing GUI state from network thread 2024-02-03 22:24:32 +02:00
Ivan Savenko
bd4c7e3ac0 Added LobbyPrepareStartGame pack to replace old workarounds 2024-02-03 19:57:23 +02:00
Ivan Savenko
2c2bec791c Fixes and cleanup of game client network shutdown and restart 2024-02-03 19:27:04 +02:00
Ivan Savenko
29c0989849 Use std::byte to manage network data 2024-02-02 02:02:09 +02:00
Ivan Savenko
c12558bf8a Simplified code 2024-02-02 01:26:53 +02:00
Ivan Savenko
c5c46a7c9a Implemented connecting to server via proxy 2024-01-30 21:31:41 +02:00
Ivan Savenko
eaca128c99 Code cleanup 2024-01-26 19:15:57 +02:00
Ivan Savenko
322c5faf63 Merge remote-tracking branch 'vcmi/develop' into lobby 2024-01-26 16:52:23 +02:00
Ivan Savenko
388ca6e776 Added list of active accounts and rooms to UI. Added room creation logic 2024-01-26 16:32:36 +02:00
Ivan Savenko
9e62eb28c5 Fix merge 2024-01-21 00:53:22 +02:00
Ivan Savenko
fc4ae3bd8c Merge remote-tracking branch 'vcmi/develop' into lobby 2024-01-20 23:01:49 +02:00
Andrii Danylchenko
cc7fc4a2c6 Fix headless mode 2024-01-20 22:55:27 +02:00
Ivan Savenko
baa73f5433 Code cleanup 2024-01-20 00:26:25 +02:00
Ivan Savenko
709905b1a0 Simplified networking API 2024-01-19 23:52:28 +02:00
Ivan Savenko
80e960bc8e Finalized new TCP networking API 2024-01-19 23:52:28 +02:00
Ivan Savenko
ffa58152ac Client-side support for hosting game server via lobby 2024-01-19 23:49:59 +02:00
Ivan Savenko
55b504792e Implemented basic version of login window and persistent connection on
client
2024-01-19 23:49:59 +02:00
Ivan Savenko
78b7d9e726 Replaced open port check with server crash check 2024-01-19 23:49:59 +02:00
Ivan Savenko
0196707083 Fix UUID initialization on client 2024-01-19 23:49:59 +02:00
Ivan Savenko
2396c14114 Fixed logic for reconnection attempts to local server. Cleanup.
Added distinct fields in config for local and remote connection.
Removed code for restoring last session since it does not works as
intended and often triggers after crash
2024-01-19 23:49:59 +02:00
Ivan Savenko
a3639e77b1 Fixed handling of connection failure on client 2024-01-19 23:49:59 +02:00
Ivan Savenko
5694777a96 Simplified connection logic 2024-01-19 23:49:59 +02:00
Ivan Savenko
8ea69e457a Simplified applying of lobby packs 2024-01-19 23:49:59 +02:00
Ivan Savenko
22f0ca67c6 Fix connection to game lobby & map load 2024-01-19 23:49:59 +02:00
Ivan Savenko
0a1153e1c6 Switch client-server communication to new API 2024-01-19 23:49:59 +02:00
Ivan Savenko
496c13b34a Stabilization 2024-01-19 13:56:06 +02:00
Ivan Savenko
9af7c63a26 Fix build 2024-01-19 13:56:05 +02:00
Ivan Savenko
ea1f05d15a Stabilization 2024-01-19 13:55:22 +02:00
Ivan Savenko
bd5682ecc3 Merge remote-tracking branch 'vcmi/master' into develop 2024-01-19 13:49:54 +02:00
Alexander Wilms
f3277b7953 Define each identifier in a dedicated statement 2024-01-10 00:22:23 +00:00
Laserlicht
c635ca562e
fix campaign completion 2024-01-07 14:36:07 +01:00
Laserlicht
cb9c4bbaf0 unlimited replay option 2023-12-28 20:48:19 +01:00
Laserlicht
fc4827c89c
option for allowing cheats 2023-12-27 14:39:35 +01:00
Ivan Savenko
b8a4091356 Fix regressions from timers - client may be destroyed while receiving
timer update or pack reply
2023-11-27 20:27:10 +02:00
Ivan Savenko
301ac2457a Cleanup 2023-11-13 17:48:55 +02:00
Ivan Savenko
5c810df36f Reorganized types registration code 2023-11-11 00:39:08 +02:00
Ivan Savenko
4a7fa9bf8c Simplified CTypeList class 2023-11-08 22:05:36 +02:00
Ivan Savenko
b88a8da4e8 Split off some netpack structures into separate files 2023-10-23 13:59:15 +03:00
Nordsoft91
1ffc246c8b
Merge pull request #3051 from Laserlicht/name_change
possibility to change name in lobby
2023-10-16 22:28:31 +02:00
Laserlicht
be6ed36422
fix 2023-10-16 21:35:29 +02:00
nordsoft
c8452355ce Revert "Merge pull request #2959 from Alexander-Wilms/faster-server-connection"
This reverts commit 43636af2e4, reversing
changes made to aed2e360ba.

# Conflicts:
#	client/CServerHandler.cpp
2023-10-14 22:52:24 +02:00
Laserlicht
0c6b1ca3c8
possibility to change name 2023-10-13 23:04:35 +02:00
Nordsoft91
4ae123e2a1
Merge pull request #3038 from Alexander-Wilms/connection-error-window
Show info dialog when connection to multiplayer server fails
2023-10-12 00:16:04 +02:00
Alexander Wilms
7c627d8163 Show info dialog when connection to multiplayer server fails 2023-10-10 18:11:11 +02:00
nordsoft
fe7c01cd37 Fix 3024 2023-10-08 17:46:47 +02:00
Nordsoft91
43636af2e4
Merge pull request #2959 from Alexander-Wilms/faster-server-connection
Sleep for 10 ms instead of 1000 ms while waiting for server connection
2023-10-08 17:21:57 +02:00
Nordsoft91
088ce9b948
Merge pull request #3013 from Nordsoft91/turn-timer 2023-10-08 12:11:44 +02:00
Alexander Wilms
732c39fcc6 Fix build 2023-10-07 00:08:22 +02:00
Alexander Wilms
c8f1512a3f Use correct address to decide whether we're connecting to a remote server or a local one 2023-10-06 23:33:51 +02:00
nordsoft
a09c595cf4 Support simturn timers 2023-10-06 18:17:05 +02:00
nordsoft
043f54698b Fix translations in map editor / fix crash on game end 2023-10-05 23:34:29 +02:00
Ivan Savenko
e322d0a084
Merge pull request #2966 from IvanSavenko/simplify_ui_lock
Simplified locking of game UI state
2023-10-04 16:50:23 +03:00
Alexander Wilms
b58cca7770 100 connection attempts is not always enough 2023-10-03 22:06:32 +02:00
Alexander Wilms
a66d8ecb8f Use ui16 instead of uint for connectionAttemptCount to fix MinGW build 2023-10-03 22:06:32 +02:00
Alexander Wilms
e1401d26c5 hostAddress can be localhost, return from justConnectToServer() is maximum number of attempts is exceeded 2023-10-03 22:06:32 +02:00
Alexander Wilms
39427d6658 Use different delay and maximum number of connection attempts for local and remote servers 2023-10-03 22:06:32 +02:00
Alexander Wilms
9f9930a9dd CServerHandler::justConnectToServer(): Read settings only once 2023-10-03 22:06:32 +02:00
Alexander Wilms
614d000376 Sleep for 10 ms instead of 1000 ms while waiting for server connection 2023-10-03 22:06:32 +02:00
Nordsoft91
4620d2c96d
Merge pull request #2980 from Nordsoft91/proxy-reconnect
Allow to reconnect to proxy server
2023-10-02 20:42:11 +02:00
nordsoft
f3fa0f8652 Allow to reconnect to proxy server 2023-09-29 19:49:18 +02:00
nordsoft
03c099d4fd First steps 2023-09-27 22:53:13 +02:00
Ivan Savenko
03a939fd52 Remove redundant thread name - this method is not thread entry point 2023-09-27 19:13:26 +03:00
Ivan Savenko
d6b9fa8fbd Replaced CPlayerInterface::pim with CGuiHandler::interfaceLock
- Removed CPlayerInterface::pim since this lock does not actually
protects LOCPLINT but rather entire game UI state
- added more logical CGuiHandler::interfaceLock
- interface lock is now non-recursive and is locked only once by initial
caller that want to access GUI
2023-09-27 18:33:52 +03:00
Ivan Savenko
71a1ed816a
Merge pull request #2892 from Laserlicht/highscore_menu
Highscore Menu & end video
2023-09-27 15:48:47 +03:00
Ivan Savenko
94dbde05a0
Merge pull request #2868 from IvanSavenko/simultaneous_turns
Simultaneous turns
2023-09-27 15:45:02 +03:00
Nordsoft91
c803b57c33
Merge pull request #2889 from Nordsoft91/mod-compatibility-check
Proper mod compatibility check logic
2023-09-26 19:29:46 +02:00
nordsoft
056cba55a8 Show loading screen immediately on restart 2023-09-26 15:45:46 +02:00
Ivan Savenko
5b21a5ffbc Simturn duration is now part of StartInfo 2023-09-26 13:42:20 +03:00
Laserlicht
c3373ea34c
code review 2023-09-25 18:06:40 +02:00
Laserlicht
6f8b62d77d
codereview 2023-09-23 20:41:30 +02:00
Laserlicht
e3edcb6cd8
rmb; bugfix; tabs 2023-09-23 14:51:39 +02:00
Laserlicht
d2398b804a
implement adding 2023-09-23 13:14:45 +02:00
Laserlicht
e18a4a09a9
forward declaration 2023-09-23 02:14:45 +02:00
Laserlicht
d3f007453d
win screen ready 2023-09-23 01:36:01 +02:00
nordsoft
dce1ac1538 Redesign mod incompatibility message 2023-09-23 00:32:48 +02:00
Laserlicht
1a0f5cf159
calc preperation 2023-09-23 00:21:36 +02:00
Laserlicht
30c6cf3b98
video & audio correction; win/lose 2023-09-22 21:45:12 +02:00
Laserlicht
a4cb74f0dc
highscore input window 2023-09-22 20:39:20 +02:00
Laserlicht
9e78f9c69c
CodeReview 2023-09-21 23:41:00 +02:00
nordsoft
4691907f9c Show root mods only 2023-09-21 22:28:29 +02:00
Laserlicht
5fd2eee3e8
code review 2023-09-21 21:27:06 +02:00
nordsoft
a05f8339ae Proper mod compatibility check system 2023-09-21 04:31:08 +02:00
Laserlicht
48231f5f4f
save results only if from set 2023-09-20 22:28:45 +02:00
Laserlicht
dfb5ccbeaf
add persistent storage & completed campaign support 2023-09-20 22:18:53 +02:00
Laserlicht
52b86eb9c1
get back to campaignmenu 2023-09-20 21:18:13 +02:00
Laserlicht
34182069f5
campaignset 2023-09-20 03:13:54 +02:00
Ivan Savenko
f8541d0ae4 Merge branch 'vcmi/master' into 'vcmi/develop' 2023-09-15 13:59:02 +03:00
Ivan Savenko
538665fe42 Fix "Start game" blocking status:
- Start game is now initially blocked
- Receiving valid startInfo from server will unlock button
2023-09-12 21:15:15 +03:00