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

6806 Commits

Author SHA1 Message Date
Tomasz Zieliński
098c88eff4 Update serialization version 2024-05-29 20:52:59 +02:00
Tomasz Zieliński
3ac603767d Basic config for regular unit placement in Black Tower 2024-05-29 20:20:33 +02:00
Ivan Savenko
dd2d0e285d
Merge pull request #4038 from IvanSavenko/pathfinder_fixes
[1.5.2] Pathfinder fixes
2024-05-29 18:15:51 +03:00
Ivan Savenko
df81c1d61a
Merge pull request #4050 from IvanSavenko/bonus_fix
[1.5.2] Bonus updaters fix
2024-05-29 18:14:14 +03:00
Ivan Savenko
2fcbfd978a
Merge pull request #4049 from IvanSavenko/campaign_fix
[1.5.2] Campaign fixes
2024-05-29 18:14:04 +03:00
Ivan Savenko
2ff28f6957
Merge pull request #4018 from IvanSavenko/voting
[1.5.2?] Multiplayer voting
2024-05-29 18:13:42 +03:00
Ivan Savenko
49138e3de9 Fixes Adrienne starting without Inferno spell in campaign 2024-05-29 14:28:36 +00:00
Ivan Savenko
d8f48f2c59
Merge pull request #4035 from IvanSavenko/stabilization
[1.5.2] Fixes for crashes in 1.5.1
2024-05-28 22:59:55 +03:00
Ivan Savenko
58b1e74342 Workaround - check also for valueType when updating bonuses
We should not assume that spells always have a single bonus with same
type/subtype
2024-05-28 17:01:30 +00:00
Ivan Savenko
28081085a8 Create separate instance of updater for every bonus 2024-05-28 16:43:28 +00:00
Ivan Savenko
520f690d35 Fix transfer of non-first artifacts in backpack if hero does not
transfers as well
2024-05-28 14:21:29 +00:00
Ivan Savenko
3847e3e2b4 Better comments, remove dead code 2024-05-28 13:43:16 +00:00
SoundSSGood
07239dcfb5 artifact parts calc 2024-05-24 21:22:08 +02:00
Ivan Savenko
f7989f6dcb Allow landing on guarded tiles when flying in from guarded tile 2024-05-23 19:01:30 +00:00
Ivan Savenko
ac047d0d6d Fixed handling of original game rules pathfinding 2024-05-23 19:01:30 +00:00
Ivan Savenko
0a3cfea017 Simplify code 2024-05-23 19:01:30 +00:00
Ivan Savenko
d7f5d24b99 If original movement rules are on, it is not possible to attack guards
from visitable object directly
2024-05-23 19:01:30 +00:00
Ivan Savenko
ef29c47408 Added GUARDED state to distinguish from blocked visitable 2024-05-23 19:01:30 +00:00
Ivan Savenko
c27dd04a1e Abort game loading if corrupted mod is found and show explanation 2024-05-23 12:46:28 +00:00
Ivan Savenko
45bb6ada3d Add compatibility for 64-bit 1.5.1 vs any 1.5.2 MP game 2024-05-23 12:46:28 +00:00
Ivan Savenko
f8a206b0c6 Fix serialization of size_t breaking 32<->64 bit compatibility 2024-05-23 12:46:28 +00:00
Ivan Savenko
c85ea98519
Merge pull request #4019 from IvanSavenko/simturn_tweaks
[1.5.2] Simturn tweaks
2024-05-21 14:18:42 +03:00
Ivan Savenko
ffe14fc1fc
Merge pull request #4022 from vcmi/master
Merge master -> beta
2024-05-20 18:09:51 +03:00
Ivan Savenko
52840afb24 Try to detect corrupted mod earlier 2024-05-20 11:00:35 +00:00
Ivan Savenko
215b279ea8 Contact between allies will no longer break simturns 2024-05-19 20:18:14 +00:00
Ivan Savenko
10b50cd905 It is now possible to vote for simturns and turn timer changes 2024-05-19 18:31:32 +00:00
Ivan Savenko
6f6555d19c Downgrade fatal exception to disconnection message 2024-05-19 12:54:51 +00:00
Ivan Savenko
8931121d2e
Merge pull request #3995 from IvanSavenko/old_projects_remove
[1.6] Remove old project files
2024-05-19 15:44:32 +03:00
Ivan Savenko
d5f32c27b0
Merge pull request #3996 from IvanSavenko/retaliation_tweaks
[1.5.2] Retaliation preview tweaks
2024-05-19 15:44:16 +03:00
Ivan Savenko
692cbfb7e2
Merge pull request #3992 from IvanSavenko/mod_validation_fix
Tweaks to modding docs
2024-05-19 15:43:16 +03: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
0dfa781655 Add mutex as a quick fix for concurrent access to text handler by client
and server
2024-05-18 09:02:21 +00:00
Ivan Savenko
8754e0ebb3 Code formatting and cleanup 2024-05-17 17:10:29 +00:00
Ivan Savenko
f3de2cfe1c Removed broken & unused serialization of player interface and AI 2024-05-17 16:35:53 +00:00
Ivan Savenko
31349f3052 Fix handling of missing video files 2024-05-17 15:43:21 +00:00
Ivan Savenko
7461df161c lib now uses shared_ptr for entities. Removed manual memory management. 2024-05-17 15:04:05 +00:00
Ivan Savenko
0d427980bc Entities are now non-copyable 2024-05-17 14:47:09 +00:00
Ivan Savenko
69e33e406d Try to minimize dll linkage usage 2024-05-17 13:09:45 +00:00
Ivan Savenko
03054af949 Add description for serialization changes, fix CURRENT value 2024-05-17 13:09:08 +00:00
Ivan Savenko
a688bc6b69 Remove debug code 2024-05-17 13:08:41 +00:00
Ivan Savenko
7f9df2ef6f Tweaks to retaliation damage calculation:
- method now uses early returns to avoid deeply nested if's
- assume that retaliation damage is zero if target will die from attack
- account for BLOCKS_RETALIATION bonus when computing whether target
will retaliate
2024-05-17 12:23:51 +00:00
SoundSSGood
7abfa7b42a ArtifactPosition::TRANSITION_POS now is simple ArtSlotInfo 2024-05-17 14:59:51 +03:00
Ivan Savenko
eb67e04ccb Remove old and unmaintained codeblocks project 2024-05-17 10:44:57 +00:00
Ivan Savenko
3f6eb13ee0 Delete old and unmaintained msvc project files 2024-05-17 10:44:11 +00:00
Ivan Savenko
721b15d9de Merge branch 'vcmi/master' into 'vcmi/develop' 2024-05-17 08:26:37 +00:00
Ivan Savenko
07813c9a79 Removed non-functional updateEntity in VLC 2024-05-16 22:05:26 +00:00
Ivan Savenko
a0ad810033 Remove old code 2024-05-16 19:11:33 +00:00
Ivan Savenko
2ed355952c Added proper serialization for unordered_map 2024-05-16 19:03:04 +00:00
Ivan Savenko
42f7a48fa4 Simplified integer serialization code 2024-05-16 18:53:49 +00:00
Ivan Savenko
84bc6c42db Added 'Serializeable' base class for classes serializeable by pointer 2024-05-16 18:40:59 +00:00
Ivan Savenko
65f63e862c Tweaks to modding docs & error reporting based on discovered issues 2024-05-16 15:14:36 +00:00
Ivan Savenko
f309a4eb82 Exclude some AB creatures from randomization picks
This changes handling of several campaign-only creatures to be in line
with H3 - Sharpshooters, Enchanters and Azure/Rust/Faerie/Crystal
dragons.

Now these creatures will not be picked for
- random creatures in Refugee Camp
- as replacement for Random Monster object from map editor

Random map generator is not affected and can still pick this creatures
(confirmed to be same in H3)
2024-05-16 09:53:37 +00:00
Ivan Savenko
f963b827e9 Add more descriptive error messages 2024-05-16 08:03:06 +00:00
Ivan Savenko
cce3f1cb2d Implemented compact serialization of integer numbers 2024-05-15 19:50:01 +00:00
Ivan Savenko
87eac164e6 Implemented string deduplication for serializer
Every unique string will now be serialized only once.
Reduces save size by ~20%
2024-05-15 19:49:59 +00:00
Ivan Savenko
5b182c31df Add 'hasFeature' method for convenience 2024-05-15 19:49:34 +00:00
Ivan Savenko
7ad64207ed Prefer high-quality bik's to smk's 2024-05-15 17:05:17 +00:00
Ivan Savenko
1b1f724de1
Merge pull request #3970 from Laserlicht/extra
ExtraOptions improvements
2024-05-15 15:20:59 +03:00
Ivan Savenko
35954dc41b Simple workaround to fix vcmiserver shutdown procedure
At the moment, vcmilobby *requires* async writes in order to handle
multiple connections with different speeds and at optimal performance,
without hanging if one player is too slow and can't eat all data server
sent to him at once.

However server (and potentially - client) can not handle this mode and
may shutdown either socket or entire asio service too early, before all
writes are performed, leading to weird freeze on ending scenario where
client would not receive notifications about end of game.
2024-05-14 19:40:20 +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
00728ded88 Report more information on exception 2024-05-14 12:48:19 +00:00
Ivan Savenko
c92a5bbbab Attempt to track crashes with unclear cause 2024-05-14 09:44:40 +00:00
Ivan Savenko
bb5627e98c
Merge pull request #3954 from IvanSavenko/fix_compile
Fix compilation issues
2024-05-14 12:16:27 +03:00
Laserlicht
941c1576c5
improve extraoptions 2024-05-14 00:33:30 +02:00
Ivan Savenko
c786354af3 Add better crash message for zero-length battlefield list 2024-05-13 21:03:06 +00:00
Ivan Savenko
62b564650d Fix possibly hanging pointer to deleted CGObjectInstance
Was stored by CRemoveObjectOperation and accessed on destruction even
though it has been removed by the game
2024-05-13 16:19:14 +00:00
Ivan Savenko
93da58beed Do not use locks on single-threaded server.
Especially since this lock is global and is shared between client and
server for no reason
2024-05-13 15:42:33 +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
93038b791e Fix connection termination handling 2024-05-13 14:09:59 +00:00
Ivan Savenko
58d1c93c1b
Merge pull request #3931 from IvanSavenko/retaliation_preview
[1.5.1] Retaliation preview
2024-05-13 14:40:00 +03:00
Ivan Savenko
6d08ec6323 More robust handling of connection errors
Fixes potentially hanging by heartbeat sockets
2024-05-12 19:13:17 +00:00
Ivan Savenko
62c2be160a Added changing thread name for FreeBSD 2024-05-12 15:10:29 +00:00
Ivan Savenko
06aab2ccbb
Merge pull request #3924 from vcmi/fix_road_routing
Route roads away from zone borders
2024-05-12 16:02:38 +03:00
Ivan Savenko
33fd18e828
Merge pull request #3938 from IvanSavenko/lobby_fixes
[1.5.1] Fixes for issues with lobby server
2024-05-12 10:13:00 +03:00
Ivan Savenko
9049fb738a
Merge pull request #3946 from dydzio0614/mana-vortex-hero-order
Fix "bonusing" town building visiting hero order
2024-05-11 21:58:23 +03:00
Ivan Savenko
0ce78cae06
Merge pull request #3926 from IvanSavenko/optimize_map_list_load
[1.5.1] Improve performance of parsing of map headers for map list
2024-05-11 21:56:58 +03:00
Dydzio
f20ef4f1b3 Fix hero order for giving bonuses in town to match H3. 2024-05-11 20:21:02 +02:00
Ivan Savenko
dae3569077 Fix build 2024-05-11 16:18:21 +00:00
Ivan Savenko
0403626c93 Fix excessive calls of steady_timer::async_wait 2024-05-11 16:10:07 +00:00
Ivan Savenko
67604e1e01 Reapply "Simple implementation of heartbeat package"
This reverts commit ede92c1a9c.
2024-05-11 16:10:08 +00:00
Ivan Savenko
4c3aac8f19 Use async_write to prevent locks if receiver is too slow 2024-05-11 16:09:03 +00:00
Ivan Savenko
147db10a28 Avoid crash if configs file is missing, e.g. broken version of mod 2024-05-11 13:19:07 +00:00
Ivan Savenko
1bc7c29111 Add workaround for visiting Altar of Sacrifice on 1.4 saves 2024-05-11 13:19:07 +00:00
Ivan Savenko
16f43254b5 Use async_resolve to avoid crash on resolve error 2024-05-11 13:19:07 +00:00
Ivan Savenko
31401e219f Fix possible crash on nullptr dereference 2024-05-11 13:19:07 +00:00
Ivan Savenko
ac4204f660 Fixed calculation of retaliation damage 2024-05-10 19:40:14 +00:00
Tomasz Zieliński
5a979e42e2 Satisfy SonarCloud 2024-05-10 21:14:15 +02:00
Tomasz Zieliński
ee27a79aa1 Sonarcloud issues 2024-05-10 17:07:09 +02:00
Ivan Savenko
3acc1f1845 Improve performance of parsing of map headers for map list 2024-05-10 14:30:39 +00:00
Tomasz Zieliński
21bb61fc4d Unused variable 2024-05-10 15:56:49 +02:00
Tomasz Zieliński
7cb17afe7a Fix diagonal paths if we need to use them 2024-05-10 15:53:54 +02:00
Ivan Savenko
2521557f68 Fixed some newly reported issues from SonarCloud 2024-05-10 13:40:24 +00:00
Tomasz Zieliński
a6fa6855dc Route roads away from zone borders 2024-05-10 15:35:33 +02:00
Ivan Savenko
2ddb41e654 Merge branch 'vcmi/master' into 'vcmi/develop' 2024-05-10 08:09:51 +00:00
Ivan Savenko
b4af84a3ce
Merge pull request #3911 from vcmi/penrose_cleanup
Clean up excessive operations and logs
2024-05-08 22:43:28 +03:00
Tomasz Zieliński
2297e09fcb Clean up excessive operations and logs 2024-05-08 15:51:42 +02:00
Ivan Savenko
718d42f0d6
Merge pull request #3910 from vcmi/center_penrose
Shift center of tiling to center of the map
2024-05-08 16:40:00 +03:00
Ivan Savenko
72703f89fe
Merge pull request #3909 from IvanSavenko/clean_rmg_crash
Disable 'catch everything' block in RMG in favor of clean crash
2024-05-08 16:39:52 +03:00
Tomasz Zieliński
37d062f1eb Fix incorrect comparison operator 2024-05-08 15:09:11 +02:00
Tomasz Zieliński
eece03d24f Fix for centering the tiles, extra logs 2024-05-08 13:16:26 +02:00