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
95d761bbb8
Handle corrupted H3 data - show message box instead of silent crash
2024-05-13 15:41:47 +00:00
Ivan Savenko
75ff1f7b60
Fix app freeze on attempt to exit game during loading
2024-04-29 17:02:02 +03:00
Andrii Danylchenko
3939c4b9d3
NKAI: stability fixes and regression
2024-04-20 14:32:58 +03:00
Ivan Savenko
fa9e0669f2
Remove excessive call - will be reset on window push anyway
2024-04-11 23:51:58 +03:00
Andrii Danylchenko
3820f6f78b
NKAI: fix headless and compilation
2024-03-24 13:16:46 +02:00
Ivan Savenko
54796c7c56
Rename toJson to toString/toCompactString for consistency
2024-02-26 12:55:49 +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
62148e1506
Fix build
2024-02-12 15:08:46 +02:00
Ivan Savenko
4c70abbeb5
Reduced usage of global variables - removed or made const / constexpr
2024-02-12 13:49:45 +02:00
Ivan Savenko
cded8b1999
Show human-readable thread name in log
2024-02-11 17:55:02 +02:00
Ivan Savenko
80fc2bb695
Merge remote-tracking branch 'vcmi/develop' into lobby
2024-02-03 21:11:34 +02:00
Alexander Wilms
70ce090bc4
CVideoHandler: Use EVideoType::INTRO and EVideoType::SPELLBOOK
2024-01-29 16:08:53 +01:00
Alexander Wilms
33e170d562
CVideoHandler: Call SDL_RenderClear() when playing intro, call SDL_RenderFillRect() for spellbook animation
2024-01-28 22:53:51 +01:00
Ivan Savenko
322c5faf63
Merge remote-tracking branch 'vcmi/develop' into lobby
2024-01-26 16:52:23 +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
0c1664dbe7
NKAI: various AI fixes after tests in headless
2024-01-20 22:55:30 +02:00
Andrii Danylchenko
cc7fc4a2c6
Fix headless mode
2024-01-20 22:55:27 +02:00
Ivan Savenko
ffa58152ac
Client-side support for hosting game server via lobby
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
8ea69e457a
Simplified applying of lobby packs
2024-01-19 23:49:59 +02:00
Ivan Savenko
d04241b10a
Code cleanup
2024-01-19 23:02:00 +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
Ivan Savenko
ef5686634d
Removed no longer used code
2024-01-04 23:48:58 +02:00
Ivan Savenko
4ed283a357
Merge pull request #3359 from IvanSavenko/crashfixes
...
Crashfixes
2023-12-22 15:17:59 +02:00
Ivan Savenko
ee976d676d
Fix crash on closing vcmi while opening is playing
2023-12-22 14:03:05 +02:00
Dydzio
83c2c22a6d
Change client's polling rate for server startup to 200 ms
2023-12-19 22:02:26 +01:00
Ivan Savenko
9f8a5119f9
Less strict check for Armageddon's Blade data files presence
2023-12-16 15:04:41 +02:00
Ivan Savenko
16e845e1c8
- Check for presence of AB files on startup
2023-12-16 13:46:29 +02:00
Ivan Savenko
873fd33e7a
Workaround for mingw and armeabi Android build
2023-12-13 19:23:32 +02:00
Ivan Savenko
0dce278a3b
Attempt to fix crash on app exit on Android
2023-12-13 16:50:13 +02:00
Ivan Savenko
af0afb251e
Correctly shutdown client media handlers
2023-11-13 16:27:15 +02:00
Ivan Savenko
a6f37b7cd7
Fixed few more memory leaks in client
2023-11-13 16:27:15 +02:00
Ivan Savenko
20ef3a69e7
Fix most of memleaks discovered by valgrind
2023-11-13 16:27:15 +02:00
Ivan Savenko
833051cced
Display exit confirmation dialog on Alt-F4
2023-11-12 17:35:43 +02:00
Alexander Wilms
f01ec55d21
Use the "nullptr" literal.
...
"nullptr" should be used to denote the null pointer
2023-10-27 18:18:59 +00:00
Johannes Schauer Marin Rodrigues
a1a5bc28c2
convert line endings from CRLF (Windows) to LF (Linux/Unix)
...
Mixed line endings cause problems when exporting patches with
git-format-patch and then trying to "git am" a patch with mixed and
non-matching line endings. In such a situation git will fail to apply
the patch.
This commit runs the dos2unix tools on the remaining files with CRLF
(\r\n) line endings to convert them to line-feeds (\n) only.
Files that are Windows specific like *.vcxproj and *.props files were
not converted.
Closes : #3073
2023-10-19 16:23:21 +02:00
Johannes Schauer Marin Rodrigues
f9e1b302c7
some spelling fixes
2023-10-18 01:41:02 +02:00
Laserlicht
be2b3afe48
implements sounds
2023-10-08 12:49:59 +02:00
Laserlicht
8de4b88a1b
basically playing
2023-10-08 12:49:59 +02:00
Ivan Savenko
195320dcf2
Removed remaining references to 'pim' name
2023-09-27 18:50:01 +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
97b7d44c88
Use ResourcePath for video accessing
2023-09-04 18:22:34 +03:00
Ivan Savenko
823ffa7a07
Always use ResourcePath for referencing images and animations
2023-09-04 18:22:34 +03:00
Ivan Savenko
44d16b32fe
Use API identical to std classes where possible
2023-08-23 16:32:29 +03:00
Ivan Savenko
142889e3a5
Give all threads created by client human-readable name for debug
2023-08-23 16:32:29 +03:00
Ivan Savenko
f13a53c1d9
Merge remote-tracking branch 'vcmi/beta' into develop
2023-08-12 17:28:47 +03:00
Ivan Savenko
d947c14495
Few more H3 data validation checks
2023-08-08 12:50:16 +03:00