Skip to content

Commit 9c23efa

Browse files
authored
Merge pull request #820 from tiltedphoques/dev
v1.8.0
2 parents 683ec29 + 43252c7 commit 9c23efa

File tree

107 files changed

+1886
-427
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+1886
-427
lines changed

.github/workflows/linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Setup xmake
3434
uses: xmake-io/github-action-setup-xmake@v1
3535
with:
36-
xmake-version: '2.9.5'
36+
xmake-version: '2.9.8'
3737

3838
# Update xmake repository (in order to have the file that will be cached)
3939
- name: Update xmake repository

.github/workflows/windows-playable-build.yml

Lines changed: 29 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -9,97 +9,46 @@ on:
99
branches:
1010
- master
1111
tags:
12-
- 'v[0-9]+.[0-9]+.[0-9]+'
12+
- 'v[0-9]+\.[0-9]+\.[0-9]+'
1313

1414
jobs:
15-
build:
16-
strategy:
17-
matrix:
18-
os: [windows-latest]
19-
arch: [x64]
20-
mode: [release]
21-
22-
runs-on: ${{ matrix.os }}
23-
15+
build-windows:
16+
if: ${{ github.repository_owner == 'tiltedphoques' || github.event_name != 'schedule' }} # Disable cron runs in forks
17+
uses: ./.github/workflows/windows.yml
18+
with:
19+
build-mode: 'release'
20+
upload-build-for-next-job: true
21+
22+
package-and-upload:
23+
runs-on: windows-latest
24+
needs: build-windows
2425
steps:
25-
- uses: actions/checkout@v4
26+
- name: Download artifact from the previous job
27+
uses: actions/download-artifact@v5
2628
with:
27-
# We need full history in order to create a build version string (BuildInfo.h)
28-
fetch-depth: 0
29+
name: internal-job-files
2930

30-
- name: Checkout submodules
31-
run: |
32-
git submodule sync --recursive
33-
git submodule update --init --force --recursive --depth=1
34-
35-
- name: Checkout master on tag push
36-
if: github.ref_type == 'tag'
37-
# Checkout only if the tag was pushed to master
38-
run: (git rev-parse HEAD) -eq (git rev-parse origin/master) -and (git checkout master)
39-
40-
- name: Cache xmake dependencies
41-
uses: actions/cache@v4
42-
with:
43-
path: ~/AppData/Local/.xmake/packages
44-
key: ${{ runner.os }}-xmake-${{ hashFiles('**/xmake.lua') }}
45-
46-
# Install xmake
47-
- name: Setup xmake
48-
uses: xmake-io/github-action-setup-xmake@v1
49-
with:
50-
xmake-version: 2.9.5
51-
actions-cache-folder: '.xmake-cache' # This doesn't cache dependencies, only xmake itself
52-
actions-cache-key: ${{ matrix.os }}
53-
54-
- name: Configure xmake and install dependencies
55-
run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --yes -vD
56-
57-
# Build the game
58-
- name: Build with xmake
59-
run: xmake -y
60-
61-
# Create distrib
62-
- name: Output STR binaries via xmake
63-
run: xmake install -o distrib
64-
65-
# Building the Together UI
66-
- name: Setup pnpm
67-
uses: pnpm/action-setup@v4
68-
with:
69-
version: 9
70-
71-
- name: Setup Node
72-
uses: actions/setup-node@v4
73-
with:
74-
node-version: lts/iron
75-
cache-dependency-path: Code/skyrim_ui/pnpm-lock.yaml
76-
cache: 'pnpm'
77-
78-
- name: Build the UI
79-
run: |
80-
pnpm --prefix Code/skyrim_ui/ install
81-
pnpm --prefix Code/skyrim_ui/ deploy:production
82-
83-
# Package everything, organize directories
84-
85-
- name: Package binaries and assets
31+
- name: Package build and organize directories
8632
run: |
8733
mkdir -p str-build/SkyrimTogetherReborn
88-
mv build/windows/${{ matrix.arch }}/${{ matrix.mode }}/* str-build/SkyrimTogetherReborn
89-
cp -Force -Recurse distrib/bin/* str-build/SkyrimTogetherReborn
90-
cp -r Code/skyrim_ui/dist/UI str-build/SkyrimTogetherReborn
34+
mv build/windows/x64/release/* str-build/SkyrimTogetherReborn
9135
cp -r GameFiles/Skyrim/* str-build/
9236
93-
- name: Remove unnecessary build files
94-
run: rm str-build/SkyrimTogetherReborn/*.pdb, str-build/SkyrimTogetherReborn/*.lib
95-
96-
# Upload artifact
97-
98-
- name: Store version string
99-
run: echo "STR_VERSION=$(git describe --tags)" >> $env:GITHUB_ENV
37+
- name: Remove unnecessary build files, keep .pdb
38+
run: |
39+
mkdir str-pdb
40+
mv str-build/SkyrimTogetherReborn/SkyrimTogether.pdb, str-build/SkyrimTogetherReborn/SkyrimTogetherServer.pdb str-pdb
41+
rm str-build/SkyrimTogetherReborn/*.pdb, str-build/SkyrimTogetherReborn/*.lib, str-build/SkyrimTogetherReborn/*.exp
42+
rm str-build/SkyrimTogetherReborn/*Tests.exe
10043
10144
- name: Upload playable build
10245
uses: actions/upload-artifact@v4
10346
with:
104-
name: Skyrim Together Build (${{ env.STR_VERSION }})
47+
name: Skyrim Together Build (${{ needs.build-windows.outputs.str-version }})
10548
path: str-build/
49+
50+
- name: Upload debug symbols
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: Debug Symbols (${{ needs.build-windows.outputs.str-version }})
54+
path: str-pdb/

.github/workflows/windows.yml

Lines changed: 94 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -5,80 +5,109 @@ on:
55
push:
66
branches:
77
- master
8-
- bluedove
98
- prerel
9+
workflow_call:
10+
inputs:
11+
build-mode:
12+
required: true
13+
type: string
14+
default: 'releasedbg'
15+
upload-build-for-next-job:
16+
required: true
17+
type: boolean
18+
default: false
19+
outputs:
20+
str-version:
21+
description: "Skyrim Together version string"
22+
value: ${{ jobs.build.outputs.version }}
23+
1024
jobs:
1125
build:
1226
strategy:
1327
matrix:
1428
os: [windows-latest]
1529
arch: [x64]
16-
mode: [releasedbg]
1730

1831
runs-on: ${{ matrix.os }}
1932
if: "!contains(github.event.head_commit.message, 'ci skip')"
2033

34+
outputs:
35+
version: ${{ steps.output-version.outputs.version }}
36+
2137
steps:
22-
- uses: actions/checkout@v2
23-
24-
- name: Checkout submodules
25-
run: |
26-
git submodule sync --recursive
27-
git submodule update --init --force --recursive --depth=1
28-
29-
# Install xmake
30-
- name: Setup xmake
31-
uses: xmake-io/github-action-setup-xmake@v1
32-
with:
33-
xmake-version: '2.9.5'
34-
35-
# Install node
36-
#- name: Setup nodejs
37-
# uses: actions/setup-node@v2
38-
# with:
39-
# cache: npm
40-
# node-version: 16
41-
42-
#- name: Update xmake repository
43-
# run: xmake.exe repo --update
44-
45-
#- name: Cache dependencies
46-
# uses: actions/cache@v2
47-
# with:
48-
# path: C:\Users\runneradmin\AppData\Local\.xmake\packages
49-
# key: v2-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.mode }}-${{ hashFiles('xmake.lua') }}-${{ hashFiles('C:\Users\runneradmin\AppData\Local\.xmake\xmake.conf') }}-${{ hashFiles('C:\Users\runneradmin\AppData\Local\.xmake\repositories\**') }}
50-
51-
#- name: Prepare npm
52-
# run: npm install @semantic-release/github @semantic-release/exec conventional-changelog-conventionalcommits
53-
54-
# Delete old releases
55-
#- name: Remove old releases
56-
# uses: dev-drprasad/[email protected]
57-
# with:
58-
# keep_latest: 1
59-
# delete_tags: true
60-
# env:
61-
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
62-
63-
# Release version
64-
#- name: Release version
65-
# run: npx semantic-release
66-
# env:
67-
# GH_TOKEN: ${{ secrets.GH_TOKEN }}
68-
69-
- name: Configure xmake and install dependencies
70-
run: xmake.exe config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --yes --vs_sdkver=10.0.19041.0 -vD
71-
72-
# Build the game
73-
- name: Build with xmake
74-
run: xmake.exe
75-
76-
# Create install
77-
#- name: Bundle package
78-
# run: xmake.exe install -o packaged
79-
80-
# Upload artifacts
81-
#- uses: actions/upload-artifact@v2
82-
# with:
83-
# name: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.mode }}
84-
# path: packaged/bin/**
38+
- uses: actions/checkout@v4
39+
with:
40+
# We need full history in order to create a version string (BuildInfo.h)
41+
fetch-depth: 0
42+
43+
- name: Checkout submodules
44+
run: |
45+
git submodule sync --recursive
46+
git submodule update --init --force --recursive --depth=1
47+
48+
- name: Checkout master on tag push
49+
if: github.ref_type == 'tag'
50+
# Checkout only if the tag was pushed to master
51+
run: (git rev-parse HEAD) -eq (git rev-parse origin/master) -and (git checkout master)
52+
53+
- name: Cache xmake dependencies
54+
uses: actions/cache@v4
55+
with:
56+
path: ~/AppData/Local/.xmake/packages
57+
key: ${{ runner.os }}-xmake-${{ hashFiles('**/xmake.lua') }}
58+
59+
# Install xmake
60+
- name: Setup xmake
61+
uses: xmake-io/github-action-setup-xmake@v1
62+
with:
63+
xmake-version: 2.9.8
64+
actions-cache-folder: '.xmake-cache' # This doesn't cache dependencies, only xmake itself
65+
actions-cache-key: ${{ matrix.os }}
66+
67+
- name: Configure xmake and install dependencies
68+
run: xmake config --arch=${{ matrix.arch }} --mode=${{ inputs.build-mode }} --yes -vD
69+
70+
# Build the client
71+
- name: Build with xmake
72+
run: |
73+
xmake -y
74+
echo "STR_BUILD_DIR=build/windows/${{ matrix.arch }}/${{ inputs.build-mode }}/" >> $env:GITHUB_ENV
75+
76+
# Create distrib
77+
- name: Output distrib binaries via xmake
78+
run: |
79+
xmake install -o distrib
80+
cp -Force -Recurse distrib/bin/* ${{ env.STR_BUILD_DIR }}
81+
82+
# Building the Together UI
83+
84+
- name: Setup pnpm
85+
uses: pnpm/action-setup@v4
86+
with:
87+
version: 9
88+
89+
- name: Setup Node
90+
uses: actions/setup-node@v4
91+
with:
92+
node-version: lts/iron
93+
cache-dependency-path: Code/skyrim_ui/pnpm-lock.yaml
94+
cache: 'pnpm'
95+
96+
- name: Build the UI
97+
run: |
98+
pnpm --prefix Code/skyrim_ui/ install
99+
pnpm --prefix Code/skyrim_ui/ deploy:production
100+
cp -r Code/skyrim_ui/dist/UI ${{ env.STR_BUILD_DIR }}
101+
102+
- id: output-version
103+
run: echo "version=$(git describe --tags)" >> $env:GITHUB_OUTPUT
104+
105+
- name: Upload build files for the next job
106+
if: ${{ inputs.upload-build-for-next-job }}
107+
uses: actions/upload-artifact@v4
108+
with:
109+
name: internal-job-files
110+
retention-days: 1
111+
path: |
112+
${{ env.STR_BUILD_DIR }}
113+
GameFiles/Skyrim/

Code/client/Components.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#include <Components/LocalAnimationComponent.h>
77
#include <Components/RemoteAnimationComponent.h>
8+
#include <Components/EarlyAnimationBufferComponent.h>
9+
#include <Components/ReplayedActionsDebugComponent.h>
810
#include <Components/FormIdComponent.h>
911
#include <Components/InterpolationComponent.h>
1012
#include <Components/WaitingForAssignmentComponent.h>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#pragma once
2+
3+
#ifndef TP_INTERNAL_COMPONENTS_GUARD
4+
#error Include Components.h instead
5+
#endif
6+
7+
#include <Structs/ActionEvent.h>
8+
9+
/**
10+
* @brief `LocalAnimationComponent` is typically added several frames after the Actor
11+
* has been spawned, causing some of the earliest actions to be missed and not sent
12+
* over the network. `EarlyAnimationBufferComponent` takes care of this.
13+
*/
14+
struct EarlyAnimationBufferComponent
15+
{
16+
Vector<ActionEvent> Actions{};
17+
};

Code/client/Components/RemoteAnimationComponent.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ struct RemoteAnimationComponent
99
List<ActionEvent> TimePoints;
1010
ActionEvent LastRanAction;
1111
ActionEvent LastProcessedAction;
12+
uint32_t ReplayCount;
13+
bool ResetAnimationGraphForReplay{false};
1214
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#pragma once
2+
3+
#ifndef TP_INTERNAL_COMPONENTS_GUARD
4+
#error Include Components.h instead
5+
#endif
6+
7+
#include <Structs/ActionReplayChain.h>
8+
9+
/**
10+
* @brief Used for in-game animation debugging purposes. Makes it easier
11+
* to see which actions were replayed on a particular Actor.
12+
*
13+
* @see ComponentView
14+
*/
15+
struct ReplayedActionsDebugComponent
16+
{
17+
ActionReplayChain ActionsReceivedForReplay;
18+
};

Code/client/Games/Animation.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ uint8_t TP_MAKE_THISCALL(HookPerformAction, ActorMediator, TESActionData* apActi
5252

5353
// Save for later
5454
if (res)
55+
{
5556
pExtension->LatestAnimation = action;
57+
}
5658

5759
World::Get().GetRunner().Trigger(action);
5860

@@ -112,7 +114,7 @@ bool ActorMediator::ForceAction(TESActionData* apAction) noexcept
112114
uint8_t result = 0;
113115

114116
auto pActor = static_cast<Actor*>(apAction->actor);
115-
if (!pActor || pActor->animationGraphHolder.IsReady())
117+
if (pActor)
116118
{
117119
result = TiltedPhoques::ThisCall(PerformComplexAction, this, apAction);
118120

Code/client/Games/Animation/IAnimationGraphManagerHolder.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ struct IAnimationGraphManagerHolder
2929
virtual bool GetVariableBool(BSFixedString* apVariable, bool* apReturn);
3030

3131
bool SetVariableFloat(BSFixedString* apVariable, float aValue);
32+
bool SetVariableInt(BSFixedString* apVariable, int32_t aValue);
33+
bool SetVariableBool(BSFixedString* apVariable, bool aValue);
3234
bool IsReady();
35+
bool RevertAnimationGraphManager();
3336

3437
bool ReSendAnimationEvent(BSFixedString* apAnimEvent);
3538
};

0 commit comments

Comments
 (0)