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

920 Commits

Author SHA1 Message Date
Ivan Savenko
ffe14fc1fc
Merge pull request #4022 from vcmi/master
Merge master -> beta
2024-05-20 18:09:51 +03: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
cba49a9952 Fix gcc-14 build 2024-05-17 10:10:06 +00:00
Ivan Savenko
8fa615a8f7 Fix possible crash on AI attempting to build building in town 2024-04-28 12:53:10 +03:00
Ivan Savenko
62d15ed23c
Merge pull request #3820 from IvanSavenko/bugfixing
Bugfixing
2024-04-23 13:03:36 +03:00
Ivan Savenko
1b6d6c3f5e Disable broken visitation of external markets for VCAI 2024-04-22 15:46:51 +03:00
Ivan Savenko
a6dead7725 Fixed loading of text strings for hota quests 2024-04-22 13:49:17 +03:00
Ivan Savenko
a46e022421 Fixed format string 2024-04-22 13:48:56 +03:00
Ivan Savenko
438ec08d72 AI will only ignore garrisons in 'Steadwick Fall' mission (H3 logic) 2024-04-22 11:14:58 +03:00
Ivan Savenko
21dff9413e
Merge pull request #3786 from IvanSavenko/instant_movement
Instant movement
2024-04-22 11:08:00 +03:00
Ivan Savenko
d5a2ad1be8 Allow sending requests to move across multiple tiles at once 2024-04-20 12:28:50 +03:00
Dydzio
19453aab41 Add handling for yes/no dialogs that can be safely skipped by player 2024-04-17 01:08:27 +02:00
Ivan Savenko
03786fb63b VCAI will now check whether it actually has enough gold to buy a hero 2024-04-06 15:59:08 +03:00
Andrii Danylchenko
ca7c91e766
Merge pull request #3677 from vcmi/object-graph
Object graph
2024-03-29 20:39:56 +02:00
Evgeny Malygin
25125f96da
Fix: licenses, pragma guards, StdInc 2024-03-29 07:48:52 +02:00
Andrii Danylchenko
017fb204a1 NKAI: remove 5th dimension 2024-03-24 09:32:54 +02:00
Ivan Savenko
c23953eac5 Remove custom casts 2024-02-14 12:56:37 +02:00
Ivan Savenko
45c971a405 Replace throws() with nothrow 2024-02-14 12:07:07 +02:00
Ivan Savenko
9ebd194ab1
Merge pull request #3609 from IvanSavenko/single_process
Allow running server as part of client process
2024-02-14 12:06:22 +02:00
Alexander Wilms
678cacbd25 Remove more redundant virtual specifiers
`grep -nr "virtual " | grep -v googletest | grep " override" | grep -v overriden > ../redundant_virtual.txt`

```python
import os

with open("../redundant_virtual.txt") as f:
    for line in f:
        print()
        line: str = line.strip()
        print(line)
        tmp = line.split(":",2)
        file = tmp[0].strip()
        code = tmp[-1].strip()
        print(file)
        print(code)
        new_code = code.replace("virtual ", "", 1)
        # https://superuser.com/a/802490/578501
        command = f"export FIND='{code}' && export REPLACE='{new_code}' && ruby -p -i -e \"gsub(ENV['FIND'], ENV['REPLACE'])\" {file}"
        os.system(command)
```
2024-02-13 15:21:30 +01:00
Ivan Savenko
4c70abbeb5 Reduced usage of global variables - removed or made const / constexpr 2024-02-12 13:49:45 +02:00
Ivan Savenko
c03196257f Fix "identical expressions on both sides of comparison" 2024-02-12 12:32:35 +02:00
Ivan Savenko
a909d7ddde Removed cmake_modules/VCMI_lib macro, use it directly in place 2024-02-11 20:38:24 +02:00
Ivan Savenko
f08c9f4d59 Renamed ENABLE_STATIC_AI_LIBS option to match its actual effect 2024-02-11 17:55:02 +02:00
Alexander Wilms
522cb571b3 Remove redundant virtual specifiers
`grep -nr virtual | grep -v googletest | grep override > ../redundant_virtual.txt`

```python
import os

with open("../redundant_virtual.txt") as f:
    for line in f:
        print()
        line: str = line.strip()
        print(line)
        tmp = line.split(":")
        file = tmp[0].strip()
        code = tmp[-1].strip()
        print(file)
        print(code)
        new_code = code.replace("virtual ", "", 1)
        # https://superuser.com/a/802490/578501
        command = f"export FIND='{code}' && export REPLACE='{new_code}' && ruby -p -i -e \"gsub(ENV['FIND'], ENV['REPLACE'])\" {file}"
        os.system(command)
```
2024-02-10 20:46:13 +01:00
Ivan Savenko
f329bfbe71
Merge pull request #3582 from IvanSavenko/campaign_fixes
Campaign fixes
2024-02-01 11:30:38 +02:00
Ivan Savenko
626087ab14
Merge pull request #3561 from MnHebi/develop
Try to improve VCAI building build order
2024-01-31 21:48:36 +02:00
Ivan Savenko
2e4895766a Implemented tracking of objects destroyed by players 2024-01-31 01:37:33 +02:00
MnHebi
8b24b0e9a7 Add Marketplace, Blacksmith into extra buildings category to ensure they get built. Misc changes. 2024-01-26 00:56:36 +02:00
Laserlicht
7f58333ef9
quick combat vs ai 2024-01-25 23:44:41 +01:00
MnHebi
a668dc2721 Try to improve VCAI building build order. Testing reveals extra structures still get done before intended build order(seen Market being built when Dwellings were expected). 2024-01-25 03:26:42 +02:00
Ivan Savenko
0c07384293 Refactoring of serialization versioning handling
- Removed 'version' field from serialize() method
- Handler classes - Binary(De)Serializer now have 'version' field
- Serialization versioning now uses named enum

Save compatibility with 1.4.X saves should be intact
2024-01-20 20:34:51 +02:00
Ivan Savenko
a15366f5a5 Make IObjectInterface::cb non-static 2024-01-19 13:55:21 +02:00
Ivan Savenko
2c4cad7d9c Slight simplification of bonus system node class 2024-01-19 13:54:49 +02:00
Ivan Savenko
bd5682ecc3 Merge remote-tracking branch 'vcmi/master' into develop 2024-01-19 13:49:54 +02:00
Alexander Wilms
cca08e29da Remove duplicate semicolons 2024-01-16 19:02:39 +00:00
Ivan Savenko
a582cb554e
Merge pull request #3500 from IvanSavenko/fix_dendroid_bind
[1.4.3] Fix handling of Dendroid's Bind ability
2024-01-15 12:02:06 +02:00
Ivan Savenko
0d0d3d8c80 Renamed speed -> getMovementRange, remove misleading default parameter 2024-01-14 17:14:36 +02:00
Alexander Wilms
bc781c28e0 Remove trailing semicolon from NET_EVENT_HANDLER macro 2024-01-14 14:49:25 +00:00
Ivan Savenko
8303ce5d13 Added option to ignore guards in pathfinder
Used for simturns contact detection, by default disabled for player
pathfinding
2024-01-13 19:44:37 +02:00
Alexander Wilms
f3277b7953 Define each identifier in a dedicated statement 2024-01-10 00:22:23 +00:00
Joakim Thorén
406d136cdc Fixes warnings about possibly dangling references 2023-12-27 22:24:58 +01:00
Ivan Savenko
9f906ff1d2 Remove pointer to CGObjectInstance from map header 2023-11-17 16:39:15 +02:00
Ivan Savenko
52050d0ef1 Fix build 2023-11-15 15:55:19 +02:00
Ivan Savenko
96c81be68e Win/loss conditions now use VariantIdentifier. Removed non-implemented
options
2023-11-15 15:55:19 +02:00
Ivan Savenko
4a7fa9bf8c Simplified CTypeList class 2023-11-08 22:05:36 +02:00
Ivan Savenko
6b81012f31 Use variant identifier in netpacks where applicable 2023-11-08 14:00:23 +02:00
Ivan Savenko
8346d71c98 Remove more subID access 2023-11-01 14:44:05 +02:00
Ivan Savenko
7107b3202f
Merge pull request #3069 from SoundSSGood/artifact-location-id
ArtifactLocation now use ID for artHolder identification
2023-11-01 14:41:36 +02:00
SoundSSGood
ab2f6abb87 ArtifactLocation now use ID for artHolder identification part2 2023-10-29 17:46:13 +02:00