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

2437 Commits

Author SHA1 Message Date
Ivan Savenko
0d66ddbeec GameState now uses random generator from server. Blocked access to rmg
on client
2024-07-16 13:13:38 +00:00
Ivan Savenko
63bcf7d83c Replaced most of usages of CRandomGenerator with vstd::RNG in library 2024-07-16 13:13:07 +00:00
Ivan Savenko
60a51e98de Remove usage of std::function from CRandomGenerator 2024-07-16 13:13:07 +00:00
Ivan Savenko
ad9750ed3e
Merge pull request #4186 from SoundSSGood/end-of-battle-artifacts-transfer
End of battle artifacts transfer
2024-07-16 12:45:13 +03: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
Ivan Savenko
c00a1e1b0c Fixed new issues detected by SonarCloud 2024-07-15 07:46:40 +00: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
SoundSSGood
b42c6dbf44 fixed regressions 2024-07-09 14:27:05 +03:00
SoundSSGood
ef1fbffad4 ArtifactsUIController class 2024-07-09 14:27:05 +03:00
SoundSSGood
f87762bc96 endBattleConfirm 2024-07-09 14:27:04 +03:00
SoundSSGood
6dd76908bc MoveArtifact struct not used now 2024-07-09 14:27:04 +03:00
SoundSSGood
5dbe88d9a4 End of battle BulkMoveArtifacts 2024-07-09 14:27:04 +03:00
Ivan Savenko
6300473ff8 Block AI from acting at the same time as guest-human during simturns 2024-07-08 20:57:47 +00:00
Ivan Savenko
c357fdb80d Reveal terrain whenever hero receives a secondary skill 2024-07-08 20:56:17 +00:00
Alexander Wilms
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
Ivan Savenko
3bea383b59 Merge branch 'vcmi/beta' into 'vcmi/develop' 2024-06-21 12:58:36 +00:00
Ivan Savenko
8c63a3e4de Running out of timer during battle will no longer force retreat 2024-06-19 19:59:06 +00:00
Ivan Savenko
2d0bd94135 Fix rmg generation if player list is not continuous 2024-06-17 13:35:58 +00:00
Ivan Savenko
3a602bd3d4
Merge pull request #4040 from MichalZr6/develop
Add amount of resurrected Vampires to the battle log
2024-06-12 17:35:39 +03:00
Ivan Savenko
b4c6906471 Merge branch 'vcmi/beta' into 'vcmi/develop' 2024-06-11 19:22:23 +00:00
MichalZr6
15f86c0284 Fixed issues from review 2024-06-11 16:47:23 +02:00
MichalZr6
65d22f17ae proper logging of drained life and resurrected count
new struct for keeping track of healed HP (also drained life) and resurrected count
2024-06-09 23:54:20 +02:00
Ivan Savenko
106a3b6c8e Fix self-visiting skipping battle on landing after flying above monster 2024-06-04 14:13:12 +00:00
Ivan Savenko
dcbfea018b Fix crash on disconnecting from the game 2024-06-04 14:12:16 +00:00
Ivan Savenko
b8beb4fb13 Fixes for various minor issues detected by Sonar Cloud 2024-06-01 11:48:30 +00:00
Ivan Savenko
f39aaf2495 After-battle object visitation will now occur after levelups 2024-06-01 10:06:16 +00:00
Ivan Savenko
df83fa33a1 Merge branch 'vcmi/master' into 'vcmi/develop' 2024-05-31 09:34:21 +00:00
Ivan Savenko
5ecb527252
Merge pull request #3997 from IvanSavenko/serialization_refactor
[1.6] Serialization refactor
2024-05-30 19:13:21 +03:00
Ivan Savenko
9e0bae96cc
Merge pull request #3895 from SoundSSGood/CWindowWithArtifacts-refactoring2
CWindowWithArtifacts refactoring part2
2024-05-30 19:12:39 +03:00
Ivan Savenko
888149c6f6 Implemented simple versioning system for multiplayer 2024-05-29 20:08:32 +00: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
a8b07477b4 Fix hero kill mission not registered if target hero was the attacker 2024-05-28 15:43:06 +00:00
Ivan Savenko
3afbd03089 Attempt to track down crash on battle end 2024-05-28 14:41:05 +00:00
Ivan Savenko
64ad57470c Fix crash on applying necromancy when battle ended in a draw 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
3ad618e0d8 Fix crash on bonus with invalid spell ID 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
215b279ea8 Contact between allies will no longer break simturns 2024-05-19 20:18:14 +00:00
Ivan Savenko
e04c662bc9 Owned object in range of enemy heroes now break simturns 2024-05-19 20:03:24 +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
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
004e6d1fcb Fix crash on starting random map with random number of players 2024-05-17 18:25:09 +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
84bc6c42db Added 'Serializeable' base class for classes serializeable by pointer 2024-05-16 18:40:59 +00:00
Ivan Savenko
aadbf6dd6a Ignore duplicate disconnected calls 2024-05-16 08:03:06 +00:00
Ivan Savenko
1b1f724de1
Merge pull request #3970 from Laserlicht/extra
ExtraOptions improvements
2024-05-15 15:20:59 +03:00
Laserlicht
1274790023
reuse strings 2024-05-15 12:40:01 +02:00
Laserlicht
8b59b78003
Publish if cheats or unlimited replays allowed to all players 2024-05-14 22:48:32 +02:00
Ivan Savenko
93038b791e Fix connection termination handling 2024-05-13 14:09:59 +00: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
Dydzio
f20ef4f1b3 Fix hero order for giving bonuses in town to match H3. 2024-05-11 20:21:02 +02:00
Ivan Savenko
145cd38025 Use sight center for fow reveal actions 2024-05-10 16:48:44 +00:00
Ivan Savenko
19f2fbce1e Reveal terrain around newly recruited hero to account for Scouting 2024-05-10 16:48:20 +00:00
Ivan Savenko
2521557f68 Fixed some newly reported issues from SonarCloud 2024-05-10 13:40:24 +00:00
Ivan Savenko
880f692762 Slightly better randomization of map template 2024-05-08 17:11:14 +00:00
Ivan Savenko
8b861fc58f Do not check for guards when teleporting using means other than DD 2024-05-07 20:05:23 +00:00
Ivan Savenko
6ac67775f5
Merge pull request #3861 from Laserlicht/pvp_options
Pvp options
2024-05-03 10:38:42 +03:00
Laserlicht
1f209fd94a use MetaString 2024-05-02 21:03:23 +02:00
Laserlicht
37d9e862c2 Code review 2024-05-02 20:15:34 +02:00
Laserlicht
b9c4a56360 translate also cheater message 2024-05-01 16:06:34 +02:00
Laserlicht
812e96ebb1 Guest can also use & renaming 2024-05-01 15:58:22 +02:00
Laserlicht
5b8b75da22 small fixes 2024-05-01 15:30:35 +02:00
Laserlicht
89b750c749 allow translations in chat 2024-05-01 15:00:36 +02:00
Laserlicht
5413fc2c7e finished 2024-05-01 01:26:51 +02:00
Laserlicht
e505aab29a scrolling works 2024-05-01 00:49:33 +02:00
Ivan Savenko
ac11a0e639 Blocked most of incoming network packs during turns of other players 2024-04-30 17:51:31 +03:00
Laserlicht
0565c062e5 Server functionality 2024-04-30 01:52:49 +02:00
Ivan Savenko
c74d728f5a
Merge pull request #3833 from SoundSSGood/artifacts-costumes
Artifacts costumes
2024-04-28 16:10:24 +03:00
Ivan Savenko
142bbe652a
Merge pull request #3829 from IvanSavenko/goldmaster
Tweaks for public release mode
2024-04-28 13:11:38 +03:00
SoundSSGood
ce68b3f45d class CArtifactsOfHeroMain : public CKeyShortcut 2024-04-27 21:35:38 +03:00
SoundSSGood
ce9d2d8ab8 Switching costume 2024-04-27 21:35:37 +03:00
SoundSSGood
25dea7e364 Saving costume 2024-04-27 21:35:37 +03:00
Ivan Savenko
b8b42978b1 Reduce includes in headers 2024-04-26 13:26:33 +03:00
Ivan Savenko
5010344df0 Added serialization of turn timer handler 2024-04-26 13:16:02 +03:00
Ivan Savenko
090a1c7764 TurnTimerHandler is now a unique_ptr 2024-04-26 13:15:39 +03:00
Ivan Savenko
a99d5e6fa1 Simplify code 2024-04-26 12:44:57 +03:00
Ivan Savenko
98416acac4 Hide error messages from server in goldmaster mode 2024-04-25 18:52:53 +03:00
Ivan Savenko
e5f8cefa7f Store and send mod list and game version for game rooms 2024-04-23 17:15:59 +03:00
Ivan Savenko
0b01cc4676 Fix possible crash on out-of-range access 2024-04-22 15:33:01 +03:00
Ivan Savenko
d5a2ad1be8 Allow sending requests to move across multiple tiles at once 2024-04-20 12:28:50 +03:00
Dydzio
b351946afd Add some utility bonuses for player resources boosting 2024-04-15 21:18:45 +02:00
SoundSSGood
e8a6308a15 Artifacts swap check 2024-04-10 23:30:31 +03:00
Ivan Savenko
bcd4a8c961
Merge pull request #3736 from IvanSavenko/fix_server_translations
Do not translate strings on server side
2024-04-10 19:12:34 +03:00
Ivan Savenko
5b43720dda
Merge pull request #3686 from dydzio0614/dimension-door-changes
Dimension door changes
2024-04-10 11:47:36 +03:00
Ivan Savenko
f14aec5876 Trim cheats so 'vcmiartifacts ' will be recognized as single-word cheat 2024-04-09 17:08:24 +03:00
Ivan Savenko
42616cf4e8 Fix text formatting, fix todo's 2024-04-09 16:13:30 +03:00
Ivan Savenko
18ece6dcf6 Remove some usages of server-side translations 2024-04-09 16:13:30 +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
Dydzio
3f94d316cb Fix cursor & add way to access danger info for HotA-like DD cursor 2024-04-01 20:18:35 +02:00
Dydzio
f51e1a0ba6 Working version of dimension door triggering guards 2024-04-01 19:00:24 +02:00
Ivan Savenko
acd2352653
Merge pull request #3699 from IvanSavenko/lobby_tweaks
Minor tweaks for most noticeable issues with new lobby
2024-03-30 00:13:14 +02:00
Ivan Savenko
8f0236f046 Move account login details from settings to persistent storage, with
separate entries depending on server hostname for more convenient
testing
2024-03-29 17:04:52 +02:00
Evgeny Malygin
25125f96da
Fix: licenses, pragma guards, StdInc 2024-03-29 07:48:52 +02:00
Evgeny Malygin
54405e33bc
Fix: prevent possible int16_t overflow 2024-03-29 05:37:47 +02:00
Ivan Savenko
5d188024db Set room status to "In Game" once gameplay starts 2024-03-27 13:10:55 +02:00
Ivan Savenko
715e094f5c Implemented room description display (map/template name) 2024-03-27 13:10:55 +02:00
Ivan Savenko
be641d1710 Split 'loginSuccess' into server and client-specific versions 2024-03-27 13:10:55 +02:00
Ivan Savenko
6a5696604e
Merge pull request #3656 from SoundSSGood/backpack-management
Backpack management init
2024-03-24 19:09:32 +02:00
Ivan Savenko
c21e5bb0fb Always validate messages in debug mode. Fixes for schemas 2024-03-08 16:32:40 +02:00
Ivan Savenko
456dfd9e3d Added debug validation of lobby protocol on every send/receive 2024-03-08 16:32:40 +02:00
SoundSSGood
9f688e6fb7 MoveArtifact, BulkMoveArtifacts PlayerColor player field 2024-03-07 22:28:56 +02:00
SoundSSGood
b1f52eec41 ManageBackpackArtifacts 2024-03-07 18:16:22 +02:00
Ivan Savenko
bea80a60fb
Merge pull request #3644 from Laserlicht/fix_castle_replay
fix castle quick combat
2024-03-07 10:21:19 +02:00
Laserlicht
119fa1e96c
seperate path for ai vs human 2024-03-04 20:34:43 +01:00
Laserlicht
37f621abbd fix visiting objects other than town 2024-02-28 23:13:51 +01:00
Laserlicht
b0b3b9bb84 fix castle replay 2024-02-28 22:26:53 +01:00
Ivan Savenko
54796c7c56 Rename toJson to toString/toCompactString for consistency 2024-02-26 12:55:49 +02:00
Ivan Savenko
c23953eac5 Remove custom casts 2024-02-14 12:56:37 +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
7cf5e317a4
Merge pull request #3612 from IvanSavenko/demon_summon_fix
Fixes demon summoning
2024-02-13 16:05:13 +02:00
Ivan Savenko
bfdb9a85f0
Merge pull request #3611 from IvanSavenko/lobby_fixes
Networking code fixes
2024-02-13 15:30:26 +02:00
Ivan Savenko
ece3403fc7 Fixes demon summoning - sacrificed creatures no longer remain after
battle and included into casualties
2024-02-12 21:53:38 +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
6db405167d Clarified some (im)possible null dereferences 2024-02-12 13:05:30 +02:00
Ivan Savenko
392c360f88 Replaced some usages of void * with more clear CPack * 2024-02-12 12:53:10 +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
c2286e5126 Server now consists from library and separate executable projects 2024-02-11 17:55:02 +02:00
Ivan Savenko
f2ecd4cf11 Merge branch 'develop' into 'lobby' 2024-02-11 16:13:13 +02:00
Ivan Savenko
ad602573ff
Merge pull request #3600 from dydzio0614/sod-fly
Fix SoD fly mechanics
2024-02-11 12:26:20 +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
Dydzio
fd9810adf4 Working SoD version of fly 2024-02-07 19:27:02 +01:00
Ivan Savenko
a97d1d9377 Fix crash on broken ENCHANTED bonus 2024-02-05 21:07:01 +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
80fc2bb695 Merge remote-tracking branch 'vcmi/develop' into lobby 2024-02-03 21:11:34 +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
6eef197cea Removed no longer used mutexes from match server 2024-02-03 17:04:14 +02:00
Ivan Savenko
f97ffd8e9a Better handling of disconnects, code cleanup 2024-02-02 15:32:06 +02:00
Ivan Savenko
29c0989849 Use std::byte to manage network data 2024-02-02 02:02:09 +02:00
Ivan Savenko
c9ebf32efd Send error messages if operation fails 2024-02-02 00:12:30 +02:00
Ivan Savenko
58ee72f684
Merge pull request #3588 from IvanSavenko/fix_regressions
Fix regressions
2024-02-01 22:27:52 +02:00
Ivan Savenko
7247038458
Merge pull request #3574 from SoundSSGood/altar-fixes
Artifacts altar related fixes
2024-02-01 22:27:41 +02:00
Ivan Savenko
b25d4d76a7 Fix Grail digging success message 2024-02-01 18:22:11 +02:00
SoundSSGood
a42b60feb9 suggested changes 2024-02-01 13:28:08 +02:00
Ivan Savenko
a9866bb5c6 Added RandomGeneratorUtil::nextItemWeighted convenience method 2024-01-31 00:17:40 +02:00
Ivan Savenko
c5c46a7c9a Implemented connecting to server via proxy 2024-01-30 21:31:41 +02:00
Ivan Savenko
48006307e1
Merge pull request #3563 from Laserlicht/quick_combat
quick combat vs ai
2024-01-30 17:33:34 +02:00
SoundSSGood
c6ca6ad835 sacrifice routine 2024-01-27 23:01:57 +02:00
SoundSSGood
f66918ea14 bulk move to altar 2024-01-27 15:28:23 +02:00
SoundSSGood
652f009181 arts altar - arts holder 2024-01-27 15:28:21 +02:00
Laserlicht
e48e8e0f01
fix if attacked 2024-01-27 01:57:28 +01: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