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

1612 Commits

Author SHA1 Message Date
nordsoft
6eb43d3834 Minor changes 2022-10-27 01:39:57 +04:00
nordsoft
21a1706627 First working prototype 2022-10-27 00:52:39 +04:00
nordsoft
dd45d1a9cf Develop game part 2022-10-25 05:27:53 +04:00
nordsoft
2645843d4f Fix dead server 2022-10-08 22:23:02 +04:00
nordsoft
63b29cbaea Code review tweaks 2022-10-08 19:52:53 +04:00
nordsoft
e718f7fe39 Fix reconnection 2022-10-06 19:23:34 +04:00
nordsoft
ea49b8cf40 Cleanup code 2022-10-06 17:56:54 +04:00
nordsoft
16e185343a Add host commands to control game 2022-10-06 15:54:46 +04:00
nordsoft
895ec2d302 Make console available during other players' turn 2022-10-05 19:04:51 +04:00
nordsoft
3ff38b84a2 Support hotseat over multiplier 2022-10-05 01:54:31 +04:00
nordsoft
77ff6a64e6 Show message about client connecting and disconnecting 2022-10-05 00:51:34 +04:00
nordsoft
930f03e812 uuid check 2022-10-04 20:54:40 +04:00
nordsoft
0ea5a8fbe7 Merge remote-tracking branch 'upstream/develop' into mp-disconnection
# Conflicts:
#	server/CVCMIServer.cpp
2022-10-04 17:41:43 +04:00
nordsoft
722acb2a1d Reconnection works 2022-10-04 05:42:14 +04:00
nordsoft
16a5414247 Reconnection partially works 2022-10-04 05:09:03 +04:00
nordsoft
b91bb41a80 One step forward 2022-10-04 02:25:22 +04:00
Andrii Danylchenko
5c44c8f4da
Merge pull request #1011 from kambala-decapitator/fix-multiple-heals
allow healing ability only before first turn of each round
2022-10-03 21:43:08 +03:00
Andrii Danylchenko
382b3ae94a
Merge pull request #1041 from vcmi/nkai-fixes
NKAI: android fixes
2022-10-03 20:30:05 +03:00
Andrii Danylchenko
04490b709a
Merge pull request #1000 from vcmi/multiplayer
Multiplayer
2022-10-03 20:16:39 +03:00
nordsoft
512cf014aa Freeze current state 2022-10-03 20:47:00 +04:00
nordsoft
f4b7cf8196 Transfer player ownership to AI 2022-10-03 20:47:00 +04:00
Andrey Filipenkov
52371a4d3e allow healing ability before first turn attempt of each round 2022-10-03 15:48:39 +03:00
Andrii Danylchenko
8f599ed043 NKAI: android fixes 2022-10-03 09:01:15 +03:00
Andrii Danylchenko
2434fe3f6f NK: fix AI speed 2022-10-01 13:49:27 +03:00
nordsoft
fea05a4320 Finally game restart works
# Conflicts:
#	lib/CGameState.cpp
#	server/CVCMIServer.cpp
2022-09-29 21:08:05 +04:00
Andrii Danylchenko
dae726b82d
Merge pull request #1005 from kambala-decapitator/ios-min-12
raise iOS deployment target to 12.0
2022-09-29 19:57:04 +03:00
nordsoft
cbfa125085 Remove commented line 2022-09-29 14:29:57 +04:00
Tomasz Zieliński
20c102e648 Remove T prefix from new typedefs 2022-09-29 11:44:46 +02:00
nordsoft
bebe0dd86c Some change 2022-09-29 00:35:38 +04:00
nordsoft
2eb497b477 Looks like everything works 2022-09-28 23:38:41 +04:00
nordsoft
7ee4fca120 Pass whole gamestate over network 2022-09-28 23:15:05 +04:00
Tomasz Zieliński
f386f42166 Merge remote-tracking branch 'origin/develop' into terrain-rewrite
# Conflicts:
#	lib/Terrain.cpp
#	lib/Terrain.h
#	lib/battle/CBattleInfoEssentials.cpp
#	lib/rmg/ObstaclePlacer.cpp
#	lib/rmg/RiverPlacer.cpp
2022-09-27 07:50:17 +02:00
Andrey Filipenkov
53ac61b52b iOS: don't create unused CConsoleHandler 2022-09-27 07:05:10 +03:00
Nordsoft91
d4f97aadf0
Merge branch 'develop' into incomatibility-response 2022-09-25 13:26:07 +04:00
Tomasz Zieliński
4ea57ea7fc A variety of suggested style tweaks 2022-09-25 09:33:56 +02:00
Andrey Filipenkov
9f46bf5bff Apply suggestions from code review
Co-authored-by: Nordsoft91 <nordsoft@yahoo.com>
2022-09-24 15:55:26 +03:00
Andrey Filipenkov
605d5b6481 add dedicated macro when building as single process
fix kambala-decapitator/vcmi#40
2022-09-24 15:55:25 +03:00
Andrey Filipenkov
cd4b68c034 fix repeated launches of single player
now server actually terminates
2022-09-24 15:55:22 +03:00
Andrey Filipenkov
342a859a3f fix typo 2022-09-24 15:55:21 +03:00
Andrey Filipenkov
24a5dd797c fix starting local server 2022-09-24 15:55:21 +03:00
Andrey Filipenkov
de05479532 Revert "attempt to run server in a separate app"
This reverts commit 99fe55b295ad95033626c15011cfe49779269156.
2022-09-24 15:55:21 +03:00
Andrey Filipenkov
e61e283b75 [iOS] remove everything related to server app 2022-09-24 15:55:21 +03:00
Andrey Filipenkov
c6e51852d0 add ability to build VCMI as single process
"Client process -> shared VCMI lib <- Server process" is turned into "shared Client-VCMI lib -> process <- static Server-VCMI lib"
- adds lib_client and lib_server targets that define distinct namespaces
- lib_client is a dynamic library which is shared with AI libs, lib_server is static
2022-09-24 15:55:21 +03:00
Andrey Filipenkov
ff635edc0b wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
Andrey Filipenkov
3388583089 use component-based install to copy only what's needed for every app 2022-09-24 15:55:20 +03:00
Andrey Filipenkov
fae295da88 allow building without codesigning 2022-09-24 15:55:20 +03:00
Andrey Filipenkov
9dc5f3ed8b improve RPATH handling, apply RPATH when installing dylibs 2022-09-24 15:55:20 +03:00
Andrey Filipenkov
bb9d19deee fix whitespace 2022-09-24 15:55:19 +03:00
Andrey Filipenkov
2354023731 move extern "C" to header 2022-09-24 15:55:18 +03:00
Andrey Filipenkov
2fc4d48215 load game data from shared dir
kambala-decapitator/vcmi#15
2022-09-24 15:55:18 +03:00
Andrey Filipenkov
e20a6c3670 server: add buttons to start server and to move data to shared directory
kambala-decapitator/vcmi#9 kambala-decapitator/vcmi#15
2022-09-24 15:55:18 +03:00
Andrey Filipenkov
4647bd8981 add App Group entitlement
kambala-decapitator/vcmi#9
2022-09-24 15:55:18 +03:00
Andrey Filipenkov
7def214740 more Xcode-compatible Info.plist 2022-09-24 15:55:17 +03:00
Andrey Filipenkov
13dd451ff5 add simple app icons 2022-09-24 15:55:17 +03:00
Andrey Filipenkov
dde9a5d5d2 todo updates 2022-09-24 15:55:17 +03:00
Andrey Filipenkov
6e41e3154c fix running on device from Xcode
proper codesigning
2022-09-24 15:55:17 +03:00
Andrey Filipenkov
cfa22c33ad use rpath properly 2022-09-24 15:55:17 +03:00
Andrey Filipenkov
b6c4126bed install files after building server/client
package required files inside app bundle
2022-09-24 15:55:17 +03:00
Andrey Filipenkov
92a7936202 add Info.plist to sources 2022-09-24 15:55:17 +03:00
Andrey Filipenkov
09f5ea52f2 remove background audio hack 2022-09-24 15:55:17 +03:00
Andrey Filipenkov
e72e5cea6f attempt to run server in a separate app
partially reverts 3258f8bb40487e3731bf452dbda1add6294ff4b2
2022-09-24 15:55:17 +03:00
Andrey Filipenkov
26a1cc5b73 todos 2022-09-24 15:55:16 +03:00
Andrey Filipenkov
2e18299897 make server a static lib, run it in a separate thread
issues to solve:
- dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. 13CPackForLobby, 20LobbyClientConnected, 20LobbyClientConnected.
- error setting socket option: set_option: No buffer space available
2022-09-24 15:55:16 +03:00
Andrey Filipenkov
c4233ad706 exclude some code similar to android 2022-09-24 15:55:16 +03:00
Tomasz Zieliński
a5077245a8 Merge remote-tracking branch 'origin/develop' into terrain-rewrite
# Conflicts:
#	lib/Terrain.cpp
#	lib/Terrain.h
2022-09-23 20:01:13 +02:00
nordsoft
8f6f9707a6 Read error message from translate.json 2022-09-23 15:20:11 +04:00
nordsoft
e74890c4b1 Add system message about mods incompatibility 2022-09-23 15:02:45 +04:00
Andrii Danylchenko
328fe4a556
Merge pull request #952 from kambala-decapitator/fix-vampire-drain-effect
server-side fixes to battle events
2022-09-22 18:37:29 +03:00
Andrii Danylchenko
b4d3445559
Merge pull request #971 from kambala-decapitator/fix-warnings
Fix most project warnings
2022-09-22 16:05:32 +03:00
Andrey Filipenkov
1d57c40740 wrap && conditions in parentheses when near || 2022-09-22 11:54:09 +03:00
Andrey Filipenkov
7e6ed0583c disable all scripting code when configuring without scripting modules 2022-09-21 19:31:42 +03:00
Tomasz Zieliński
494b0f0226 First version that compiles 2022-09-21 11:34:23 +02:00
Andrey Filipenkov
87a88da3a9 add Fire Shield damage to the battle log 2022-09-21 10:42:42 +03:00
Andrey Filipenkov
b95841dabb fix creating "creatures perished" battle log entry 2022-09-21 10:38:42 +03:00
Andrey Filipenkov
1313da191b trigger Drain Life effects after the attack
- animation and sound are played after the attack
- amount of drained life appears after damage dealt in the battle log
2022-09-20 18:00:00 +03:00
DjWarmonger
7ba271edf1
Rotation rebase2 (#912)
* Instead of [x][y][z] coordinates, map will be stored as [z][x][y].
* Nullkiller AI can get it too.
* Use boost::multi_array instead of nested vectors
* In MapHandler too
* Rotate foreach algorithms, too
* VCAI gets rotated, too
2022-09-18 17:39:10 +03:00
Andrey Filipenkov
99af5bbe4c add dedicated method to get logs path 2022-09-18 09:24:36 +03:00
Tomasz Zieliński
40585a66c0 Style, commend - requested 2022-09-11 11:31:28 +03:00
Tomasz Zieliński
6fb7301e8e Fixed issue with taking creatures from a Bank, Pandora or joiners 2022-09-11 11:31:27 +03:00
Andrii Danylchenko
4b4cc3cf4b battlefields in VLC and custom bonuses for terrain patches 2022-09-11 11:31:27 +03:00
Nordsoft91
c4035134e5 New battlegrounds (#758) 2022-09-11 11:31:26 +03:00
Nordsoft91
aaa07e4d2e New terrain support - part 1 (#755)
Initial support of new terrains
2022-09-11 11:31:26 +03:00
Soar Qin
188607b05f Replace cotire with CMake builtin precompiled headers support (Requires CMake version >= 3.16) 2022-06-17 17:20:08 +03:00
Konstantin
8fc14369a4
CMake presets. (#744)
* CI: use single build action
* CMake: use imported targets
* CI: do not build boost for linux
* CMake: add FORCE_BUNDLED_MINIZIP option
* linux: use external minizip and fuzzylite
* CMake: add presets
* .gitignore: ignore cmake build dirs
* github: use cmake presets
2022-05-26 08:55:20 +03:00
Konstantin
c6b198ce14
Warning fix (I moved C++17 and CI to another branch) (#739)
* clang warning fixes
* use CMake 3.10 due to MXE CI does not have 3.13 yet

Co-authored-by: Konstantin <rilian@niisi.ras.ru>
2022-05-19 15:14:50 +03:00
Andrii Danylchenko
e220918230 full crash dump 2022-05-14 13:23:09 +03:00
Andrii Danylchenko
0d15089dd4 Do not remove hero if left only with commander 2022-05-01 09:30:30 +03:00
Arseniy Lartsev
bfd57ab5b5 Fixed scholar skill icon in the scholar dialog
The icon was for one level higher than the actuall skill level,
especially problematic for expert where right-clicking the icon
woould cause a crash
2022-03-13 16:47:52 +02:00
Andrii Danylchenko
550f544592 Add logging of network failure during connect 2022-03-05 15:53:07 +02:00
Dmitry Orlov
8cae3398ba Feature: Army Management Shortcuts should work as in HD+ Mod 2021-11-28 20:00:43 +02:00
Dmitry Orlov
7cfd1fe0ca Fix: Captured town should not be duplicated on the UI 2021-10-31 17:33:26 +02:00
Dmitry Orlov
e4c2f0c822 Fix: Skyship Grail should work immediately after capturing without battle 2021-10-31 09:01:49 +02:00
Dmitry Orlov
30b879ae5d Fixed: duplicated bonusing building. Improved: opposite bonus propagation 2021-09-12 14:30:54 +03:00
Dmitry Orlov
2a39c401b8 Feature: Opposite Side Limiter. Added: Old saves support. 2021-09-04 14:15:38 +03:00
Dmitry Orlov
25d9ea1ddf Feature: Opposite Side Limiter 2021-09-04 14:15:38 +03:00
Andrii Danylchenko
9c8d776398 Merge branch 'develop' into handlersAbstraction
# Conflicts:
#	CI/linux/before_install.sh
#	CI/mac/before_install.sh
#	CI/mxe/before_install.sh
#	lib/CModHandler.cpp
#	lib/mapObjects/CObjectClassesHandler.cpp
#	lib/mapObjects/CObjectClassesHandler.h
#	lib/mapObjects/CommonConstructors.cpp
#	server/CGameHandler.cpp
#	test/CMakeLists.txt
#	test/spells/effects/TeleportTest.cpp
2021-07-16 00:32:13 +03:00
Andrey Filipenkov
7f3b06eb86 fix server crash on unexpected client disconnect 2021-03-20 17:12:56 +03:00
AlexVinS
483a4689ce Fixes for code review issues 2021-02-20 04:57:50 +03:00
AlexVinS
ecaa9f5d0b Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
Dmitry Orlov
3add3156e2 Fix: 'Restart Scenario' button should work properly 2021-01-20 21:29:50 +03:00
Dmitry Orlov
854a2e6c39 Feature: Mods system improvement, Part III. Bunusing buildings customization. 2021-01-14 01:02:13 +03:00
Andrii Danylchenko
3614330b3d moat bypass when no targets to attack 2020-12-02 19:40:24 +02:00
Andrii Danylchenko
4e359cd2a3 fix automatic towers when out of ammo 2020-12-02 08:38:31 +02:00
Dmitry Orlov
39de2f6435 Fix: Morale bonus should be shown correctly 2020-11-11 22:43:40 +03:00
Dmitry Orlov
b25baf66be Fix level up crashes: 1) Crash on double level up. 2) Crash on custom class level up. 2020-10-19 22:39:57 +03:00
Dmitry Orlov
934c4e511d Special buildings support : Patch 1 2020-10-15 15:03:01 +03:00
Dmitry Orlov
bf07cd0ad9 Mod system improvement Part I : Old saves support & MSVS build fix 2020-10-07 15:12:32 +03:00
Dmitry Orlov
f4816b0824 Mod system improvement Part I : Special buildings should work in the modders towns 2020-10-07 12:35:11 +03:00
Alexander Shishkin
124b2a7613
Merge pull request #655 from jambolo/bug/fix-0003143
Fixed lots of warnings.
2020-10-06 11:44:54 +03:00
xtouqh
0095db4a30 FreeBSD: need libexecinfo for backtrace() 2020-10-05 17:57:31 +03:00
John Bolton
a05ae78e67 Fixed lots of warnings.
Disabled the following (for MSVC only) that couldn't (or shouldn't) be fixed.

4003: not enough actual parameters for macro 'identifier'
4250: 'class1' : inherits 'class2::member' via dominance
4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
4275: non dll-interface class 'type1' used as base for dll-interface class 'type2'
2020-10-04 02:20:18 -07:00
John Bolton
6d8f1e4530 Fixed incorrect usage of const std::shared_ptr. Resolves 0003142.
Replaced const TBonusListPtr with TConstBonusListPtr where necessary
Replaced const std::shared_ptr<T> with std::shared_ptr<const T> where necessary.
Removed superfluous use of const.
Replaced const std::shared_ptr<T> with const std::shared_ptr<T> & in function parameters and ranged for-loops.
2020-09-30 22:56:28 -07:00
Dmitry Orlov
ae3b8e4916 Travis errors & warnings fix 2020-09-28 16:39:55 +03:00
Dmitry Orlov
38fd05f655 Minor fix: apply Monday bonuses to heroes who have slept overnight 2020-09-28 01:32:33 +03:00
Victor Luchits
febbeaeeed Close the global log targets on exit, flushing log files to disk 2020-05-05 15:25:07 +03:00
Toney Sui
dca5d86e7a
Fix bug: LandMine is not exploding to enemies. (#630)
* The reason is,

the mine has attribute hidden=true;
when enemy unit moves, the code in BattleInfo.cpp MoveUnit() (line 817) will update the revealed to true;
then in the CGameHandler.cpp handleDamageFromObstacle() (line 4846) is checking , and the condition battleIsObstacleVisibleForSide() will return true, so the effect will not be triggerred.

Resolution:
1. Remove the "revealed=true" in moveUnit(), and in handleDamageFromObstacle, remove the "const" restrict for obstacle, and then update revealed to true;
2. After the takeDamage function, add a pack "BattleObstaclesChanged" to update the obstacle to be "revealed=true".
2020-02-12 20:12:12 +03:00
krkos
ac81d0f7b4 Fix build with Boost versioni >= 1.70 (#615) 2020-01-21 11:55:28 +03:00
Dydzio
54550b50de Update VS files to 2019, partially fix test project 2019-06-09 17:28:55 +02:00
Dydzio
2f15ca9406 Do not build pseudo-buildings explicitly with events 2019-06-04 22:29:07 +02:00
Dydzio
e1b72ead6e Update CGameHandler.cpp
Fix hero recruit serverside check
2019-06-01 20:29:49 +03:00
AlexVinS
1f2ee843aa [C::B] Switched to boost shared linkage 2019-05-30 20:55:40 +03:00
Dydzio
f49bd3f18b
Do not display warning if player already lost 2019-05-28 22:34:55 +02:00
Ewilhan
ec4797d856 Fix Neutral Creatures Weekly Growth
Made it so neutral creatures could not be picked as "Flavour of the Week".
It is checking neutral creatures hometown to do so.

Fixes #3046.
2019-05-06 14:12:14 +01:00
Dydzio
97869fc36f Fixed single map victory crash 2019-03-29 22:01:51 +01:00
Michał Kalinowski
ec536e613c CMake more transitive
-Moving AIs cmake to target focusing code
-Beign explicit when link libraries
2019-03-28 16:56:51 +03:00
Dydzio
c310a05ee0 Allow learning secondary skills in ally towns 2019-03-25 02:21:32 +03:00
Dydzio
e1857df4bb Fix defense battle action logic (#563)
* Fix defense battle action logic
2019-03-25 02:16:47 +03:00
Alexander Shishkin
549d8c97df
Merge pull request #557 from dydzio0614/CrystalDragonAbility
Fix crystal dragon ability to match H3
2019-03-21 17:02:20 +03:00
Dydzio
53f4ba6464 Fix crystal dragon ability to match H3 2019-03-17 19:48:47 +01:00
Dydzio
36cb9f11c4 Hardcoded feature: no random week/month effects 2019-03-17 18:27:05 +01:00
AlexVinS
9311966706 [C::B] Switch to MinGW 7.3 2019-02-19 14:59:10 +03:00
Michał Kalinowski
a0d1808b62 CMake transitive compile dependency
Moving to more target focusing code that provides better transitive scope
2019-01-19 17:38:54 +03:00
Alexander Shishkin
b00e935e4d
Warnings fixes (#538)
Warnings fixes
* Suppress `missing-braces` for Clang
* Fixed many C4275 warnings
* Fixed almost all Clang/GCC warnings
* Silence most frequent MSVC warning.
* Fixed some pessimizing-move warnings
* Fixed some unused capture warnings
2019-01-19 13:52:02 +03:00
AlexVinS
da20aa2388 Use the same cost value in Pathfinder and fuzzy evaluations. 2019-01-17 10:54:41 +03:00
Dydzio
216d50788b Fix AI build, update default Windows SDK version for projects 2018-12-31 15:18:42 +01:00
Andrii Danylchenko
035d279ae8 Refactor CGHeroInstance, make spells private 2018-12-23 15:49:26 +03:00
Andrii Danylchenko
83531f4355 Rename typo in NetPacksServer.cpp 2018-11-17 21:58:54 +02:00
Andrii Danylchenko
9a36572446 Build boat in allied shipyards is allowed now 2018-11-17 21:58:54 +02:00
Dydzio
c3088e293a Workaround linker bug, set higher optimization by default 2018-11-17 11:34:39 +01:00
Andrii Danylchenko
6ac987794c AI: first rule extracted for pathfinder 2018-09-23 15:26:53 +03:00
KasyanDiGris
fa5a14e2d8 Stabilize vcmi (#488)
* Shared statusbar
* Fixed server fails on client disconnected
2018-08-26 19:09:56 +03:00
Konstantin Vukolov
96215233bc macOS: fix packet deserialization (#479) 2018-08-14 01:03:45 +03:00
Alexander Shishkin
84be667363
Merge pull request #463 from dydzio0614/skel_transformer_fix
Fix bone/ghost dragon handling in skeleton transformer
2018-07-19 00:03:32 +03:00
Dydzio
301b70ddd8 Fix bone/ghost dragon handling in skeleton transformer 2018-07-18 20:21:19 +02:00
Dydzio
d5d2c65c4b Fix counterattack wrong mechanics 2018-07-18 15:52:33 +02:00
Dydzio
260981d586 Update project files to match vcmi code changes 2018-07-06 18:52:51 +02:00
Andrii Danylchenko
dcbcff41dc apply review comments for CAndroidVMHelper 2018-05-26 14:50:49 +03:00
Andrii Danylchenko
ee033e9c9c fix android build 2018-05-25 22:57:29 +03:00
Karlis Senko
224ea28433 Fix various memory errors related to server and connections.
* keep connection when restarting scenario
* wrong double free in Connection
* multiple use after free when stopping server
* double free of StartInfo
2018-05-01 00:04:20 +03:00
Karlis Senko
40e6292ed2 Fix memory leaks in launcher. 2018-05-01 00:01:20 +03:00