Andrey Filipenkov
147633bd9d
compute movement cost using PathNodeInfo layer info when possible
2023-03-20 11:35:20 +03:00
Andrey Filipenkov
8f843d0bff
fix typos
2023-03-20 11:35:19 +03:00
Andrey Filipenkov
68f5c1de79
improve variable names in CPathfinderHelper::getNeighbours()
2023-03-20 11:35:19 +03:00
Konstantin
4c4498b22a
vcmi: modernize rest of lib
2023-03-16 17:55:20 +03:00
Konstantin
580268bfd4
vcmi: fix logistics specialist movement regression
...
There was incorrect calculations introduced earlier.
2023-03-16 16:46:42 +03:00
Konstantin
95503d0623
vcmi: unify movement
...
1. Now there is only one bonus: MOVEMENT, with 2 subtypes: 0 is sea, 1 is land
For movement value on land depends on creature speed we use a new
ARMY_MOVEMENT updater with global bonus. If we does not like such
dependency, we can just remove this updater from json.
2. All specialities and secondary skills for movement moved to new
system AFAIK
2023-03-16 16:46:41 +03:00
Ivan Savenko
4f3ea0d1d9
Renamed Terrain.h/cpp -> TerrainHandler.h/cpp
2023-01-10 00:01:35 +02:00
Ivan Savenko
49cbd5adc9
CGHeroInstance::convertPosition is no longer static method
2022-12-07 22:34:08 +02:00
Ivan Savenko
2855606a88
Enabled & fixed -Woverloaded-virtual warning from gcc/cland
...
- fixed almost all instances of overloaded-virtual warning
- cleared up inheritance & method overrides in code affected by warning
2022-12-07 21:50:45 +02:00
Tomasz Zieliński
20c102e648
Remove T prefix from new typedefs
2022-09-29 11:44:46 +02:00
Tomasz Zieliński
f386f42166
Merge remote-tracking branch 'origin/develop' into terrain-rewrite
...
# Conflicts:
# lib/Terrain.cpp
# lib/Terrain.h
# lib/battle/CBattleInfoEssentials.cpp
# lib/rmg/ObstaclePlacer.cpp
# lib/rmg/RiverPlacer.cpp
2022-09-27 07:50:17 +02:00
Tomasz Zieliński
4ea57ea7fc
A variety of suggested style tweaks
2022-09-25 09:33:56 +02:00
Andrey Filipenkov
ff635edc0b
wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
...
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
Tomasz Zieliński
a5077245a8
Merge remote-tracking branch 'origin/develop' into terrain-rewrite
...
# Conflicts:
# lib/Terrain.cpp
# lib/Terrain.h
2022-09-23 20:01:13 +02:00
Andrey Filipenkov
a1cf120ea6
add missing virtual destructors
2022-09-22 11:54:09 +03:00
Tomasz Zieliński
e53613caa7
Fixed crash in pathfinder
2022-09-21 21:44:39 +02:00
Tomasz Zieliński
494b0f0226
First version that compiles
2022-09-21 11:34:23 +02:00
DjWarmonger
7ba271edf1
Rotation rebase2 ( #912 )
...
* Instead of [x][y][z] coordinates, map will be stored as [z][x][y].
* Nullkiller AI can get it too.
* Use boost::multi_array instead of nested vectors
* In MapHandler too
* Rotate foreach algorithms, too
* VCAI gets rotated, too
2022-09-18 17:39:10 +03:00
Tomasz Zieliński
77e43cb36f
Cache Pathfinding skill
2022-09-14 15:24:24 +02:00
Nordsoft91
aaa07e4d2e
New terrain support - part 1 ( #755 )
...
Initial support of new terrains
2022-09-11 11:31:26 +03:00
Konstantin
c6b198ce14
Warning fix (I moved C++17 and CI to another branch) ( #739 )
...
* clang warning fixes
* use CMake 3.10 due to MXE CI does not have 3.13 yet
Co-authored-by: Konstantin <rilian@niisi.ras.ru>
2022-05-19 15:14:50 +03:00
Andrii Danylchenko
3fa7e0976f
Nullkiller: update / fix build, core changes required for Nullkiller AI
2021-07-26 21:02:50 +03:00
Dmitry Orlov
8f331dce31
Feature: Lodestar Grail should work.
2020-12-10 04:05:37 +03:00
John Bolton
6d8f1e4530
Fixed incorrect usage of const std::shared_ptr. Resolves 0003142.
...
Replaced const TBonusListPtr with TConstBonusListPtr where necessary
Replaced const std::shared_ptr<T> with std::shared_ptr<const T> where necessary.
Removed superfluous use of const.
Replaced const std::shared_ptr<T> with const std::shared_ptr<T> & in function parameters and ranged for-loops.
2020-09-30 22:56:28 -07:00
Sergey Nizovtsev
c7f76e8e0f
lib: fix CPathfinder build error on GCC 10.2
...
CPathfinder constructs boost::fibbonacci_heap handle manually using
private primitives. This stopped working with newer GCC and boost.
Replace this with proper handle_type from container's public typedef.
2020-09-30 00:28:07 +03:00
Dmitry Orlov
ae3b8e4916
Travis errors & warnings fix
2020-09-28 16:39:55 +03:00
Dmitry Orlov
5e0023704b
Fix PQ issues while calculating paths
2020-09-22 00:19:40 +03:00
AlexVinS
da20aa2388
Use the same cost value in Pathfinder and fuzzy evaluations.
2019-01-17 10:54:41 +03:00
AlexVinS
4b5910c2f4
VCAI performance improvements
...
* Node graph initialization optimized.
* Fixed "Unathorized obstacle access".
* Pathfinding tracing disabled with ifdef.
* Misc bonus calculation optimizations.
* Removed timestamp from log lines. Date formatting eats too much CPU.
* Paths for all heroes in Client are now cached
2019-01-17 10:50:56 +03:00
Andrii Danylchenko
cbaa834589
AI pathfinding: bug fix after refactoring
2018-10-10 14:51:57 +03:00
Andrii Danylchenko
f327c46fa3
AI pathfinding: rename and add const to functions
2018-10-07 14:51:27 +03:00
Andrii Danylchenko
49c872e4ec
AI: replace SectorMap with new PathfinderManager
2018-10-06 16:35:31 +03:00
Andrii Danylchenko
eb17313f7f
AI: pathfinder extensibility - add one more rule for movement to destination and some refactoring
2018-09-23 15:26:53 +03:00
Andrii Danylchenko
7150fc9f71
AI: pathfinder api supports configuration
2018-09-23 15:26:53 +03:00
Andrii Danylchenko
9ab44b950a
AI: pathfinder rework, rules refactored a bit.
2018-09-23 15:26:53 +03:00
Andrii Danylchenko
24221f3fb4
AI: move teleportation handling to pathfinder helper and neighbour finder
2018-09-23 15:26:53 +03:00
Andrii Danylchenko
6ac987794c
AI: first rule extracted for pathfinder
2018-09-23 15:26:53 +03:00
Andrii Danylchenko
9af0032f84
AI: try to add some pathfinder extensibility. Extracted neighbour nodes finder
2018-09-23 15:26:53 +03:00
Arseniy Shestakov
f1e5797834
Code style: move or add licensing information on top of every file
2017-07-14 01:26:03 +03:00
Victor Luchits
e9e311f142
Fix NodeComparer::operator() to follow strict weak ordering rules
...
This fixes annoying assertion failures in MSVC builds
2017-07-02 22:59:41 +03:00
Arseniy Shestakov
b4a35f9c62
CPathfinderHelper: fix memory leak
2016-08-16 14:59:16 +03:00
Arseniy Shestakov
9fd1cff090
Refactoring: always use std prefix for shared_ptr, unique_ptr and make_shared
...
Long time ago it's was used without prefix to make future switch from boost to std version easier.
I discusses this with Ivan and decide to drop these using from Global.h now.
This change wouldn't break anything because there was already code with prefix for each of three cases.
2015-12-29 05:43:33 +03:00
ArseniyShestakov
ab92123da3
CPathfinder: improve support for visits and battles in teleports
...
Related movement code for client and AI is plumbed as well. Though at moment code still not finished because it's not teleport hero to the exit tile if he won battle.
2015-12-11 09:42:30 +03:00
ArseniyShestakov
9e7e5b81e4
Merge pull request #143 from vcmi/feature/patrolSupport
...
Patrol support for AI heroes
2015-12-05 03:11:07 +03:00
Ivan Savenko
c3ce4b25df
Removed all #include's of CMap.h from headers.
...
To all - please, avoid #include's in headers as much as possible
This kills incremental build compile times
2015-12-02 21:05:10 +02:00
ArseniyShestakov
6bb205b15b
CPathfinder: patrol support using getTilesInRange
...
For now we use getTilesInRange which isn't really correct for patrol, but good enough for first version.
2015-11-28 20:34:50 +03:00
ArseniyShestakov
df4515901d
CPathfinder: fix special movement boundary check
...
Forgot to fix it for water walking after fe12b8f664
2015-11-23 14:11:08 +03:00
ArseniyShestakov
2632389aaf
CPathfinder: bring FoW reference back to avoid performance loss
...
This one is revert 148355908d
2015-11-22 21:06:37 +03:00
ArseniyShestakov
6dacb84404
CPathfinder::addNeighbours: avoid allocating new vector each time
2015-11-22 07:32:33 +03:00
ArseniyShestakov
8217eb3a82
CPathfinder: split isLayerTransitionPossible into two functions
...
This way we can avoid usage of getNode for layers that clearly can't be used.
2015-11-22 06:16:16 +03:00