Ivan Savenko
08fbcd5239
TerrainTile now uses identifiers instead of pointers to VLC
2024-10-30 16:22:11 +00:00
Ivan Savenko
10ad0fc760
Split CHeroHandler.cpp/.h into 1 file per class
...
All parts of CHeroHandler.cpp are now in lib/entities/hero
Adjusted includes to use new paths
No functionality changes
2024-10-13 14:01:09 +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
a8f8c3f4b1
Replaced most of accesses to CGObjectInstance::pos with anchorPoint()
2024-10-09 15:43:46 +00:00
Tomasz Zieliński
2fe54504ab
Merge remote-tracking branch 'origin/develop' into custom_objects_per_zone
...
# Conflicts:
# lib/rmg/CRmgTemplate.cpp
2024-09-14 10:19:22 +02:00
Tomasz Zieliński
9591ce1ab4
Move CompoundMapObjectID to separate file
2024-09-14 08:55:28 +02:00
Ivan Savenko
29f393e024
Removed hardcoded checks for map objects in favor of analyzing
...
rewardable object content
2024-09-12 12:11:18 +00:00
Ivan Savenko
503b87561e
Converted all h3 banks to rewardable, remove most of hardcoded checks
2024-09-12 12:11:18 +00:00
Ivan Savenko
785036836c
Rewardable objects may now define guards. Converted Crypt to rewardable.
2024-09-12 12:10:40 +00:00
Ivan Savenko
8225eb454e
Added GameSettings to gamestate, potentially allowing to define game
...
settings per map (or in random map template)
2024-09-05 15:16:27 +00:00
Ivan Savenko
01396b62b7
Extracted handling of type ID's from serializer into a separate class
2024-08-26 19:48:46 +00:00
Ivan Savenko
b84af1a6de
Significantly simplify packs applying
...
Apparently our logic for packs applying with types registration is
overcomplicated and by now completely unnecessary - it became redundant
after introduction of visitor pattern.
2024-08-26 19:48:46 +00:00
SoundSSGood
2e3e6b1553
market->getObjInstanceID()
2024-08-21 01:01:23 +03:00
SoundSSGood
58bb2b58e3
IMarket suggestions
...
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-08-20 18:49:48 +03:00
SoundSSGood
fd45b5144d
IMarket serializeable
2024-08-20 18:49:47 +03:00
Ivan Savenko
49c5f650f7
Merge pull request #4437 from IvanSavenko/battle_sides
...
Unified handling of battle sides ID's
2024-08-14 18:37:05 +03:00
Ivan Savenko
2a05fbdd50
Unified handling of battle sides ID's
...
- Replaced BattleSide namespace-enum with enum class
- Merged two different BattleSide enum's into one
- Merged BattlePerspective enum into BattleSide enum
- Changed all places that use integers to represent battle side to use
BattleSide enum
- Added BattleSideArray convenience wrapper for std::array that is
always 2-elements in size and allows access to its elements using
BattleSide enum
2024-08-11 20:54:44 +00:00
Laserlicht
3afddbbf29
replaced constant
2024-08-05 23:03:19 +02:00
Laserlicht
1a06a2cc44
basic 8th creature support
2024-08-05 21:15:47 +02:00
Ivan Savenko
4aa73b40c9
Split CTownHandler into smaller chunks
2024-07-21 18:21:48 +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
Ivan Savenko
3bea383b59
Merge branch 'vcmi/beta' into 'vcmi/develop'
2024-06-21 12:58:36 +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
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
Ivan Savenko
ffe14fc1fc
Merge pull request #4022 from vcmi/master
...
Merge master -> beta
2024-05-20 18:09:51 +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
84bc6c42db
Added 'Serializeable' base class for classes serializeable by pointer
2024-05-16 18:40:59 +00:00
Ivan Savenko
8fa615a8f7
Fix possible crash on AI attempting to build building in town
2024-04-28 12:53:10 +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
21dff9413e
Merge pull request #3786 from IvanSavenko/instant_movement
...
Instant movement
2024-04-22 11:08:00 +03:00
Ivan Savenko
d5a2ad1be8
Allow sending requests to move across multiple tiles at once
2024-04-20 12:28:50 +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
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
ca7c91e766
Merge pull request #3677 from vcmi/object-graph
...
Object graph
2024-03-29 20:39:56 +02:00
Evgeny Malygin
25125f96da
Fix: licenses, pragma guards, StdInc
2024-03-29 07:48:52 +02:00
Andrii Danylchenko
017fb204a1
NKAI: remove 5th dimension
2024-03-24 09:32:54 +02:00