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

196 Commits

Author SHA1 Message Date
Ivan Savenko
97f1a310df Fix miscellaneous issues discovered by Sonar 2024-08-12 18:26:30 +00:00
Andrii Danylchenko
683c363946 NKAI: whirlpool 2024-07-21 17:20:54 +03:00
Andrii Danylchenko
37dc2a38e8 NKAI: reduce double army loss cases 2024-07-18 13:38:25 +03:00
Ivan Savenko
04a81fee87 Reduce size of CGPathNode and AIPathNode 2024-07-15 07:49:04 +00:00
Ivan Savenko
6b8f94e6e7 Merge remote-tracking branch 'vcmi/master' into develop 2024-07-11 17:43:44 +00:00
Ivan Savenko
b5c36958a9 Workaround for very slow boat summon tests 2024-07-04 19:56:01 +00:00
Ivan Savenko
73fdd12581 Use optimized container without dynamic memory allocations 2024-07-03 21:15:40 +00:00
Ivan Savenko
1468abb8a0 Remove excessive copies of large objects 2024-07-03 21:14:22 +00:00
Ivan Savenko
40f17d654d Use containers with pre-allocations to improve pathfinding speed 2024-07-03 18:06:56 +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
Alexander Wilms
820b1b446e Fix typo: TowmPortalFinder -> TownPortalFinder 2024-06-23 22:40:15 +02:00
Ivan Savenko
3bea383b59 Merge branch 'vcmi/beta' into 'vcmi/develop' 2024-06-21 12:58:36 +00:00
Ivan Savenko
431b2865a4 Review fixes 2024-06-17 09:43:22 +00:00
Ivan Savenko
e699941a39 Disable logic that seems to be leading to thread races 2024-06-12 18:17:23 +00:00
Ivan Savenko
b8beb4fb13 Fixes for various minor issues detected by Sonar Cloud 2024-06-01 11:48:30 +00:00
Andrii Danylchenko
820f0e0c1a NKAI: port exploration from VCAI 2024-05-20 23:50:13 +03:00
Andrii Danylchenko
1388fb1493 NKAI: port exploration from VCAI 2024-05-20 22:43: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
Andrii Danylchenko
f1d7151a93 #3842 - fix negative link cost because of bonuses 2024-04-28 09:11:15 +03:00
Andrii Danylchenko
6e641dbdea #3824 - fix empty army with only commander issues 2024-04-26 23:18:20 +03:00
Andrii Danylchenko
7aff0e63fc NKAI: fix parallel access to object graph 2024-04-21 12:27:58 +03:00
Andrii Danylchenko
ed76d8a652 NKAI: allow multiple tasks to be executed from one calculation 2024-04-14 16:46:05 +03:00
Andrii Danylchenko
728f673763 NKAI: remove static ai field 2024-03-31 21:11:25 +03:00
Andrii Danylchenko
d6f1a5c2b3 NKAI: parallel capture objects 2024-03-29 20:39:03 +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
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
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
c577ea3e8d Fix potentially uninitialized values 2024-02-12 12:31:27 +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
bf54a6a7d3
Merge pull request #3537 from vcmi/nkai-fix-pathfinder-commited-tiles
NKAI: avoid writing to commited tiles when calculating hero chain
2024-01-21 14:51:33 +02:00
Andrii Danylchenko
708e0d1107 NKAI: avoid writing to commited tiles when calculating hero chain 2024-01-21 10:18:39 +02:00
Andrii Danylchenko
cb297793e0 NKAI: fix lock 2024-01-21 10:05:40 +02:00
Andrii Danylchenko
1db43a509e NKAI: fix casting FLY several times during path calculation 2024-01-20 22:55:28 +02:00
Ivan Savenko
d04241b10a Code cleanup 2024-01-19 23:02:00 +02:00