9954dfb33a
CPathfinder: move flying into options and add walk on sea
2015-10-12 19:03:08 +03:00
0faedde6b9
CPathfinder: store pathfinding options in set instead of variables
...
There is plenty of variables now and in future I'm going to add more more once pathfinder become usable for all kind of things.
2015-10-12 10:29:39 +03:00
886042dc11
CPathfinder: clean calculatePaths of code unsused for pathfinding
...
Map graph initialization should be there as well because it's needed for path checking.
This change wouldn't affect anything since currently CPathfinder object created from scratch every time.
2015-10-12 08:31:35 +03:00
213d8c2258
CPathfinder: turn checkDestinationTile into function
...
This code was only kept as lamba to access guard related variables that is now gone.
2015-10-12 08:22:31 +03:00
1beacf2260
CPathfinder: move guard checks into functions
2015-10-12 08:13:10 +03:00
cd7c5acbc4
CPathfinder: move embark special case code down
...
It's not affect cost calculations any way so let it's be in same order as it's used in condition under it.
2015-10-12 07:26:13 +03:00
c6f9cd1e52
CPathfinder: move passability checks into renamed goodForLandSeaTransition
...
There no need in dedicated function for embark / disembark and other conditions belong there perfectly.
This function is going to check what movements are plain impossible so we don't have to bother check their cost.
2015-10-12 07:10:33 +03:00
ee4305cd6d
CPathfinder: move destTopVisObjID where it's belongs to
2015-10-10 19:02:21 +03:00
13c2b5e2d8
CPathfinder: separate teleporter exits and neighbour tile code
...
This way code that handle real neighbour tiles is more readable and teleport exits don't have to go via all checks they ignore anyway.
2015-10-10 17:17:41 +03:00
f15065fdc5
CPathfinder: separate neighbours code into getNeighbours
...
This is first step to make this code usable outside of calculatePaths.
2015-10-10 16:09:40 +03:00
2cb6cb7baa
Remove useless durationType selector
...
* duration is a mask, equality comparison is not enough
2015-06-02 07:12:02 +03:00
32009690eb
initTowns: only add Tovern by default to player-owned towns
...
Neutral towns with default buildings set should never get Tovern automatically.
This one fixes issue 2090.
2015-03-12 18:47:32 +03:00
f2a237ce6c
CPathfinder: move allowed teleport check into lambda
...
This also fix accidental whirlpool usage as previously I messed up code a bit.
2015-03-11 23:53:35 +03:00
17f3f94ca6
CGSubterraneanGate: fix pairing and always assign all gates to channel
...
Before gates on underground layer didn't had any channel assigned and of course any function that attempt to check -1 channel caused crash.
Also I find out that at point postInit executed It's possible to get mutable gamestate via gameState() callback so we don't need to pass it there.
2015-03-11 17:17:21 +03:00
ec879046ca
Merge pull request #93 from ArseniyShestakov/feature/pathfindingTeleports
...
Okay let's do this!
2015-03-10 09:04:25 +01:00
5c6633f8ad
CPathfinder::addTeleportWhirlpool: check that obj isn't nullptr
2015-03-09 15:32:09 +03:00
00b0af7306
CGameInfoCallback: now actually drop excludeId argument
2015-03-09 14:20:34 +03:00
930a8b49da
CPathfinder: move complicated check into lambda
2015-03-09 04:24:12 +03:00
8f8d237d5d
Use isTeleportChannel callback functions to check teleport channel type
2015-03-09 02:13:40 +03:00
530b63f7c4
CPathfinder: add all new code for pathfinding via teleporters
...
Each kind of teleporter have own function that determine if it's should or shouldn't be used.
For now Monolith with bidirectional channels and Subterranean Gate are united.
2015-03-08 17:13:26 +03:00
c9eba40fe6
Updated CGTeleport and new CGMonolith / CGSubterraneanGate / CGWhirlpool
...
Now CGTeleport is not publicly available handler, but generic class for teleport channels usage.
Teleport channels are stored as part of information about the map.
2015-03-08 16:11:23 +03:00
685deddac1
Start spell-relatet files reorganisation
...
* moved existing files to separate directory
-> todo: split mechanics
2015-02-26 08:39:48 +03:00
5b8180e327
Cleaning logs.
2014-12-25 12:58:15 +01:00
7735e193f0
Merge branch 'develop' into experimental/serializerrefactoring
2014-12-22 19:17:40 +01:00
3bca68fd2d
Initial refactoring
...
* reduce registerTypes* templtates instantiation
2014-12-21 17:29:42 +03:00
c538370c5d
Players will be always able to see their owned heroes and other objects. Fixes #1959 .
2014-12-21 13:56:32 +01:00
34ffdb5981
small cleanup
2014-11-06 14:28:34 +03:00
d280b0ac9f
Cleaned some logs.
2014-11-01 09:52:56 +01:00
fc16c8d207
Merge branch 'optimization/swiftAI' into develop
...
Conflicts:
lib/CGameState.cpp
2014-09-21 22:31:29 +03:00
5cb6eaa252
Fixed major RMG bug.
2014-09-21 20:57:42 +02:00
c4fc8f08c0
Moved assertions before variable is used
2014-09-21 18:25:52 +03:00
6c0c03d74b
Refactoing of pathfinder <-> client/AI interaction to remove dependency on selected hero
...
- finished removal of server-side setSelection
- disabled some broken code (AI & cheats). TODO: fix
2014-09-21 16:42:08 +03:00
78709e223b
Breaking things - trying to remove server-side knowledge of selected objects
2014-09-19 00:18:49 +03:00
d9273b3b2a
Cleaning logs.
2014-09-10 19:09:48 +02:00
fe292dfa1d
Fixed desync due to uninitialized objects. Added some logging. RMG maps don't work yet, though.
2014-07-27 19:30:17 +02:00
3acbda75ef
Restored old function signature for sanity.
2014-07-27 13:59:53 +02:00
bae9f2083f
Workaround for hero & town issue. Game still crashes elsewhere, though.
2014-07-01 12:07:53 +02:00
917b1ffca8
Bugfixing:
...
- Added missing types for serialization
- Fixed possible crash in removable objects (campfire)
- Fixed typo in bank config
2014-06-28 17:21:38 +03:00
32240da34e
Reduced number of #include's in headers. May break compilation on Win
...
since some net packs now need DLL_LINKAGE
2014-06-25 17:11:07 +03:00
a0689fa377
Refactoring of hoverText from objects:
...
- removed hoverText field
- split getHoverText() method into 3:
- - getObjectName() for generic name
- - getHoverText(Player) for player-specific text
- - getHoverText(Hero) for hero-specific strings
2014-06-24 20:39:47 +03:00
ad632d1e8a
Moved FoW management from CGObjectInstance to callback
2014-06-24 20:39:47 +03:00
836c466f81
- Implementation of overrides for towns
...
- Converted dwellings.json into new format
- Implemented "mapObject" entry in town format
- Removed capital/fort/village fields from town in favor of overrides
2014-06-15 19:43:01 +03:00
0afdfa529c
Moved all object-related files to lib/mapObjects directory.
...
Renamed some classes to more readable names
2014-06-05 14:19:47 +03:00
32b6568b65
Merged changes from upstream and fixed compilation caused by API changes
2014-06-03 22:45:18 +03:00
40ab89e179
- copy of campaign heroes can be done later (at the point where it's clear if they will be replaced)
2014-05-29 17:07:21 +02:00
dd33fd51a8
int3 dist2d microoptimization
2014-05-25 20:42:25 +02:00
7f276185bd
Moving files:
...
- new config for objects (config/objects/generic.json)
- renamed lib/CDefObjectHandler to lib/CObjectClassesHandler
2014-05-24 02:07:54 +03:00
6bd6be0835
Object class handler is now a proper "handler"
...
- Some changes in interfaces
- Fixed some missing fields in serialization
- Moved object names to new handler
2014-05-24 01:56:51 +03:00
75cea9206d
- Fixed uninitialized guarding creature positions
...
- Fix for guard placement
2014-05-23 19:45:17 +02:00
342aec0700
More rollback.
2014-05-23 13:23:03 +02:00