621c62b44e
Don't crash when spell school level is higher than 3 (which is another bug)
2015-10-31 21:15:40 +01:00
e6e975e9ef
Fix adventure map movement segfault in some scenarios
2015-10-31 20:23:13 +03:00
5ef02aaf88
Updated MSVS project.
2015-10-31 15:08:13 +01:00
17071c6ec8
Merge pull request #125 from ArseniyShestakov/newMovementSystem
...
Okay, time to merge this.
2015-10-31 13:56:22 +01:00
c4ea0c7ff2
CPathfinder: don't include RegisterTypes
2015-10-27 17:42:31 +03:00
c5ebec0d1f
Fix the second crash (dynamic_cast failure)
2015-10-27 09:09:42 +03:00
92fee1bdbf
CPathfinder: shorten options struct declaration
2015-10-27 03:50:38 +03:00
6b34eb729e
Move all pathfinding-related code into new file
2015-10-27 03:34:47 +03:00
9e8427a078
CPathfinder: update comment for isSourceGuarded condition
2015-10-27 00:22:40 +03:00
01257efc02
CPathfinder: get rid of curPos and pass on initializeGraph
2015-10-26 20:17:10 +03:00
68bd37aa45
Store penalty in value of FLYING_MOVEMENT and WATER_WALKING
2015-10-26 18:30:11 +03:00
44ca00cd16
CPathfinder: rename functions
2015-10-25 19:11:00 +03:00
a536691781
CPathfinder: fix typos and more code cleanups
2015-10-25 17:01:28 +03:00
79fb5b0c7b
Fix typeid ordering bug on MacOSX
2015-10-25 13:08:59 +03:00
cfb5853689
Just a bit of black magic
2015-10-25 03:29:16 +03:00
0f9de1c560
Made CTypeList threadsafe
2015-10-25 03:26:48 +03:00
687a82886f
cleanup CTypeList interface
2015-10-25 01:38:30 +03:00
92ae56b369
Mingw build fix
2015-10-24 22:21:54 +03:00
a6ea0981b6
Merge branch 'develop' into mutexRelax
2015-10-24 18:30:43 +02:00
641aa13526
Some fixes for previous commit.
2015-10-24 17:02:00 +02:00
716c324695
Don't give a turn to player who is about to lose (days without town).
2015-10-24 16:21:30 +02:00
abe88ea890
- Refactoring legacy code
...
- Some checks for #2311
2015-10-24 15:09:46 +02:00
4f7c3ec60f
Minor formatting fixes within pathfinder-related code
2015-10-24 15:50:00 +03:00
939b3c05a1
CPathfinder: use struct instead of enum for options
...
Suggested by @DjWarmonger as better alternative from performance standpoint while struct still more organized than bunch of variables.
Other reason of change it's that in future we may need non-boolean options, e.g for patrol movement and some new pathfinder usages.
2015-10-24 15:34:27 +03:00
6934c6bc95
CPathfinder: move check into isBetterWay lambda
...
It's must be of course used for teleporters too.
2015-10-24 14:54:15 +03:00
5a04f05b9b
CPathfinder: move one more check into isMovementPossible
2015-10-24 12:09:57 +03:00
6ebe2abc1a
Fix penalties for FLYING_MOVEMENT and WATER_WALKING
2015-10-23 20:50:52 +03:00
fc6f62e633
getMovementCost: get rid of useless flying parameter
2015-10-19 07:27:00 +03:00
498eb1d032
Fix typos
2015-10-19 05:16:18 +03:00
8c9f8f22d9
Merge pull request #123 from ArseniyShestakov/mantis-1230
...
Okay, now we shouldn't get broken savegames. Merging.
2015-10-17 08:31:44 +02:00
3663b952ea
Fix issue 2276. Refugee Camp shouldn't be guarded
2015-10-16 06:45:06 +03:00
226650582d
Move base movement cost to GameConstants
2015-10-16 03:03:40 +03:00
3466e0fae7
getTileCost: one more pass over code and formatting fix
2015-10-15 15:17:21 +03:00
46c7e8e36d
Add list ending comment as suggested by @alexvins
...
This way we can add new bonuses without changing last line in list and avoid possible issues of extra concatenating.
2015-10-15 12:20:53 +03:00
25da9f249e
Move NO_TERRAIN_PENALTY to the end of list to avoid save breakage
2015-10-15 11:44:59 +03:00
52a52dcfd9
Implement NO_TERRAIN_PENALTY bonus
...
Penalty of specified terrain type is ignored if hero have this bonus
2015-10-15 01:09:02 +03:00
fca4deaad2
Merge pull request #122 from vmarkovtsev/feature/warnings
...
Fix warnings produced by recent Clang build
2015-10-14 07:28:47 +03:00
b701835de0
Fix wrong comparison
2015-10-13 21:05:46 +03:00
e4b1ef1405
Add "override" to virtual overriden methods
2015-10-13 21:05:36 +03:00
b94432b4ba
Fixed http://bugs.vcmi.eu/view.php?id=2297
...
* allow banned spells by Tomes (XXX_SPELLS bonus), Spelbinders Hat (SPELLS_OF_LEVEL bonus)
* allow banned spells by cheat-code (now also SPELLS_OF_LEVEL bonus)
2015-10-13 13:16:46 +03:00
eeb100d6a4
More comments about dispell special cases.
2015-10-13 07:11:49 +03:00
9954dfb33a
CPathfinder: move flying into options and add walk on sea
2015-10-12 19:03:08 +03:00
41c4323818
CGHeroInstance: add canFly and update canWalkOnSea
...
canWalkOnSea shouldn't check for FLYING_MOVEMENT because it's two separate mechanics that apply different limitations.
2015-10-12 18:52:23 +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