godric3
7ded9dbda8
Fix crash when generating random map with random number of players
2018-10-27 18:18:08 +02:00
DJWarmonger
273802c92c
I have no idea what I'm doing
2018-07-26 12:14:29 +02:00
Johannes 'josch' Schauer
95bec98936
lib/rmg/CRmgTemplateZone.cpp: Remove a variable that was introduced in 2016 but never used
2018-04-19 15:07:21 +02:00
Johannes 'josch' Schauer
56fefca806
lib/rmg/CRmgTemplateZone.cpp: Add parenthesis to make operator precedence unambiguous
2018-04-19 15:06:26 +02:00
Arseniy Shestakov
ac66fc7f42
Full rework of pre-game interface and networking
...
New features for players:
* Loading for multiplayer. Any save could be used for multiplayer.
* Restart for multiplayer. All clients will restart together.
* Loading from single save.
* Hotseat mixed with network game. Multiple players per client.
* Now connection to server could be cancelled.
* Return to menu on disconnections instead of crashes.
* Restoring of last selected map, save or campaign on next run.
TLDR on important changes in engine code:
* UI: work with server separated from UI
* UI: all explitic blitting replaced with IntObject's
* UI: all new code use smart pointers instead of DISPOSE
* Gameplay always start through lobby controlled by server.
* Threads receiving netpacks now shared for lobby and gameplay.
* Campaigns: heroes for crossover now serialized as JsonNode.
2018-04-04 14:24:26 +07:00
AlexVinS
9d108d59db
Redone RMG template serialization using JSON serializer, added tests
2018-03-10 19:36:19 +03:00
AlexVinS
26aad17295
Actually copy zone data from map generator template
...
* fixes https://bugs.vcmi.eu/view.php?id=2482
2018-03-05 17:05:48 +03:00
Nikolay Shalakin
3795985de9
Eliminate warnings / errors. Pull request #388
2018-02-11 15:17:14 +03:00
Michał Kalinowski
26a222ac62
Change JsonType to enum class ( #393 )
...
Change enum JsonType to enum class JsonType
2017-11-27 00:18:18 +03:00
DJWarmonger
8f42cdea67
Refactoring: use private pointer to CMapGenerator
2017-11-03 21:03:51 +01:00
AlexVinS
0868164147
(int) -> static_cast<int>
2017-08-12 15:43:41 +03:00
AlexVinS
15138c23de
Finished conversion to new logging API
...
* removed logger streams
* (float3|int3)::operator() -> (float3|int3)::toString(), it was too ugly and confusing.
2017-08-11 23:06:27 +03:00
AlexVinS
143ff682bc
Logging cleanup
2017-08-10 21:59:55 +03:00
AlexVinS
85e952f25f
Logging cleanup 3
2017-08-10 20:17:10 +03:00
AlexVinS
61e241308d
Logging cleanup
2017-08-10 19:52:05 +03:00
ArseniyShestakov
9d9c026c85
Code style: serialize everything on own lines for easier debugging ( #357 )
2017-07-31 16:35:42 +03:00
Arseniy Shestakov
cdd9dbc7f1
Code style: avoid some ambiguous else if indentation
...
If some code intentionally want to break else if to achieve specific indentation there must be braces.
2017-07-19 03:42:26 +03:00
ArseniyShestakov
a4c0ad94b1
Code style: remove default value hints in definitions ( #342 )
...
Some are outdated and this is something IDE are useful for.
2017-07-15 14:08:20 +03:00
Arseniy Shestakov
f1e5797834
Code style: move or add licensing information on top of every file
2017-07-14 01:26:03 +03:00
Arseniy Shestakov
dbcd79c48a
Code cleanup: remove double and unneded semicolons
2017-07-12 22:01:10 +03:00
DJWarmonger
4d1fb67594
Sanity check for Coverity #1366290 .
...
(Vector should never be empty, especially for chosen zone).
2017-05-27 21:37:05 +02:00
DJWarmonger
346d2ac588
Possible fix for #2681 .
2017-05-27 14:57:45 +02:00
AlexVinS
a85b4cf2a5
* WIP on event condition format
...
* Hero portrait serialization
* Fix town spells serialization
* Added support for float exponential part in Json
* Added support for int64 in Json
* Added basic Hero definitions serialization
* Added rumors serialization
* Advanced player info serialization.
* Added Disposed heroes serialization, (!) not covered with tests yet
* Added Local event serialization
* Added Pandoras box serialization
* Added Seer hut reward serialization
* Added CQuest serialization
* Added API for map object instance names serialization.
* Added random dwelling options serialization
* Advanced town options serialization
* Advanced hero options serialization
* More map format tests
* A lot of fixes, cleanup and refactoring
2017-05-27 00:23:19 +03:00
DjWarmonger
73c62f1b4c
Restore cut ring around main town.
2016-12-21 22:23:55 +01:00
DjWarmonger
4b3a878c00
Fix for passability.
2016-12-21 13:37:19 +01:00
DjWarmonger
a0596ebecf
Add clearance under town to ensure passability.
2016-12-21 10:43:24 +01:00
DjWarmonger
cc452bdfa9
Improved road routing so they can go under any passable object.
2016-12-21 10:10:37 +01:00
DjWarmonger
f78b524731
- Remove obstacle in front of player-owned towns
...
- Allow obstacles to touch town object
2016-12-20 15:23:47 +01:00
DjWarmonger
e37c35e439
Zone guard will cause object be placed as far away from it as possible in both zones.
2016-12-20 11:58:39 +01:00
DjWarmonger
ee3aec55f2
Correct implementations of A* algorithm. Seemingly fixes #2496 , it's also faster.
2016-12-15 16:29:23 +01:00
DjWarmonger
63d33a1e7c
Extract priority queue construction for reuse.
2016-12-15 12:58:16 +01:00
DjWarmonger
4102546977
Corrected road generation - they will be straight whenever possible.
2016-12-15 12:36:47 +01:00
AlexVinS
609c6f81bd
Fixed a few CWE-457
2016-11-27 22:37:41 +03:00
DjWarmonger
56b201e7e8
Fixed CID 1366289 and 1366290.
2016-11-25 19:32:54 +01:00
AlexVinS
5a3854a8de
Fixed CID 1288852, CID 1243202
2016-11-25 16:51:31 +03:00
AlexVinS
db40e125eb
Fixed CID 1243181, CID 1197449, CID 1366374, CID 1366377, CID 1366359
2016-11-24 21:56:30 +03:00
dydzio
5c07e1c432
Minor typo fixes
2016-11-10 11:51:47 +01:00
Vadim Markovtsev
c696746017
Fix some compilation warnings
2016-10-28 08:07:05 +02:00
AlexVinS
42e7128acc
Fixed possible use-after-free crash with artifacts registration in RMG.
2016-09-08 14:48:48 +03:00
AlexVinS
6dc47a2de0
Fixed use-after-free crash with quests registration in RMG.
...
* code taken from PR #200
2016-09-08 14:48:46 +03:00
Arseniy Shestakov
452e28d183
Remove some useless includes found by cppclean
...
This of course was tested and shouldn't break anything
2016-08-26 04:42: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
452027cd8d
Handle ObjectInfo via pointer to avoid expensive copy.
2016-08-11 10:49:19 +02:00
DjWarmonger
2410f0af61
- WeightedRule optimization - part 1
...
- comments, style
2016-08-11 07:49:08 +02: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