AlexVinS
92ae56b369
Mingw build fix
2015-10-24 22:21:54 +03:00
DjWarmonger
4e444abf66
Few more uses of cached visibleTiles.
2015-10-24 20:46:55 +02:00
DjWarmonger
63ca9202e4
Reverted old MapHandler::hideObject to avoid weird crash.
2015-10-24 19:03:11 +02:00
DjWarmonger
a6ea0981b6
Merge branch 'develop' into mutexRelax
2015-10-24 18:30:43 +02:00
DjWarmonger
eb0af0096e
Fixed #2072 .
2015-10-24 18:16:57 +02:00
DjWarmonger
61692ba168
Possibly fixed #1583 and other issues concerning players capturing towns.
2015-10-24 18:03:00 +02:00
DjWarmonger
3c4f7ec126
Fixed #2311
2015-10-24 17:15:21 +02:00
DjWarmonger
641aa13526
Some fixes for previous commit.
2015-10-24 17:02:00 +02:00
DjWarmonger
716c324695
Don't give a turn to player who is about to lose (days without town).
2015-10-24 16:21:30 +02:00
DjWarmonger
abe88ea890
- Refactoring legacy code
...
- Some checks for #2311
2015-10-24 15:09:46 +02:00
ArseniyShestakov
4f7c3ec60f
Minor formatting fixes within pathfinder-related code
2015-10-24 15:50:00 +03:00
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