Ivan Savenko
b7efa6c8cc
Fixed potential thread races in Battle AI
2024-06-17 16:15:19 +00:00
Ivan Savenko
431b2865a4
Review fixes
2024-06-17 09:43:22 +00:00
Andrii Danylchenko
cd4aaf93ee
#4139 - attempt to fix crash on portal probbing
2024-06-16 11:58:15 +03:00
Ivan Savenko
e699941a39
Disable logic that seems to be leading to thread races
2024-06-12 18:17:23 +00:00
Ivan Savenko
e32b6bd807
Fix potentially uninitialized members
2024-06-12 18:10:38 +00:00
Ivan Savenko
b4c6906471
Merge branch 'vcmi/beta' into 'vcmi/develop'
2024-06-11 19:22:23 +00:00
Ivan Savenko
9c05e80315
Fix Admiral's Hat whirlpool immunity. Reduce usage of
...
convertFromVisitablePos
2024-06-11 14:31:11 +00:00
Ivan Savenko
b8beb4fb13
Fixes for various minor issues detected by Sonar Cloud
2024-06-01 11:48:30 +00:00
Andrii Danylchenko
7bf047ff18
#4066 - fix exploration
2024-06-01 13:13:51 +03:00
Andrii Danylchenko
9728413742
NKAI: fix dead end cancellation
2024-06-01 12:25:23 +03:00
Ivan Savenko
df83fa33a1
Merge branch 'vcmi/master' into 'vcmi/develop'
2024-05-31 09:34:21 +00:00
Ivan Savenko
5d6470e527
Merge pull request #4025 from IvanSavenko/shared_ptr_lib
...
[1.6] Use shared_ptr for library entities
2024-05-30 19:14:06 +03:00
Ivan Savenko
5ecb527252
Merge pull request #3997 from IvanSavenko/serialization_refactor
...
[1.6] Serialization refactor
2024-05-30 19:13:21 +03:00
Andrii Danylchenko
02ea497951
NKAI: speedup exploration a bit
2024-05-22 22:49:11 +03:00
Andrii Danylchenko
820f0e0c1a
NKAI: port exploration from VCAI
2024-05-20 23:50:13 +03:00
Andrii Danylchenko
5b7e355953
Merge pull request #4009 from vcmi/nkai-exploration
...
NKAI: port exploration from VCAI
2024-05-20 23:44:12 +03:00
Andrii Danylchenko
1388fb1493
NKAI: port exploration from VCAI
2024-05-20 22:43:23 +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
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
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
f3de2cfe1c
Removed broken & unused serialization of player interface and AI
2024-05-17 16:35:53 +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
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
cba49a9952
Fix gcc-14 build
2024-05-17 10:10:06 +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
Laserlicht
560923fc1f
show cheating problem message only once per AI
2024-05-15 12:50:51 +02:00
Laserlicht
e9b2159c0a
hint about disabled cheats for nullkiller
2024-05-15 00:18:14 +02:00
DjWarmonger
560d53a07c
Merge pull request #3960 from vcmi/fix-3941
...
#3941 - recruit hero when no heroes
2024-05-13 11:30:11 +02:00
Andrii Danylchenko
98afd43969
#3941 - recruit hero when no heroes
2024-05-12 21:10:31 +03:00
Andrii Danylchenko
98a78b3386
#3930 - fix usage of wrong variable
2024-05-12 18:04:23 +03:00
Ivan Savenko
30e0a16ee9
Fix some 'new' issues reported by Sonar Cloud
2024-05-06 15:33:30 +00:00
Andrii Danylchenko
157443c1df
#3876 - allow to embark after battle for AI pathfinder
2024-05-05 13:52:57 +03:00
Ivan Savenko
be54836401
Merge pull request #3849 from IvanSavenko/fix_vcai_crash
...
Fix possible crash on AI attempting to build building in town
2024-04-28 19:48:23 +03:00
Ivan Savenko
8fa615a8f7
Fix possible crash on AI attempting to build building in town
2024-04-28 12:53:10 +03:00
Andrii Danylchenko
f1d7151a93
#3842 - fix negative link cost because of bonuses
2024-04-28 09:11:15 +03:00
Andrii Danylchenko
39e19f79f4
Fix #3754 , #2316
2024-04-27 13:57:50 +03:00
Andrii Danylchenko
afa766c763
#3824 - fix cluster unlock
2024-04-27 10:57:30 +03:00
Andrii Danylchenko
6e641dbdea
#3824 - fix empty army with only commander issues
2024-04-26 23:18:20 +03:00
Andrii Danylchenko
b4abb3a56c
Merge pull request #3814 from vcmi/fixes
...
NKAI: fix patrolling heroes never retreat and town danger evaluation
2024-04-23 18:52:47 +03:00
Ivan Savenko
62d15ed23c
Merge pull request #3820 from IvanSavenko/bugfixing
...
Bugfixing
2024-04-23 13:03:36 +03:00
Ivan Savenko
1b6d6c3f5e
Disable broken visitation of external markets for VCAI
2024-04-22 15:46:51 +03:00
Ivan Savenko
a6dead7725
Fixed loading of text strings for hota quests
2024-04-22 13:49:17 +03:00
Ivan Savenko
a46e022421
Fixed format string
2024-04-22 13:48:56 +03:00
Ivan Savenko
438ec08d72
AI will only ignore garrisons in 'Steadwick Fall' mission (H3 logic)
2024-04-22 11:14:58 +03:00
Ivan Savenko
e8e4446886
Simplify NKAI settings loading code
2024-04-22 11:14:58 +03:00
Ivan Savenko
20f323d83c
Added 'useTroopsFromGarrisons' option to NKAI
2024-04-22 11:14:57 +03:00
Ivan Savenko
21dff9413e
Merge pull request #3786 from IvanSavenko/instant_movement
...
Instant movement
2024-04-22 11:08:00 +03:00
Ivan Savenko
1b469036a3
Merge pull request #3784 from dydzio0614/quick-dwellings-visit
...
Add handling for yes/no dialogs that can be safely skipped by player
2024-04-22 11:06:40 +03:00
Andrii Danylchenko
390136e536
NKAI: fix patrolling heroes never retreat and town danger evaluation
2024-04-21 14:23:58 +03:00
Andrii Danylchenko
7aff0e63fc
NKAI: fix parallel access to object graph
2024-04-21 12:27:58 +03:00
Andrii Danylchenko
0935f931fa
BattleAI: fix bypassing 2-hex moat
2024-04-20 15:28:57 +03:00
Andrii Danylchenko
70fad45316
Merge pull request #3770 from vcmi/nkai-multitask
...
NKAI: allow multiple tasks to be executed from one calculation
2024-04-20 15:21:11 +03:00
Andrii Danylchenko
3939c4b9d3
NKAI: stability fixes and regression
2024-04-20 14:32:58 +03:00
Ivan Savenko
d5a2ad1be8
Allow sending requests to move across multiple tiles at once
2024-04-20 12:28:50 +03:00
Andrii Danylchenko
50432b9614
Merge pull request #3782 from Alexander-Wilms/typo
...
Fix typo: preasure -> pressure
2024-04-18 13:19:12 +03:00
Dydzio
19453aab41
Add handling for yes/no dialogs that can be safely skipped by player
2024-04-17 01:08:27 +02:00
Alexander Wilms
e70411bf1a
Fix typo: preasure -> pressure
2024-04-16 21:10:49 +00:00
Alexander Wilms
7d925b3689
Fix typo: Preasure -> Pressure
2024-04-16 21:10:15 +00:00
Ivan Savenko
ced0bbe526
Remove "catch everything and silently ignore" block
2024-04-16 18:54:51 +03:00
Andrii Danylchenko
ed76d8a652
NKAI: allow multiple tasks to be executed from one calculation
2024-04-14 16:46:05 +03:00
Ivan Savenko
9e49587749
Replace bonus string description with metastring that can properly
...
handle translations
2024-04-09 16:13:30 +03:00
Ivan Savenko
03786fb63b
VCAI will now check whether it actually has enough gold to buy a hero
2024-04-06 15:59:08 +03:00
Andrii Danylchenko
fd0dd7441a
Merge pull request #3700 from vcmi/object-graph
...
NKAI: parallel capture objects
2024-04-01 12:59:08 +03:00
Andrii Danylchenko
728f673763
NKAI: remove static ai field
2024-03-31 21:11:25 +03:00
Andrii Danylchenko
ca7c91e766
Merge pull request #3677 from vcmi/object-graph
...
Object graph
2024-03-29 20:39:56 +02:00
Andrii Danylchenko
d6f1a5c2b3
NKAI: parallel capture objects
2024-03-29 20:39:03 +02:00
Evgeny Malygin
25125f96da
Fix: licenses, pragma guards, StdInc
2024-03-29 07:48:52 +02:00
Andrii Danylchenko
ff654c2148
NKAI: fix build
2024-03-28 17:47:08 +02:00
Andrii Danylchenko
30d9daf62c
NKAI: improve boat handling by object graph, a set of fixes
2024-03-28 13:39:15 +02:00
Andrii Danylchenko
adfcb650e2
NKAI: object graph fixes
2024-03-25 21:04:08 +02:00
Andrii Danylchenko
3820f6f78b
NKAI: fix headless and compilation
2024-03-24 13:16:46 +02:00
Andrii Danylchenko
419d6a648b
NKAI: optimize clusterization and pathfinding for object graph
2024-03-24 09:32:54 +02:00
Andrii Danylchenko
017fb204a1
NKAI: remove 5th dimension
2024-03-24 09:32:54 +02:00
Andrii Danylchenko
e66ceff154
NKAI: object graph improved and optimized
2024-03-21 12:13:36 +02:00
Andrii Danylchenko
bec2c0cac2
NKAI: fix sonar and refactoring
2024-03-10 15:14:15 +02:00
Andrii Danylchenko
6245adb9a4
NKAI: configurable object graph
2024-03-08 14:39:16 +02:00
Andrii Danylchenko
5f8a157c6d
NKAI: rollback changes with removing scan depth
2024-03-03 10:21:17 +02:00
Andrii Danylchenko
fb6fd63a58
NKAI: water paths in graph
2024-03-02 15:55:36 +02:00
Andrii Danylchenko
b236384356
NKAI: graph add battle layer
2024-03-02 15:54:05 +02:00
Andrii Danylchenko
a090441672
NKAI: object graph second layer not operational yet
2024-03-02 15:54:03 +02:00
Andrii Danylchenko
376a17409f
NKAI: initial implementation of object graph
2024-03-02 15:52:45 +02:00
Andrii Danylchenko
35429eab52
NKAI: moddable configuration
2024-03-01 22:03: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
c23953eac5
Remove custom casts
2024-02-14 12:56:37 +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
4c70abbeb5
Reduced usage of global variables - removed or made const / constexpr
2024-02-12 13:49:45 +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
f08c9f4d59
Renamed ENABLE_STATIC_AI_LIBS option to match its actual effect
2024-02-11 17:55:02 +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
Andrii Danylchenko
ec5c44bb92
Merge pull request #3594 from vcmi/fix-3550
...
#3550 - fix case when unit is in reachability map but only next turn
2024-02-04 10:07:44 +02:00
Andrii Danylchenko
c66de29550
#3550 - fix case when unit is in reachability map but only next turn
2024-02-03 17:48:52 +02:00
Ivan Savenko
f329bfbe71
Merge pull request #3582 from IvanSavenko/campaign_fixes
...
Campaign fixes
2024-02-01 11:30:38 +02:00
Ivan Savenko
626087ab14
Merge pull request #3561 from MnHebi/develop
...
Try to improve VCAI building build order
2024-01-31 21:48:36 +02:00