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

1148 Commits

Author SHA1 Message Date
Arseniy Shestakov
10dbbead2d Fix indentation of logging code and around it
That wouldn't be as big issue if problem affected few files, but it everywhere in codebase.
Fixed it everywhere since in most files that is the only code with wrong indentation.
2016-03-12 04:46:21 +03:00
AlexVinS
e3e27b9bfe Move ghost creation to inner battle loop 2016-03-01 11:07:45 +03:00
AlexVinS
4bf9036c7b Ensure that ghost stacks are created only by BattleStacksRemoved packet.
This will allow client to receive notification.
2016-03-01 05:24:35 +03:00
AlexVinS
2c48c95c8d Fix casualties calculation for commander 2016-03-01 04:06:32 +03:00
AlexVinS
f890037008 Fixes 2016-02-29 04:42:15 +03:00
AlexVinS
5df8d1cbd0 Update low level battle stacks accessor for ghost selection support. 2016-02-28 05:10:20 +03:00
AlexVinS
9036d39241 Do not remove battle stacks, make them ghosts instead.
* exclude ghost stacks from (hopefully all) get* results for now
2016-02-28 01:08:56 +03:00
AlexVinS
5d5ad99436 Rename DEAD_CLONE -> GHOST, as this will be possible for any stack 2016-02-28 00:13:34 +03:00
Arseniy Shestakov
f8c6751707 CGameHandler::endBattle: change town ownership when hero lost siege 2016-02-22 03:35:38 +03:00
ArseniyShestakov
c550484613 Merge pull request #181 from vcmi/feature/drawbridgeMechanics
Feature/drawbridge mechanics
2016-02-14 16:32:24 +03:00
Arseniy Shestakov
c5cfc8467f Battles: change naming from drawbridge to gate for everything
This way code is shorter and cleaner while in future we may support towns with gate only.
2016-02-13 17:40:31 +03:00
Arseniy Shestakov
11dc428b1e Battles: move hexes enum to GameConstants and fix wall position
Before we had hex 62 marked as destructible wall while actually it's must be 78.
2016-02-09 17:38:59 +03:00
Arseniy Shestakov
01b4d0ae01 Battles: better handling for walking double-wide creatures
Request opening of gate even if only second half of double-wide stack going to stop on it.
2016-02-09 15:41:37 +03:00
Arseniy Shestakov
a07761b608 Battles: readable identifiers enum for drawbridge and gate hexes
Dont like to locate them in BattleHex, but it's best place I can see so far.
2016-02-09 12:25:13 +03:00
Arseniy Shestakov
731de439eb Battles: drawbridge support for double-hex flying creatures 2016-02-09 11:59:20 +03:00
Arseniy Shestakov
28aff78f2c Battles: implement drawbridge support for flying creatures 2016-02-09 11:30:09 +03:00
Arseniy Shestakov
fbb34b8d04 Battles: always update drawbridge state after battle state changed
Now gate tower destruction will immidiately affect drawbridge state.
2016-02-09 10:59:33 +03:00
Arseniy Shestakov
47433919ab Battles: handle drawbridge lowering from stack start position 2016-02-09 10:45:59 +03:00
Arseniy Shestakov
015a57f81c Battles: more advanced drawbridge mechanics on server-side
Everything work as intended except starting point not included in path.
So we send BattleDrawbridgeStateChanged package when already standing on bridge hex.
2016-02-08 12:16:47 +03:00
ArseniyShestakov
890ae43f55 Merge pull request #180 from Zyx-2000/FileInfo
Refactored CFileInfo & ResourceID
2016-02-08 04:55:39 +03:00
ArseniyShestakov
7f68124b97 Merge pull request #136 from vcmi/issue/1372-2
issue/1372
2016-01-31 20:28:54 +03:00
Vadim Markovtsev
3926920103 Rename radious -> radius
There is no such English word, "radious"
Some files get new lines in the end - BSD sed bug + best practices
2016-01-31 18:01:58 +03:00
Vadim Markovtsev
918fbd8530 Refactor hero's mana regain 2016-01-30 13:51:07 +03:00
Vadim Markovtsev
22fc4fd3e9 Fix 2406 reset potentially available heroes 2016-01-30 10:02:33 +03:00
AlexVinS
16e0d18880 Added special slots for war machines and arrow towers 2016-01-30 00:53:53 +03:00
Arseniy Shestakov
57328bdc83 Battles: implement basic drawbridge mechanics
Movement to blocking hex 94 not yet properly handled as stack movement code need to be rewritten first.
Also gate destruction not immidiately affect drawbridge state.
2016-01-29 22:43:35 +03:00
AlexVinS
ba017c443d Start from diff of pull request #124 from vcmi/issue/1372 2016-01-29 21:05:17 +03:00
Zyx-2000
3a1a8e3d47 further refactoring-related changes 2016-01-29 15:16:14 +01:00
Zyx-2000
c3e8c8bc1c Merge branch 'develop' into FileInfo 2016-01-27 19:21:43 +01:00
AlexVinS
d7c0c3759a Merge branch 'Zyx-develop' into develop
Conflicts:
	lib/filesystem/AdapterLoaders.h
2016-01-27 18:53:41 +03:00
Vadim Markovtsev
36eaa399e7 Add hardcodedFeature to switch winner's retreating with no troops 2016-01-27 16:42:17 +03:00
AlexVinS
bffdc2813d revert some project changes 2016-01-27 15:21:29 +03:00
ArseniyShestakov
4483c45905 Merge pull request #167 from vmarkovtsev/issue/1569
Fix 1569 winning hero with no troops shall retreat
2016-01-27 11:48:22 +03:00
Vadim Markovtsev
7772b6de74 Fix 981 reset hero on hiring after retreat/surrender 2016-01-26 22:48:31 +03:00
Zyx-2000
70e3c81b9f Replaced CFileInfo with more correct and efficient alternative 2016-01-26 14:51:38 +01:00
Vadim Markovtsev
6849ff846c Fix memory corruption with a draw; race in setBattleResult() 2016-01-25 15:55:32 +03:00
Vadim Markovtsev
afa95312ba Fix 2139 captured spell scroll descriptions 2016-01-25 08:49:26 +03:00
Vadim Markovtsev
7185890723 Fix double free in battleAfterLevelUp() in case of a draw 2016-01-24 01:31:39 +03:00
ArseniyShestakov
b19e082f37 Merge pull request #166 from vmarkovtsev/issue/1723
Fix 1723 quest crash on combined arts
2016-01-23 23:23:07 +03:00
Vadim Markovtsev
2a6a8cd433 Fix segfault when non-hero forces win 2016-01-23 19:42:56 +03:00
Vadim Markovtsev
9ffd0155e6 Fix 1810 suggest artifact assembly 2016-01-23 16:24:43 +03:00
Vadim Markovtsev
99992599db Partially fix 1416 tavern hero rotation 2016-01-22 22:37:46 +03:00
Vadim Markovtsev
9dfef2186d Fix 1569 winning hero with no troops shall retreat 2016-01-22 22:29:53 +03:00
Vadim Markovtsev
11bce2908d Fix 1723 quest crash on combined arts 2016-01-22 12:56:25 +03:00
Arseniy Shestakov
d25372a397 Added vcmiglaurung cheat that add 5000 crystal dragons into each slot 2016-01-21 10:49:09 +03:00
Zyx-2000
a50a702073 switched to -std=gnu++11 2016-01-18 17:49:07 +01:00
Vadim Markovtsev
4a05402c2f Revert 5cd4e852d4 "Use portable cast in CTeleportDialogQuery also"
Actually, this leads to crash on MacOSX, I specially left that intact.
2016-01-18 10:45:09 +03:00
Zyx-2000
203b2dccc3 hopefully fixed things 2016-01-09 21:23:55 +01:00
Arseniy Shestakov
9fd1cff090 Refactoring: always use std prefix for shared_ptr, unique_ptr and make_shared
Long time ago it's was used without prefix to make future switch from boost to std version easier.
I discusses this with Ivan and decide to drop these using from Global.h now.

This change wouldn't break anything because there was already code with prefix for each of three cases.
2015-12-29 05:43:33 +03:00
Arseniy Shestakov
29a7934a99 Refactoring: avoid using namespace when it's not absolutely needed 2015-12-29 02:14:08 +03:00