1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-26 08:41:13 +02:00
Commit Graph

6507 Commits

Author SHA1 Message Date
Tomasz Zieliński
263d439605 Fix uninitialized variable 2024-03-24 07:54:11 +01:00
Evgeny Malygin
b419c70f18
Fix(minizip/minizip.c): fix possibly uninitialized variable 2024-03-24 07:47:37 +02:00
Evgeny Malygin
5e85a4c629
mztools.c: adjust code style 2024-03-24 07:44:33 +02:00
Evgeny Malygin
da3a009cbb
Fix(minizip/mztools.c): prevent file descriptor leak 2024-03-24 07:40:57 +02:00
Kris-Ja
ff35a27176 Fix loading saved games (add ESerializationVersion) 2024-03-23 22:03:06 +01:00
Kris-Ja
05bbb45824 change MANA_PER_KNOWLEGDE to percentage 2024-03-23 20:28:49 +01:00
Tomasz Zieliński
0c0a1bd777 Don't scale distance of large treasures beyond 30K value 2024-03-20 15:35:06 +01:00
Tomasz Zieliński
433765714f Add less obstacles in zones with low treasure value 2024-03-20 14:42:09 +01:00
Tomasz Zieliński
02fc410a98 Sonarcloud fixes 2024-03-20 13:51:16 +01:00
Tomasz Zieliński
68cdcb893e Include treasure value in min distance calculation 2024-03-20 12:39:07 +01:00
Tomasz Zieliński
a8d1d72b15 Cleaned logs 2024-03-20 10:12:48 +01:00
Tomasz Zieliński
662bb0d1f6 Cut straight paths for better passability 2024-03-20 10:03:26 +01:00
Tomasz Zieliński
25a62b504f Perfection achieved? 2024-03-20 09:05:27 +01:00
Tomasz Zieliński
1546a221d1 Best result so far 2024-03-20 08:36:02 +01:00
Andrey Filipenkov
006ec227ce [iOS] fix crash on starting game
apparently iOS can't change socket buffer size
2024-03-20 05:52:25 +03:00
DjWarmonger
3e959f3ad9
Merge pull request #3132 from vcmi/reward_select_all
Support for "selectAll" reward
2024-03-14 21:46:02 +01:00
DjWarmonger
306896601a
Merge pull request #3636 from vcmi/rmg_tweaks
Rmg tweaks
2024-03-14 19:54:25 +01:00
DjWarmonger
2c9b7089ad
Merge pull request #3645 from vcmi/save_rmg_options
Save rmg options
2024-03-14 19:54:08 +01:00
Tomasz Zieliński
a93dd25867 Update docs to be in line with existing code. 2024-03-14 10:22:15 +01:00
Ivan Savenko
94ecef748b
Merge pull request #3654 from IvanSavenko/lobby_protocol
Lobby protocol documentation and fixes
2024-03-11 18:07:57 +02:00
Andrii Danylchenko
c9c118cff2
Merge pull request #3595 from vcmi/object-graph
NKAI Object graph
2024-03-10 20:26:17 +02:00
Tomasz Zieliński
8ef7daf45a Missing change 2024-03-09 11:02:43 +01:00
Tomasz Zieliński
69cfc83be3 Fix issue found by Sonarcloud 2024-03-09 08:17:46 +01:00
Tomasz Zieliński
87bf4b752a Better implementation of granting multiple rewards 2024-03-09 07:38:11 +01:00
Tomasz Zieliński
fe8bcc5758 Merge remote-tracking branch 'origin/develop' into reward_select_all
# Conflicts:
#	lib/mapObjects/CRewardableObject.cpp
2024-03-09 06:50:56 +01:00
Ivan Savenko
c21e5bb0fb Always validate messages in debug mode. Fixes for schemas 2024-03-08 16:32:40 +02:00
Ivan Savenko
0946f5e690 Fix file name in header 2024-03-08 16:32:40 +02:00
Ivan Savenko
2c1b142d68 Added support for 'const' field to json validator 2024-03-08 16:32:39 +02:00
SoundSSGood
d7607983fc sonarcloud warnings 2024-03-08 14:33:03 +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
SoundSSGood
d143f53d7e using deque for hero's backpack storage 2024-03-07 18:16:21 +02:00
Andrii Danylchenko
b236384356 NKAI: graph add battle layer 2024-03-02 15:54:05 +02:00
Andrii Danylchenko
047e076d05 NKAI: visual logger 2024-03-02 15:54:05 +02:00
Alexander Wilms
ea48257100 Fix SonarCloud issues
Replace the use of "::value" with "std::is_abstract_v" and similar issues
2024-03-02 14:08:03 +01:00
Tomasz Zieliński
28f76b2839 Actually, avoid guarded object altogether 2024-03-01 18:17:17 +01:00
Tomasz Zieliński
4e88290962 Actually avoid only monsters 2024-03-01 18:10:05 +01:00
Tomasz Zieliński
8f1638f78a Try to not route roads through passable objects 2024-03-01 17:48:07 +01:00
Tomasz Zieliński
d078808c9f Merge remote-tracking branch 'origin/develop' into rmg_tweaks 2024-03-01 16:55:05 +01:00
Tomasz Zieliński
17fc1604ca Remove unused file 2024-02-29 20:20:35 +01:00
Ivan Savenko
d5a96a122a Add additional constructor to JsonNode from const char *
Fixes an issue where due to implicit conversion JsonNode(bool) will be
called instead of expected JsonNode(std::string)
2024-02-29 17:33:00 +02:00
Tomasz Zieliński
b7320bbc8a Cleanup 2024-02-29 13:04:48 +01:00
Tomasz Zieliński
2c32c770f7 First version that works in lobby 2024-02-29 12:45:08 +01:00
Ivan Savenko
57eece233b Ignore BOM at the start of json file 2024-02-26 12:55:49 +02:00
Ivan Savenko
f86708bf37 Fix json5 parsing 2024-02-26 12:55:49 +02:00
Ivan Savenko
c90fb47c23 Converted json validator into a class 2024-02-26 12:55:49 +02:00
Ivan Savenko
d2844a5eeb Cleared up code 2024-02-26 12:55:49 +02:00
Ivan Savenko
08deae4186 Moved static methods outside of vcmi namespace 2024-02-26 12:55:49 +02:00
Ivan Savenko
757f77378d Remove unused code 2024-02-26 12:55:49 +02:00
Ivan Savenko
29860848a5 Cleanup 2024-02-26 12:55:49 +02:00
Ivan Savenko
18bbccd167 Unify formatting 2024-02-26 12:55:49 +02:00
Ivan Savenko
2632ab04f5 Partial support for json5 2024-02-26 12:55:49 +02:00
Ivan Savenko
41493d6f67 Implemented 'strict' json support 2024-02-26 12:55:49 +02:00
Ivan Savenko
d1c274f93f Replaced vector of strings with simple bool for flag 2024-02-26 12:55:49 +02:00
Ivan Savenko
922966dcf8 Renamed JsonNode::meta to more logical modScope. Member is now private 2024-02-26 12:55:49 +02:00
Ivan Savenko
e73516b7d1 Simplified template magic in JsonNode 2024-02-26 12:55:49 +02:00
Ivan Savenko
08a27663f9 Reworked JsonNode constructors to more logical form 2024-02-26 12:55:49 +02:00
Ivan Savenko
54796c7c56 Rename toJson to toString/toCompactString for consistency 2024-02-26 12:55:49 +02:00
Ivan Savenko
a2b8eaf7fb Do not escape '/' when writing json 2024-02-26 12:55:49 +02:00
Ivan Savenko
25146bfa93 Replace custom class with string_view 2024-02-26 12:55:49 +02:00
Ivan Savenko
ca9a16e30e Partially updated schema validation to draft v6 2024-02-26 12:55:49 +02:00
Ivan Savenko
bc9e961252 Better checks for incoming data 2024-02-25 20:05:52 +02:00
Ivan Savenko
6901945b6e Fix possible thread race on sending packet from two threads 2024-02-25 20:05:28 +02:00
Ivan Savenko
7b6b64894c
Merge pull request #3624 from IvanSavenko/fix_crash
Fix crash on using heal in SPELL_AFTER_ATTACK bonus
2024-02-25 15:01:32 +02:00
Ivan Savenko
7c843ff0f7
Merge pull request #3627 from IvanSavenko/random_town_names
Town names randomization fix
2024-02-25 15:01:22 +02:00
Tomasz Zieliński
af0207470d - Increased minimal obstacle density on surface
- Decreased minimal obstacle density in the underground
2024-02-25 12:25:23 +01:00
Tomasz Zieliński
2e8801084d Clean up RMG logs 2024-02-25 11:40:01 +01:00
Ivan Savenko
c513dc1bc7 Fix code style & formatting 2024-02-19 15:59:55 +02:00
Ivan Savenko
779625415f Guard against concurrent writes on same asio::socket instance 2024-02-19 13:47:06 +02:00
Ivan Savenko
f620a07389 Add protocol validation 2024-02-19 13:46:07 +02:00
Ivan Savenko
81e44711a2 Remove no longer needed workaround 2024-02-19 13:45:50 +02:00
Ivan Savenko
fc252bb9eb Random town names are now guaranteed to be unique on the map 2024-02-19 00:36:08 +02:00
Ivan Savenko
10b35ceecb Replaced assertions with exceptions for invalid input in RNG 2024-02-19 00:35:21 +02:00
Ivan Savenko
c0dc1040c2 Fixes crash on attempt to dynamic_cast AbilityCaster to Unit 2024-02-18 20:06:07 +02:00
Alexander Wilms
2ea78a5883 Fix float comparisons
Replace this "==" with a more tolerant comparison operation.
Floating point numbers should not be tested for equality cpp:S1244
2024-02-14 23:30:29 +01:00
Ivan Savenko
110ef5f66e
Merge pull request #3614 from IvanSavenko/sonarcloud_fixes_2
Sonarcloud fixes 2
2024-02-14 16:44:58 +02:00
Ivan Savenko
3740f8b02f Moved bonus parsing to a new file 2024-02-14 15:48:06 +02:00
Ivan Savenko
0b7bf56597 Remove old files 2024-02-14 14:02:41 +02:00
Ivan Savenko
c3957c2c2a Moved json files to new directory, split on per-class basis 2024-02-14 13:08:24 +02:00
Ivan Savenko
c23953eac5 Remove custom casts 2024-02-14 12:56:37 +02:00
Ivan Savenko
0d74959a33 Better float comparison 2024-02-14 12:07:07 +02:00
Ivan Savenko
6d6137accc Simplified code 2024-02-14 12:07:07 +02:00
Ivan Savenko
45c971a405 Replace throws() with nothrow 2024-02-14 12:07:07 +02:00
Ivan Savenko
7359b66f99 Do not use floating point equality checks 2024-02-14 12:07:07 +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
Alexander Wilms
678cacbd25 Remove more redundant virtual specifiers
`grep -nr "virtual " | grep -v googletest | grep " override" | grep -v overriden > ../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(":",2)
        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-13 15:21:30 +01:00
Ivan Savenko
763e18d202 Fix symlink target - use absolute path 2024-02-12 16:35:18 +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
6e399eb21a Make some non-const static variables const or constexpr 2024-02-12 13:22:54 +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
b796ed8626 Fix undefined behavior 2024-02-12 12:33:09 +02:00
Ivan Savenko
c03196257f Fix "identical expressions on both sides of comparison" 2024-02-12 12:32:35 +02:00
Ivan Savenko
c577ea3e8d Fix potentially uninitialized values 2024-02-12 12:31:27 +02:00
Ivan Savenko
a909d7ddde Removed cmake_modules/VCMI_lib macro, use it directly in place 2024-02-11 20:38:24 +02:00
Ivan Savenko
19ccef7131 Fix build 2024-02-11 19:54:30 +02:00
Ivan Savenko
cded8b1999 Show human-readable thread name in log 2024-02-11 17:55:02 +02:00
Ivan Savenko
f08c9f4d59 Renamed ENABLE_STATIC_AI_LIBS option to match its actual effect 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
c2286e5126 Server now consists from library and separate executable projects 2024-02-11 17:55:02 +02:00