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 |
|
Ivan Savenko
|
a15366f5a5
|
Make IObjectInterface::cb non-static
|
2024-01-19 13:55:21 +02:00 |
|
Ivan Savenko
|
d5c4478816
|
Remove most of non-const access to VLC entities
|
2024-01-19 13:54:49 +02:00 |
|
Alexander Wilms
|
1b85abb508
|
Use auto instead of redundant type in initializations using new
grep -r --include \*.h --include \*.cpp "=" * | grep -v "auto\|int\|char\|bool\|float|\double\|for\|if\|googletest\|fuzzylite\|size_t\|using\|return\|{\|}\|= \"\|= tr(\|virtual\|void" | grep -Po ".*[^ ]+ [^ ]+ [^ ]*[ ]*=.*;" | grep -v "float\|nullptr" | grep "new" | grep -v "AI/FuzzyLite" | grep \( | grep "= new" > redundant_types.txt
import re
with open("redundant_types.txt") as f:
for line in f:
line = line.strip()
path = line.split(":", 1)[0]
original_code = line.split(":")[1].strip()
if "new " in original_code:
cpp_type = original_code.split(" ")[0]
if original_code.count(cpp_type) == 2:
print()
print(path)
print(original_code)
new_code = "auto "+" ".join(original_code.split(" ")[1:])
print(new_code)
with open(path, "r") as f:
filedata = f.read()
filedata = filedata.replace(original_code, new_code)
with open(path, "w") as f:
f.write(filedata)
|
2024-01-16 21:40:53 +00:00 |
|
Andrii Danylchenko
|
26b6d1cf74
|
NKAI: fix capturing shipyards
|
2023-12-02 14:03:54 +02:00 |
|
Ivan Savenko
|
20ef3a69e7
|
Fix most of memleaks discovered by valgrind
|
2023-11-13 16:27:15 +02:00 |
|
Ivan Savenko
|
910ad50417
|
Fix client & server compilation
|
2023-10-22 16:54:48 +03:00 |
|
Ivan Savenko
|
0a10fc30b8
|
(lib) Bonus subtype is now stored as metaidentifier that can store any
other identifier inside it
|
2023-10-22 16:54:43 +03:00 |
|
nordsoft
|
7ccd4cdcb2
|
Refactor quests progress
|
2023-10-11 21:10:42 +02:00 |
|
nordsoft
|
5b10b457cf
|
Fix code review suggestions
|
2023-10-11 00:47:19 +02:00 |
|
nordsoft
|
5eeda3cd25
|
Quests mostly work
|
2023-10-10 23:44:29 +02:00 |
|
nordsoft
|
bb238f9b72
|
New quests work
|
2023-10-10 23:44:29 +02:00 |
|
Andrii Danylchenko
|
ebe155fa95
|
NKAI: mana recovery
|
2023-09-30 10:37:36 +03:00 |
|
Andrii Danylchenko
|
2dd0d76412
|
NKAI: water and air walking
|
2023-09-30 10:37:32 +03:00 |
|
Evgeniy Meshcheryakov
|
ecf9b1aa2f
|
Fix NKAI compilation with NKAI_PATHFINDER_TRACE_LEVEL>=2
|
2023-09-04 10:08:56 +03:00 |
|
Ivan Savenko
|
87957e74c1
|
Replaced boost::thread_specific_ptr with thread_local
|
2023-08-23 16:32:29 +03:00 |
|
Andrii Danylchenko
|
f1a9ae99ee
|
NKAI: various behavior fixes, undo max_gold_preasure
|
2023-07-31 22:01:12 +03:00 |
|
Andrii Danylchenko
|
fb7477047a
|
NKAI: loosen gold presure on build system.
|
2023-07-31 22:01:12 +03:00 |
|
Andrii Danylchenko
|
202e13ce2e
|
NKAI: log paths scan depth
|
2023-07-31 22:01:11 +03:00 |
|
Andrii Danylchenko
|
5083100d3b
|
NKA: fix accessing removed hero and heroExchangeCount
|
2023-07-31 22:01:11 +03:00 |
|
Andrii Danylchenko
|
b19ac01bf9
|
Fuzzy rework, added more defence and gather army routines
|
2023-07-31 22:01:10 +03:00 |
|
Andrii Danylchenko
|
b1ca663eb6
|
Fuzzy rework
|
2023-07-31 22:01:10 +03:00 |
|
Andrii Danylchenko
|
38a98387e4
|
Temp fix for blocked in garrison ai.
|
2023-07-31 22:01:10 +03:00 |
|
Ivan Savenko
|
85262cf4f5
|
Moved CGameState files into a separate directory
|
2023-06-26 17:15:59 +03:00 |
|
Ivan Savenko
|
08cfbe79cf
|
Added encapsulation for movement points access
|
2023-06-25 17:42:36 +03:00 |
|
Ivan Savenko
|
ebc7a82c2e
|
Converted pathfinder enum's to enum class
|
2023-06-21 15:38:57 +03:00 |
|
Ivan Savenko
|
f78470a301
|
Fix build
|
2023-06-21 14:55:25 +03:00 |
|
Ivan Savenko
|
bd4d2788ed
|
Split pathfinder into multiple smaller files
|
2023-06-21 13:46:09 +03:00 |
|
Ivan Savenko
|
87fcfa4add
|
Removed excessive pathfinder includes
|
2023-06-21 12:00:44 +03:00 |
|
Ivan Savenko
|
6aedb99117
|
Cleaned up IShipyard interface
|
2023-06-16 17:59:10 +03:00 |
|
Ivan Savenko
|
acac42291e
|
Remove excessive CMap.h includes
|
2023-05-31 23:18:38 +03:00 |
|
Andrii Danylchenko
|
0829593356
|
NKAI: composite pathfinder actions and fix for guarded bordergate
|
2023-05-07 09:15:37 +03:00 |
|
Konstantin
|
86f5d6de69
|
vcmi: modernize headers
|
2023-04-30 13:35:54 +03:00 |
|
Andrii Danylchenko
|
fbc9a32ad8
|
#2018 - fix shipyard usage for NKAI, allied shipyard should work now
|
2023-04-22 18:42:36 +03:00 |
|
Andrii Danylchenko
|
d347db4c16
|
Fix hero count calculation for resourceful ai mod
|
2023-04-22 14:47:31 +03:00 |
|