1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00
Commit Graph

199 Commits

Author SHA1 Message Date
f760e22707 Fixed two recursive infinite loops in case of alternate buildings.
* introduced in https://github.com/vcmi/vcmi/pull/211
2016-10-15 04:19:47 +03:00
cf143cd257 Hack-fix crash in CGTownInstance::genBuildingRequirements related to alternate town buildings
* this disables features of #211, but actual problem may be deeper inside logical expressions
2016-10-14 23:46:24 +03:00
2c1dddde33 Fix memory problems with BonusList
Bonus * -> std::shared_ptr<Bonus>

This cures the following problems:

1) Memory corruption at exit. Some Bonus-es were deleted twice (mods?).
2) Memory leaks. Some Bonuses were not deleted.
3) Reduce the number of "Orphaned child" messages.

Valgrind reports 0 leaked memory now and no invalid reads/writes.
2016-09-29 15:08:00 +02:00
f6df107a55 Replace more magic subIDs with readable enums 2016-09-18 00:53:37 +03:00
b5fa97b697 Merge pull request #211 from Chocimier/iss2321
Tested. Everthing looks fine so merging.
2016-09-14 00:37:17 +03:00
c8faca8f39 Refactoring: only use RNGs explicitly to avoid bug prone code in future
Now server-side code should always use CRandomGenerator::getDefault which is serialized in GH.
CGameState::getRandomGenerator should be only used from GS code and CPackForClient-based applyGs.
2016-09-11 00:10:46 +03:00
40003460ca Check if building's dependencies are allowed 2016-09-10 19:38:49 +02:00
2ba3b20928 Multiple changes to RNG usage to both client and server
Server should never use RNG from CGameState directly.
Instead server get's own RNG that's state is secret for client.
2016-09-09 23:16:42 +03:00
044e2b9e51 Properly calculate building requirements
In OH3 you can't build Capitol when Tavern is not builded.
In VCMI up to now you could.
2016-08-30 22:15:24 +02:00
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
8f1fba9551 Merge pull request #146 from vcmi/feature/VCMIMapFormat1
Ok let's try it.
2016-03-01 07:49:54 +01:00
2021decb91 Serialize town spells 2016-02-25 22:59:17 +03:00
17e557be17 Advance Logical identifier condition 2016-02-23 16:36:21 +03:00
9428f865d3 CGTownInstance: erase all stacks when town is captured by enemy 2016-02-22 03:33:15 +03:00
d15106bf63 CGTownInstance: implement armies merging on siege. Fix issue 169
Merging algorithm is replicate one from original game.
2016-02-22 02:46:31 +03:00
dd1aabbe23 Use JsonSerializeFormat for map objects 2016-02-22 02:37:19 +03:00
4d9058e412 Whitespace cleanup. (No code changes.) 2016-02-15 13:34:37 +03:00
67b03b9658 Fixed remaining tempOwner testsю 2016-02-14 12:25:49 +03:00
fb322b41bc Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1 2016-02-14 12:14:57 +03:00
d4524c2fbd CGDwelling: dont set owner for Refugee Camp. Fix issue 2029 2016-02-13 19:26:47 +03:00
6e205a58b4 Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1
Conflicts:
	lib/VCMI_lib.cbp
	lib/filesystem/CZipLoader.cpp
	lib/filesystem/CZipLoader.h
	lib/mapObjects/CGTownInstance.cpp
2016-02-04 10:27:51 +03:00
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
f9d0b20234 CGMine, CGArtifact, CGGarrison serialization 2016-01-23 19:53:02 +03:00
59199ccdbd Bonus system: add treeHasChanged call where bonus objects changed 2015-12-11 16:13:18 +03:00
1730a31471 HeroBonus: get rid of code that used getBonusList 2015-12-11 16:01:51 +03:00
7b5a7f43ad Removed includes of CGameState from headers 2015-12-02 21:39:53 +02:00
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
3663b952ea Fix issue 2276. Refugee Camp shouldn't be guarded 2015-10-16 06:45:06 +03:00
8f2da66a18 fix mantiss 1967 + some refactoring
* remove TModDescr and realted APIs - they were only used in one place
2015-09-04 22:29:20 +03:00
bdee647525 CastleInterface: Exclude previous building upgrade in reqs
Hide CityHall from Capitol prerequisites in Capitol build window
2015-08-19 12:05:43 -04:00
9e7b459882 Partial solution to #2206
TODO: add serialized field that contains custom guard config
2015-06-05 11:28:14 +02:00
54453aee73 get rid of boost::assign 2014-10-04 00:34:13 +04:00
5cb6eaa252 Fixed major RMG bug. 2014-09-21 20:57:42 +02:00
69c6a3fa79 Fixed crash on visiting multi-creature dwellings (1874) 2014-08-19 13:16:25 +03:00
d1dd7eef48 Proper fix for #1712 - Building requirement tests are now fixed
- added minimize() method in logical expressions that will remove excessive elements
- replaced forEach() with morph() that allows replacing types in variant
2014-08-07 19:53:07 +03:00
bae9f2083f Workaround for hero & town issue. Game still crashes elsewhere, though. 2014-07-01 12:07:53 +02:00
bda71bed83 Uploading misc tweaks. 2014-07-01 07:07:40 +02:00
57fa905a2b Something that compiles. 2014-06-26 22:05:27 +02:00
e51e2190fd Merge branch 'develop' of https://github.com/vcmi/vcmi into RMG 2014-06-26 20:12:37 +02:00
32240da34e Reduced number of #include's in headers. May break compilation on Win
since some net packs now need DLL_LINKAGE
2014-06-25 17:11:07 +03:00
a0689fa377 Refactoring of hoverText from objects:
- removed hoverText field
- split getHoverText() method into 3:
- - getObjectName() for generic name
- - getHoverText(Player) for player-specific text
- - getHoverText(Hero) for hero-specific strings
2014-06-24 20:39:47 +03:00
ad632d1e8a Moved FoW management from CGObjectInstance to callback 2014-06-24 20:39:47 +03:00
5ebc0e8614 First part of object instance API cleanup
- removed passability() method in favour of passableFor(PlayerColor)
- moved operator < code to map handler
- updated class documentation
2014-06-24 20:39:47 +03:00
79036484dd Trying to sort out project changes and compile issues. 2014-06-23 19:58:19 +02:00
c605e2d10c Gcc compile & warning fixes 2014-06-22 17:26:08 +03:00
09d595e385 - Implemented "mapObject" entry for hero classes
- Updated schemas
- Some bugfixing
2014-06-16 19:27:26 +03:00
836c466f81 - Implementation of overrides for towns
- Converted dwellings.json into new format
- Implemented "mapObject" entry in town format
- Removed capital/fort/village fields from town in favor of overrides
2014-06-15 19:43:01 +03:00
b2e8c92383 Cleanup:
- removed commented-out #includ'es
- renamed some files to match name of class
2014-06-05 20:26:50 +03:00
652ceb2bde Finally shattered CObjectHandler.cpp into tiny bits
- This file is now split into multiple smaller files in mapObjects
directory
- CObjectHandler itself now contains only core classes (Handler itself,
CGObject and interfaces)
- Cleaned up excessive #include's through whole project
2014-06-05 19:52:14 +03:00