AlexVinS
9250d16016
[c::b] project files tweak
2016-08-18 12:22:34 +03:00
Arseniy Shestakov
948cca02cc
Fixes to some crashes on exit and to have cleaner valgrind output
2016-08-18 06:52:10 +03:00
Arseniy Shestakov
39fe9472b6
CGameHandler::moveArtifact: check lock status by slot instead of id
...
This one fix issue 2455. We still need to do something with ArtifactID::ART_LOCK or ids for artifact from mods since they might conflict with each other.
2016-08-18 06:35:29 +03:00
Arseniy Shestakov
91c298bdaa
VCAI::tileHidden: added clearPathsInfo
...
Sector map likely updated anyway after AI turn starts, but cleaning of heroesUnableToExplore when tile hidden feels reasonable.
2016-08-18 03:51:00 +03:00
Arseniy Shestakov
c931fa5081
SectorMap::exploreNewSector: only store visible visitable objects
...
Fix crash that I initially missed. AI unable to access information about hidden objects like events via callbacks so we shouldn't store them here too.
2016-08-18 03:33:23 +03:00
AlexVinS
e4091c05ec
fixed unitialized value field
2016-08-17 09:49:43 +03:00
AlexVinS
e26384062f
Fixed memory leak in CObjectClassesHandler
2016-08-17 09:24:01 +03:00
AlexVinS
e7f2858d33
Use make_unique for TurnInfo in CGameHandler.
...
* Fixes use after free @CGameHandler.cpp:2093
2016-08-17 08:53:36 +03:00
Arseniy Shestakov
b0045fa357
Fix TurnInfo memory leaks
2016-08-16 15:47:21 +03:00
Arseniy Shestakov
b4a35f9c62
CPathfinderHelper: fix memory leak
2016-08-16 14:59:16 +03:00
DjWarmonger
dea39b8497
Complete solution for Subterranean Gate placement.
2016-08-15 21:37:38 +02:00
DjWarmonger
7600f8cf08
Quick fix - stop spawning Subterranean Gates at the edge of the map.
2016-08-14 08:36:15 +02:00
DjWarmonger
f995756973
First part of Subterranean Gates rework. Fixes # http://bugs.vcmi.eu/view.php?id=2450
2016-08-13 19:48:44 +02:00
DjWarmonger
8186fcae99
Removed some legacy code, work in progress.
2016-08-13 12:42:45 +02:00
DjWarmonger
2a9ddadedd
Fixes. Everything works now.
2016-08-12 21:40:22 +02:00
DjWarmonger
9b58450cb0
Part 3 - first working draft, cut generation time by half.
2016-08-12 19:16:21 +02:00
DjWarmonger
d1255f0d67
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2016-08-12 17:52:17 +02:00
AlexVinS
1c292205df
More logging cleanup
2016-08-12 12:14:10 +03:00
Arseniy Shestakov
7bdcd209e6
VCAI::wander: only use nearby objects from SectorMap when possible
...
Now AI only check full object list if there is no suitable objects found in current sector and sectors around it.
This optimization drastically increase wandering performance on maps with tons of objects when AI see most of it.
2016-08-12 09:08:53 +03:00
Arseniy Shestakov
aabf4808da
SectorMap: remember all visitable objects in sector for wandering
2016-08-12 09:02:14 +03:00
Arseniy Shestakov
b83dea2008
VCAI::wander: map object selection refactoring
...
Avoid doing extra steps that's not needed. Related to issue 2454.
2016-08-11 16:53:05 +03:00
Arseniy Shestakov
8533ee3256
VCAI::validateVisitableObjs: drop unused code that
...
For whatever reason it's not removed at compile time and still wasting CPU.
2016-08-11 14:54:58 +03:00
Arseniy Shestakov
6433d7dd40
VCAI::getFlaggedObjects: don't use thread specific ptr within VCAI
2016-08-11 12:19:08 +03:00
DjWarmonger
452027cd8d
Handle ObjectInfo via pointer to avoid expensive copy.
2016-08-11 10:49:19 +02:00
AlexVinS
379331fc73
[tests] Relaxed logging
2016-08-11 11:07:04 +03:00
DjWarmonger
19ea46a6d2
Part 2.
2016-08-11 09:20:50 +02:00
DjWarmonger
2410f0af61
- WeightedRule optimization - part 1
...
- comments, style
2016-08-11 07:49:08 +02:00
Arseniy Shestakov
25fd4d85e2
VCAI::getFlaggedObjects: use visitableObjs for better performance
...
This change is drastically improve performance on maps with water. One part that caused issue 2454.
2016-08-11 03:58:24 +03:00
Arseniy Shestakov
3a1a6cf338
CBattleInterface: fix crash on defeat in tactics phase. Fix issue 2440
...
It's possible to lose all mobile stacks if you move them on moat so tactics phase must end in that case.
2016-08-09 18:15:58 +03:00
DjWarmonger
2bffd4e5c1
Moar optimization!
2016-08-09 13:40:46 +02:00
DjWarmonger
7f0b852449
Huge optimization based on profiling - cut generation time by almost half (Jebus XL+U).
2016-08-09 10:12:13 +02:00
DjWarmonger
08dccb4cc3
Use binary search for roulette wheel. TODO: implement in other places.
2016-08-08 22:16:31 +02:00
DjWarmonger
7db2fc6d25
Fixes. Works correctly only for player factions configured in RMG options.
2016-08-06 12:16:13 +02:00
DjWarmonger
f980de7107
Place starting zones on surface/underground depending on player faction - first draft.
2016-08-06 10:04:03 +02:00
AlexVinS
6e24d1e929
Applied patch by rumianom from http://bugs.vcmi.eu/view.php?id=2442
2016-08-01 18:28:14 +03:00
AlexVinS
57e588cba1
attempt to fix travis build
2016-07-28 13:15:19 +03:00
DjWarmonger
5a1383fea8
Correct implementation for previous fix.
2016-07-25 18:37:42 +02:00
DjWarmonger
d9556332e1
Hopefully fixed zone guards misplaced due to paths connecting at acute angles.
2016-07-24 18:15:23 +02:00
DjWarmonger
40f28778c2
Minor optimization, saves few seconds.
2016-07-14 14:24:11 +02:00
DjWarmonger
7d7b51d0db
Generated zones can now have different sizes depending on template.
2016-07-13 10:35:31 +02:00
DjWarmonger
1d8fb01f46
More even distribution of surface / underground zones + refactoring.
2016-07-13 07:54:52 +02:00
DjWarmonger
ac68dca328
Fixed zone placer so it now correctly evaluates found solution.
2016-07-12 21:23:45 +02:00
DjWarmonger
aecf834cc1
Fixed placing of close objects #2447 . Some additional refactoring.
2016-07-12 11:42:03 +02:00
DjWarmonger
e1e520f0a2
Removed "growing" zones which don't fit the rest of algorithm. Zones are now better connected on complex maps.
2016-07-11 15:44:24 +02:00
DjWarmonger
c3cbe89e2a
Last improvement: attract zones and push them bakc in separate steps.
2016-07-10 18:16:32 +02:00
DjWarmonger
87ef3701aa
Probably better fitness function.
2016-07-10 16:37:54 +02:00
DjWarmonger
8ceceb897e
Fixed zones falling into negative cordinates. Should fix "assert(size)" crashes.
2016-07-10 14:32:45 +02:00
DjWarmonger
fb3adf762a
Improved zone placer - zones on different levels are allowed to overlap completely.
2016-07-10 13:32:33 +02:00
DjWarmonger
27974786e3
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2016-07-10 12:35:19 +02:00
DjWarmonger
f139b70279
Changed Subterranean Gate placement algorithm - now they are meant to be equidistant from both zone centers.
2016-07-10 12:29:48 +02:00