1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00
Commit Graph

5388 Commits

Author SHA1 Message Date
ArseniyShestakov
c83f15e413 Merge branch 'develop' into feature/tavernRumors
Conflicts:
	lib/CGameState.h
2015-12-05 01:01:26 +03:00
ArseniyShestakov
d856fde73f Rumors: use enum instead of magic numbers and avoid potential crash 2015-12-04 22:58:14 +03:00
ArseniyShestakov
2a63ba148a Thieves Guild: fix tavern map object, lvl 0 when no taverns owned
We also now check not number of towns, but only towns that has tavern built. Also according to original mechanics all taverns always display information based on your number of taverns and not number of taverns of object owner.
2015-12-04 18:38:57 +03:00
ArseniyShestakov
3b3c49420f Thieves Guild: correct number of taverns to access information 2015-12-04 17:52:30 +03:00
Ivan Savenko
faa7cbff18 Fixed gcc/clang warnings 2015-12-04 01:17:43 +02:00
Ivan Savenko
c2f4991e99 Replaced barrier with mutex due to data races:
Destruction of barrier while one of the threads is still in barrier.wait() is illegal. This may happen if caller thread reaches wait() after helper thread and immediately return's from the function destroying barrier which is still in use by helper thread
2015-12-04 00:12:49 +02:00
Ivan Savenko
f02e553b70 Fixed another uninitialized field possiblity causing issues with StupidAI 2015-12-04 00:11:44 +02:00
Ivan Savenko
2e56b547ee replaced references to SectorMap with shared_ptr to avoid data races in AI code 2015-12-04 00:10:51 +02:00
Ivan Savenko
73b4188fab Fixed access to unitialized memory causing StupidAI to act stupid 2015-12-03 21:28:01 +02:00
Ivan Savenko
90dfe3e782 reduced visibility for members of Mine and Dwellings 2015-12-02 22:34:13 +02:00
Ivan Savenko
7189a12df2 removed few more includes from headers 2015-12-02 22:10:46 +02:00
Ivan Savenko
7b5a7f43ad Removed includes of CGameState from headers 2015-12-02 21:39:53 +02:00
Ivan Savenko
c3ce4b25df Removed all #include's of CMap.h from headers.
To all - please, avoid #include's in headers as much as possible
This kills incremental build compile times
2015-12-02 21:05:10 +02:00
Ivan Savenko
bef7048460 minimized visibility of members of teleportation-related classes 2015-12-02 21:01:43 +02:00
Ivan Savenko
f9d9a38e53 Fixed gcc warnings 2015-12-02 20:59:38 +02:00
ArseniyShestakov
a62ee65d72 Rumors: implement income checking via statsHLP::getIncome
This also fix income ranking in Thieves' Guild
2015-12-01 06:28:08 +03:00
ArseniyShestakov
ffcc5ccdd2 Rumors: implement support for grail terrain rumor 2015-12-01 04:57:52 +03:00
ArseniyShestakov
c5485ceede Rumors: update changelog 2015-12-01 02:23:43 +03:00
ArseniyShestakov
15273ac0f7 Rumors: avoid repeating of same rumor twice in a row
Multiple rumors of same type can go in a row, but not identical rumors.
2015-12-01 02:14:11 +03:00
ArseniyShestakov
98582d628c Rumors: move code into CGameState and add backward compatability 2015-12-01 00:44:58 +03:00
ArseniyShestakov
879eaa47f8 Rumors: client-side proof of concept implementation
Actually information about this week rumor should be stored in gamestate and updated weekly
2015-11-30 20:52:15 +03:00
ArseniyShestakov
6704ea0cff Rumors: rename getTavernGossip to getTavernRumor for consistency
Original game used "Rumors" and not "Gossips" and we already using rumor in CMap.
2015-11-30 17:51:28 +03:00
ArseniyShestakov
f55bfe41d6 Digging: implement digging status on right click. Fix issue 401
This is also fix possibility to dig on some non-blockable objects like event.
2015-11-29 12:34:23 +03:00
ArseniyShestakov
f940e3ed42 Fix issue 2239. Pillarbox when restored after alt-tab in fullscreen
This isn't best solution and all SDL-related code need refactoring, but it's works.
2015-11-29 01:56:18 +03:00
ArseniyShestakov
ce5b7c73be CGEvent: avoid permanent event removal after visit. Fix issue 2339 2015-11-28 23:03:26 +03:00
ArseniyShestakov
c45cd1f4c2 CGHeroInstance::getOutOffsets: temporary fix for boat summoning
Appropriate fix would require to get rid of convertPosition everywhere. Check issue 515 for more details.
2015-11-26 10:55:02 +03:00
ArseniyShestakov
64c6d3c950 CGCreature::takenAction: add neverFlee check. Fix issue 2242 2015-11-25 09:34:49 +03:00
ArseniyShestakov
3d8f67f864 getFreeTiles: filter ROCK tiles. Fix issue 1870 2015-11-25 09:12:09 +03:00
ArseniyShestakov
745ab7c7df One more fix for options 2015-11-25 07:40:35 +03:00
ArseniyShestakov
2276af70dc PreGame: avoid crashing on random map options
Options is still broken, but at least we shouldn't crash there.
2015-11-25 07:25:44 +03:00
DjWarmonger
45d183289d Merge pull request #142 from edeksumo/Fix-Defence-Ani
Fix crash
2015-11-24 21:37:32 +01:00
edeksumo
aab5a05036 Fix crash during auto battle 2015-11-24 20:55:11 +01:00
ArseniyShestakov
0b9a9ab26d Add description of new pathfinder features into changelog 2015-11-24 13:36:51 +03:00
ArseniyShestakov
a851062891 Merge pull request #133 from vcmi/feature/pathfinderLayers
Pathfinder layers and related changes: fly and water walking implemented
2015-11-24 13:09:06 +03:00
ArseniyShestakov
ac57eaf61d Merge pull request #141 from vcmi/fix/oneWeekTurnsRemain
Bonus system: add turnsRemain support for ONE_WEEK duration
2015-11-24 13:08:03 +03:00
ArseniyShestakov
df4515901d CPathfinder: fix special movement boundary check
Forgot to fix it for water walking after fe12b8f664
2015-11-23 14:11:08 +03:00
ArseniyShestakov
f4c06660e4 CPathfinder::evaluateAccessibility: apply more optimizations 2015-11-22 21:31:47 +03:00
ArseniyShestakov
2632389aaf CPathfinder: bring FoW reference back to avoid performance loss
This one is revert 148355908d
2015-11-22 21:06:37 +03:00
ArseniyShestakov
6dacb84404 CPathfinder::addNeighbours: avoid allocating new vector each time 2015-11-22 07:32:33 +03:00
ArseniyShestakov
e1a360408d GameConstants: move operators into header and always inline them 2015-11-22 07:24:12 +03:00
ArseniyShestakov
fc06db4c4f Move STRONG_INLINE define into Global.h 2015-11-22 07:14:52 +03:00
ArseniyShestakov
5a87f58e09 CPathfinder: optimize checks order in calculatePaths 2015-11-22 06:23:54 +03:00
ArseniyShestakov
8217eb3a82 CPathfinder: split isLayerTransitionPossible into two functions
This way we can avoid usage of getNode for layers that clearly can't be used.
2015-11-22 06:16:16 +03:00
ArseniyShestakov
649ebfad2f TerrainTile::topVisitableObj: avoid costly vector copying 2015-11-22 05:34:37 +03:00
ArseniyShestakov
a1fe2ebc44 Pathfinding: restore gamestate usage to avoid overhead
Also when possible pass TerrainTile pointers to getMovementCost instead of using getTile.
2015-11-21 14:31:30 +03:00
ArseniyShestakov
438a444443 CGHeroInstance: move native terrain check into getNativeTerrain
That make it easier to use that code independently in TurnInfo
2015-11-21 13:32:45 +03:00
ArseniyShestakov
a375c86ea2 movementPointsAfterEmbark: get max move points from TurnInfo
Missed that when originally implemented TurnInfo.
Not pretties code, but boost performance a lot.
2015-11-21 12:46:59 +03:00
ArseniyShestakov
5ae6225ebc TurnInfo: implement internal bonus cache for most used bonuses
Bonus system even with caching add too big overhead so we'll only use it once for these bonuses.
Still I'm like it to be transparent for external code so it's a bit hacky code.
2015-11-21 10:00:09 +03:00
ArseniyShestakov
e91d79414b PathfinderOptions: use settings and move all defaults into schema 2015-11-21 00:32:23 +03:00
ArseniyShestakov
b48d65ad57 addNewBonus: add turnsRemain check for N_TURNS, N_DAYS and ONE_WEEK 2015-11-20 14:37:57 +03:00