ArseniyShestakov
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
ArseniyShestakov
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
ArseniyShestakov
5a04f05b9b
CPathfinder: move one more check into isMovementPossible
2015-10-24 12:09:57 +03:00
ArseniyShestakov
6ebe2abc1a
Fix penalties for FLYING_MOVEMENT and WATER_WALKING
2015-10-23 20:50:52 +03:00
Ivan Savenko
86e1ae928e
Merge pull request #121 from vmarkovtsev/develop
...
Fix portability issues with vcmibuilder on MacOSX
2015-10-21 19:45:47 +03:00
ArseniyShestakov
fc6f62e633
getMovementCost: get rid of useless flying parameter
2015-10-19 07:27:00 +03:00
ArseniyShestakov
498eb1d032
Fix typos
2015-10-19 05:16:18 +03:00
DjWarmonger
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
Vadim Markovtsev
0e14abd609
Fix vcmiclient CMakeLists.txt
...
In my case, Frameworks was pointed to root/../Frameworks, which is wrong;
WoG mod is not checked out by default, so we should give a hint from where to download it;
besides, WoG is optional to run vcmi.
2015-10-17 09:23:40 +03:00
Vadim Markovtsev
337276604d
Fix detection of VCMI_APPLE
2015-10-17 09:23:29 +03:00
Vadim Markovtsev
74e9f23e36
Fix build with recent Boost
...
It has static_assert complaining on missing include
2015-10-17 09:23:28 +03:00
Vadim Markovtsev
c54dc4c847
Fix portability issues on MacOSX
...
Removed trailing whitespaces. there is no readlink -f on MacOSX,
so we have to get the absolute path the other way.
2015-10-17 09:23:28 +03:00
ArseniyShestakov
3663b952ea
Fix issue 2276. Refugee Camp shouldn't be guarded
2015-10-16 06:45:06 +03:00
ArseniyShestakov
226650582d
Move base movement cost to GameConstants
2015-10-16 03:03:40 +03:00
ArseniyShestakov
3466e0fae7
getTileCost: one more pass over code and formatting fix
2015-10-15 15:17:21 +03:00
ArseniyShestakov
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
ArseniyShestakov
25da9f249e
Move NO_TERRAIN_PENALTY to the end of list to avoid save breakage
2015-10-15 11:44:59 +03:00
ArseniyShestakov
c3c31e90ff
Castle gate: only allow teleport to own Inferno towns
...
This is how that works in H3. And on server side it's checked already anyway.
Though it's must be possible to teleport from ally Inferno to your own if both have Castle Gate.
2015-10-15 05:28:28 +03:00
ArseniyShestakov
0d83f6fedd
Fix issue 1877. Allow to buy heroes in ally towns
...
Also removed TODO because check already implemented in CGameHandler::hireHero
2015-10-15 04:00:21 +03:00
ArseniyShestakov
596e0d7b40
Fix issue 1230. Implement Nomads sandwalker bonus
2015-10-15 01:11:15 +03:00
ArseniyShestakov
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
Alexander Shishkin
fca4deaad2
Merge pull request #122 from vmarkovtsev/feature/warnings
...
Fix warnings produced by recent Clang build
2015-10-14 07:28:47 +03:00
Vadim Markovtsev
b701835de0
Fix wrong comparison
2015-10-13 21:05:46 +03:00
Vadim Markovtsev
d24fd10e21
Fix std::abs warning
...
Recent clang wants std::abs instead of plain abs
2015-10-13 21:05:46 +03:00
Vadim Markovtsev
e4b1ef1405
Add "override" to virtual overriden methods
2015-10-13 21:05:36 +03:00
AlexVinS
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
AlexVinS
61af4ee89a
Merge branch 'SpellsRefactoring7' into develop
2015-10-13 08:12:22 +03:00
AlexVinS
eeb100d6a4
More comments about dispell special cases.
2015-10-13 07:11:49 +03:00
ArseniyShestakov
9954dfb33a
CPathfinder: move flying into options and add walk on sea
2015-10-12 19:03:08 +03:00
ArseniyShestakov
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
ArseniyShestakov
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
ArseniyShestakov
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
ArseniyShestakov
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
ArseniyShestakov
1beacf2260
CPathfinder: move guard checks into functions
2015-10-12 08:13:10 +03:00
ArseniyShestakov
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
ArseniyShestakov
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
ArseniyShestakov
ee4305cd6d
CPathfinder: move destTopVisObjID where it's belongs to
2015-10-10 19:02:21 +03:00
ArseniyShestakov
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
ArseniyShestakov
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
AlexVinS
2677d4a677
Fixed action cancel on active stack remove
2015-10-08 08:15:29 +03:00
AlexVinS
02c15085be
Remove (aready disabled in prev. commit) active stack change in sacrifice mechanics
...
* stack removing is evil, but changing active stack by spells is more evil ...
2015-10-06 03:59:05 +03:00
AlexVinS
f99bf099ca
Made player interface tolerant to active stack removal.
2015-10-06 03:46:35 +03:00
AlexVinS
d042b08682
Fix the SACRIFICE fix regression
...
(crach if stack die on counter attack)
2015-10-06 02:04:25 +03:00
AlexVinS
4e60b4cf53
Fixed 0002280
2015-10-06 01:26:50 +03:00
AlexVinS
f1d9e15783
[Tweak] Magic values--
2015-10-06 00:33:46 +03:00
AlexVinS
a112c2f7c8
Made Disrupting Ray effect permanent.
2015-10-06 00:26:04 +03:00
AlexVinS
d1ec538d72
Fix server crash releated to active stack remove.
2015-10-05 21:09:00 +03:00
AlexVinS
6cf220b882
Partial fix for 2272, there are more active stack sacrifice problems.
2015-10-05 20:33:05 +03:00
AlexVinS
fa06e05487
Merge branch 'develop' into SpellsRefactoring7
2015-10-05 00:45:57 +03:00
DjWarmonger
abe02247b5
Fixed bank randomization.
2015-10-02 17:28:33 +02:00