1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-05-13 22:06:58 +02:00

34 Commits

Author SHA1 Message Date
Ivan Savenko
35644da2b7 Reogranize callback-related classes on 1 file = 1 class basis 2025-05-12 22:07:09 +03:00
Ivan Savenko
e567e1b820 Fix possible memory leaks in sound handler, simplify API 2025-04-29 12:11:10 +03:00
Ivan Savenko
4a6a8f9496
Merge pull request #5496 from IvanSavenko/std_thread
Replace boost::thread with std::thread
2025-03-08 16:03:55 +02:00
Ivan Savenko
9f713a0914 Rename int3::valid to isValid for consistency 2025-03-03 10:46:00 +00:00
Ivan Savenko
948abfb04c AI now uses std::thread, added custom thread interruption logic 2025-03-02 14:33:11 +00:00
Ivan Savenko
156de5b17e Added GameInstance class
- available as global GAME
- integrates LOCPLINT (CPlayerInterface)
- integrates CGI->mh (CMapHandler)
- integrates CSH (CServerHandler)
2025-02-21 16:54:06 +00:00
Ivan Savenko
ffd37a8fa8 Removed CGI in favor of VLC. Map handle is for now global variable 2025-02-21 16:53:14 +00:00
Ivan Savenko
f657e85305 Integrated CClientState into GameEngine class 2025-02-21 16:53:14 +00:00
Ivan Savenko
cacceda950 Renamed CGuiHandler to GameEngine
- class CGuiHandler is now called GameEngine to better describe its
functionality
- renamed global GH to more clear ENGINE
- GH/ENGINE is now unique_ptr to make construction / deconstruction
order more clear and to allow interface / implementation split
- CGuiHandler.cpp/h is now called GameEngine.cpp/h and located in root
directory of client dir
2025-02-21 16:53:13 +00:00
Ivan Savenko
08fbcd5239 TerrainTile now uses identifiers instead of pointers to VLC 2024-10-30 16:22:11 +00:00
Ivan Savenko
a8f8c3f4b1 Replaced most of accesses to CGObjectInstance::pos with anchorPoint() 2024-10-09 15:43:46 +00:00
Ivan Savenko
63bcf7d83c Replaced most of usages of CRandomGenerator with vstd::RNG in library 2024-07-16 13:13:07 +00:00
Ivan Savenko
3bea383b59 Merge branch 'vcmi/beta' into 'vcmi/develop' 2024-06-21 12:58:36 +00:00
Ivan Savenko
9c05e80315 Fix Admiral's Hat whirlpool immunity. Reduce usage of
convertFromVisitablePos
2024-06-11 14:31:11 +00:00
Ivan Savenko
df83fa33a1 Merge branch 'vcmi/master' into 'vcmi/develop' 2024-05-31 09:34:21 +00:00
Ivan Savenko
9bfe000724 Added semi-workaround method for network thread shutdown:
Currently closing game while network thread is waiting for something is
very bug-prone, since network thread may resume during shutdown and
access partially destroyed client state.

Now if exit has been requested, the very first step would be semi-
graceful shutdown of network thread (via exception throwing). This may
in theory skip some cleanup in non-RAII code, but since game is shutting
down this does not matters much.

This logic applies to:
- shutting down while network thread is waiting for dialogs
- shuttind down while network thread waiting for animations in combat
2024-05-18 11:04:10 +00:00
Ivan Savenko
d27b854cb1 Reorganized music, video and sound players:
- All XXXplayers are now in client/media directory
- Reogranized code on one class per file basis
- Extracted interfaces from handlers. Handlers now implement
corresponding interface.
- CCS now only stores pointer to an interface
2024-05-15 17:05:12 +00:00
Ivan Savenko
68bd54ae99 Fix server error messages on moving through garrisons 2024-05-02 18:05:57 +03:00
Ivan Savenko
6352f268b2 Instant movement is now part of standard movement 2024-04-20 14:20:54 +03:00
Ivan Savenko
d5a2ad1be8 Allow sending requests to move across multiple tiles at once 2024-04-20 12:28:50 +03:00
Ivan Savenko
49a28355a9 Send packs for all reachable parts of a path if movement set to instant 2024-04-20 12:28:50 +03:00
Ivan Savenko
2f1f68f89d Do not attempt to move if there are active dialogs 2024-04-13 16:57:21 +03:00
Ivan Savenko
a7c45d8ec8 Remove assert - confirmed to be legal scenario 2023-11-28 12:32:24 +02:00
Andrii Danylchenko
91c04f4718 #3006 - fix starting move from teleport 2023-11-04 15:43:08 +02:00
Ivan Savenko
b88a8da4e8 Split off some netpack structures into separate files 2023-10-23 13:59:15 +03:00
Ivan Savenko
c330998518 Fix freeze on moving through teleporters without set path 2023-09-27 17:17:06 +03:00
Ivan Savenko
f1c40466d3 Changes according to review 2023-09-18 18:17:26 +03:00
Ivan Savenko
b7de685483 Fixed paths through teleport, formatting cleanup 2023-09-16 20:35:04 +03:00
Ivan Savenko
f08028a158 Fixed moving through garrisons & teleporters 2023-09-16 20:07:26 +03:00
Ivan Savenko
2355aab139 Correctly end movement on battle start 2023-09-16 20:07:26 +03:00
Ivan Savenko
c8e6a7cd27 Fixed most common cases of movement actions 2023-09-16 20:07:26 +03:00
Ivan Savenko
0afc244934 Split massive methods into smaller chunks 2023-09-16 20:07:26 +03:00
Ivan Savenko
80b80a0ae6 Minor cleanup of hero movemen code 2023-09-16 20:07:26 +03:00
Ivan Savenko
347ce01dbe Moved hero movement logic to a new class from PlayerInterface 2023-09-16 20:07:26 +03:00