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

30 Commits

Author SHA1 Message Date
Ivan Savenko
08fbcd5239 TerrainTile now uses identifiers instead of pointers to VLC 2024-10-30 16:22:11 +00:00
Ivan Savenko
3dd4fa2528 Reduce usage of pointers to VLC entities
Final goal (of multiple PR's) is to remove all remaining pointers from
serializeable game state, and replace them with either identifiers or
with shared/unique pointers.

CGTownInstance::town and CGHeroInstance::type members have been removed.
Now this data is computed dynamically using subID member.

VLC entity of a town can now be accessed via following methods:
- getFactionID() returns ID of a faction
- getFaction() returns pointer to a faction
- getTown() returns pointer to a town

VLC entity of a hero can now be accessed via following methods:
- getHeroTypeID() returns ID of a hero
- getHeroClassID() returns ID of a hero class
- getHeroType() returns pointer to a hero
- getHeroClass() returns pointer to a hero class
2024-10-10 12:28:08 +00:00
Ivan Savenko
a481f07daf PlayerState now stores all objects owned by player 2024-08-28 12:51:27 +00:00
Andrii Danylchenko
683c363946 NKAI: whirlpool 2024-07-21 17:20:54 +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
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
Andrii Danylchenko
157443c1df #3876 - allow to embark after battle for AI pathfinder 2024-05-05 13:52:57 +03:00
Ivan Savenko
75aae66858 Fix off-by-one error - turnLimit 1 should work after 1st turn, not 2nd 2024-04-26 12:44:42 +03:00
Andrii Danylchenko
017fb204a1 NKAI: remove 5th dimension 2024-03-24 09:32:54 +02:00
Dydzio
fd9810adf4 Working SoD version of fly 2024-02-07 19:27:02 +01:00
Ivan Savenko
e67e4430ba Removed most of non-const static fields in lib. Reduced header includes. 2024-01-19 13:55:22 +02:00
Ivan Savenko
2261298d09 Revert U-turns block. Actually possible in H3 and has unintended side
effects
2023-12-09 18:09:38 +02:00
Ivan Savenko
773071fee3 Fix AI movement through wandering monsters 2023-12-03 15:58:44 +02:00
Ivan Savenko
8cbc2c01ad Do not allow moving through most of visitable objects 2023-11-28 12:32:24 +02:00
Ivan Savenko
faead7739a Do not allow U-turns while flying. Works fine, but poor representation in
UI
2023-11-28 12:32:24 +02:00
Ivan Savenko
04aeea9b68 use toEnum instead of getNum for switch'es 2023-11-03 19:20:25 +02:00
Ivan Savenko
2b9c362d5b Explicitly convert identifier to underlying enumeration 2023-11-03 16:03:29 +02:00
Ivan Savenko
8346d71c98 Remove more subID access 2023-11-01 14:44:05 +02: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
Ivan Savenko
dd841bdaa7 Use enum instead of mix of bool's and int's for tile reveal 2023-10-16 00:12:38 +03:00
Andrii Danylchenko
2dd0d76412 NKAI: water and air walking 2023-09-30 10:37:32 +03:00
Ivan Savenko
c8a96647c3 Add turn limit option to pathfinder 2023-09-26 13:42:20 +03:00
Andrii Danylchenko
903be33bf3 #2689 - fix approaching guards when closest tile is double-guarded 2023-09-16 17:47:34 +03:00
Ivan Savenko
41210c1dbf Client-side support for multiple battles 2023-09-06 16:03:47 +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
bd4d2788ed Split pathfinder into multiple smaller files 2023-06-21 13:46:09 +03:00