mirror of
https://github.com/roflmuffin/CounterStrikeSharp.git
synced 2025-12-06 08:03:12 -08:00
Compare commits
126 Commits
build-numb
...
v1.0.343
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9eefe9c61a | ||
|
|
7be329466a | ||
|
|
a21f0b5277 | ||
|
|
b4ba7d8ca0 | ||
|
|
0eb73eb348 | ||
|
|
43c1c89596 | ||
|
|
53996666f8 | ||
|
|
a8510d183d | ||
|
|
a52f5e737d | ||
|
|
34598dd56e | ||
|
|
325728e753 | ||
|
|
56e007402b | ||
|
|
bf75d43039 | ||
|
|
7572722de4 | ||
|
|
638d74470e | ||
|
|
37951f2875 | ||
|
|
7b9df9097c | ||
|
|
31cedca2b7 | ||
|
|
4869acac41 | ||
|
|
2c80971393 | ||
|
|
44922da680 | ||
|
|
1ca8ff2172 | ||
|
|
99f7f37b10 | ||
|
|
54f8d5ef95 | ||
|
|
a7443b2a60 | ||
|
|
72d66cb5d5 | ||
|
|
adccc4b9e9 | ||
|
|
fc7301a8d3 | ||
|
|
ef4b8f9442 | ||
|
|
245f55daf3 | ||
|
|
936b88d57c | ||
|
|
ee792de1a0 | ||
|
|
624ca0f0de | ||
|
|
592acc28aa | ||
|
|
51b6b45390 | ||
|
|
d5fad8d801 | ||
|
|
bf1ce2e8a3 | ||
|
|
0761d267ba | ||
|
|
92959dea6e | ||
|
|
f7c69a60be | ||
|
|
6f796d9ae9 | ||
|
|
1f9c7a090b | ||
|
|
2cf2d45e8e | ||
|
|
fa383cda68 | ||
|
|
e1acada35e | ||
|
|
dc503e7f57 | ||
|
|
fedfe75601 | ||
|
|
3508fdfd8c | ||
|
|
741d6a3fc8 | ||
|
|
356152a567 | ||
|
|
31e12ba809 | ||
|
|
529a0cbf5b | ||
|
|
ed7c28f9e3 | ||
|
|
1f30e5619f | ||
|
|
af3bb528d7 | ||
|
|
b7abd1d59e | ||
|
|
dd50221321 | ||
|
|
9491732a38 | ||
|
|
6c9321e3e7 | ||
|
|
6acfa1491a | ||
|
|
ad8116d4d2 | ||
|
|
26a8f641c8 | ||
|
|
f08b5e8439 | ||
|
|
6e27a67917 | ||
|
|
a8eff60d0b | ||
|
|
89fc5aeaf9 | ||
|
|
ffb274d636 | ||
|
|
b5303d15ab | ||
|
|
1a521ec3bb | ||
|
|
ec61ad37f0 | ||
|
|
260015d765 | ||
|
|
d346a02f98 | ||
|
|
8ab61b00e8 | ||
|
|
c746c4e2e7 | ||
|
|
32d3e18657 | ||
|
|
d5fa42cb50 | ||
|
|
22809e3ec6 | ||
|
|
87d197309b | ||
|
|
e6bfb7939d | ||
|
|
0ae9227d73 | ||
|
|
7285d29454 | ||
|
|
124ffac7a9 | ||
|
|
267b017787 | ||
|
|
018bcba655 | ||
|
|
011401adb9 | ||
|
|
bebeedf272 | ||
|
|
7af153cf25 | ||
|
|
6f663164ee | ||
|
|
22f5c06c49 | ||
|
|
073728b4ce | ||
|
|
6511a0098a | ||
|
|
f50fb783bb | ||
|
|
49e8ab0e27 | ||
|
|
4be0634625 | ||
|
|
7025b62615 | ||
|
|
462ca52229 | ||
|
|
d7e23e8282 | ||
|
|
3ddfa71e3f | ||
|
|
688b226bcf | ||
|
|
0d23387347 | ||
|
|
68e6ffaebe | ||
|
|
2f8f370cd3 | ||
|
|
169d43e31d | ||
|
|
0ce4a2903c | ||
|
|
33b46eb214 | ||
|
|
a27ba3b005 | ||
|
|
57286c9990 | ||
|
|
ae808c05c8 | ||
|
|
c9f8e477d3 | ||
|
|
2398ba0a5d | ||
|
|
e45c20481d | ||
|
|
fe321ee93d | ||
|
|
be19103556 | ||
|
|
64cb26b86d | ||
|
|
637224dc55 | ||
|
|
3aca7c37f1 | ||
|
|
87f38d72ee | ||
|
|
5daf94791f | ||
|
|
c50213c442 | ||
|
|
c02d31cb2e | ||
|
|
98cbca44d4 | ||
|
|
4cf88fc03e | ||
|
|
f1dff6d4d3 | ||
|
|
414a59a36d | ||
|
|
f1c108087b | ||
|
|
47ddf42c11 |
@@ -38,7 +38,7 @@ BraceWrapping:
|
||||
SplitEmptyNamespace: true
|
||||
|
||||
PointerAlignment: Left
|
||||
SortIncludes: CaseSensitive
|
||||
SortIncludes: Never
|
||||
IncludeBlocks: Regroup
|
||||
IncludeCategories:
|
||||
# External headers in <> with extension or /
|
||||
|
||||
@@ -1,11 +1,21 @@
|
||||
{
|
||||
"name": "SteamRT Sniper SDK",
|
||||
"image": "registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest",
|
||||
"customizations": {
|
||||
"updateContentCommand": "git submodule update --init --recursive",
|
||||
"postCreateCommand": "cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -G Ninja && cmake --build build -j$(nproc)",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-vscode.cpptools"
|
||||
"ms-dotnettools.csdevkit",
|
||||
"ms-vscode.cpptools",
|
||||
"ms-vscode.cpptools-extension-pack",
|
||||
"GitHub.copilot",
|
||||
"jeff-hykin.better-cpp-syntax"
|
||||
]
|
||||
}
|
||||
},
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/dotnet": "8.0",
|
||||
"ghcr.io/devcontainers/features/node": "lts"
|
||||
}
|
||||
}
|
||||
@@ -1,30 +1,45 @@
|
||||
name: Build & Publish
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
|
||||
# Remove default permissions of GITHUB_TOKEN for security
|
||||
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
|
||||
permissions: {}
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- "docfx/**"
|
||||
branches: ["main", "dev"]
|
||||
branches: ["main"]
|
||||
tags:
|
||||
- "v*"
|
||||
pull_request:
|
||||
branches: ["main", "dev"]
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
branches: ["main"]
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
permissions:
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
buildnumber: ${{ steps.buildnumber.outputs.build_number }}
|
||||
gitversion_semver: ${{ steps.gitversion.outputs.semVer }}
|
||||
gitversion_fullsemver: ${{ steps.gitversion.outputs.fullSemVer }}
|
||||
gitversion_assemblysemver: ${{ steps.gitversion.outputs.assemblySemVer }}
|
||||
gitversion_informationalversion: ${{ steps.gitversion.outputs.informationalVersion }}
|
||||
steps:
|
||||
- name: Generate build number
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
id: buildnumber
|
||||
uses: onyxmueller/build-tag-number@v1
|
||||
with:
|
||||
token: ${{secrets.github_token}}
|
||||
- name: Install GitVersion
|
||||
uses: gittools/actions/gitversion/setup@v1
|
||||
with:
|
||||
versionSpec: 6.0.x
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Execute GitVersion
|
||||
id: gitversion
|
||||
uses: gittools/actions/gitversion/execute@v1
|
||||
with:
|
||||
useConfigFile: true
|
||||
|
||||
build_windows:
|
||||
needs: setup
|
||||
@@ -32,16 +47,9 @@ jobs:
|
||||
steps:
|
||||
- name: Prepare env
|
||||
shell: bash
|
||||
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
||||
|
||||
- name: Fallback build number
|
||||
if: ${{ github.event_name == 'pull_request' || github.ref != 'refs/heads/main' }}
|
||||
shell: bash
|
||||
run: echo "BUILD_NUMBER=0" >> $GITHUB_ENV
|
||||
|
||||
- name: Main build number
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
run: echo "BUILD_NUMBER=${{ needs.setup.outputs.buildnumber }}" >> $GITHUB_ENV
|
||||
run: |
|
||||
echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
||||
echo "SEMVER=${{ needs.setup.outputs.gitversion_semver }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Visual Studio environment
|
||||
shell: cmd
|
||||
@@ -56,7 +64,7 @@ jobs:
|
||||
echo>>"%GITHUB_ENV%" %%a=%%b
|
||||
)
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: "recursive"
|
||||
|
||||
@@ -76,7 +84,7 @@ jobs:
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: counterstrikesharp-build-windows-${{ env.GITHUB_SHA_SHORT }}
|
||||
name: counterstrikesharp-windows-${{ needs.setup.outputs.gitversion_semver }}
|
||||
path: build/output/
|
||||
|
||||
build_linux:
|
||||
@@ -88,18 +96,11 @@ jobs:
|
||||
steps:
|
||||
- name: Prepare env
|
||||
shell: bash
|
||||
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
||||
run: |
|
||||
echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
||||
echo "SEMVER=${{ needs.setup.outputs.gitversion_semver }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Fallback build number
|
||||
if: ${{ github.event_name == 'pull_request' || github.ref != 'refs/heads/main' }}
|
||||
shell: bash
|
||||
run: echo "BUILD_NUMBER=0" >> $GITHUB_ENV
|
||||
|
||||
- name: Main build number
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
run: echo "BUILD_NUMBER=${{ needs.setup.outputs.buildnumber }}" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: "recursive"
|
||||
|
||||
@@ -117,7 +118,7 @@ jobs:
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: counterstrikesharp-build-linux-${{ env.GITHUB_SHA_SHORT }}
|
||||
name: counterstrikesharp-linux-${{ needs.setup.outputs.gitversion_semver }}
|
||||
path: build/output/
|
||||
|
||||
build_managed:
|
||||
@@ -130,20 +131,11 @@ jobs:
|
||||
shell: bash
|
||||
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
||||
|
||||
- name: Fallback build number
|
||||
if: ${{ github.event_name == 'pull_request' || github.ref != 'refs/heads/main' }}
|
||||
shell: bash
|
||||
run: echo "BUILD_NUMBER=0" >> $GITHUB_ENV
|
||||
|
||||
- name: Main build number
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
run: echo "BUILD_NUMBER=${{ needs.setup.outputs.buildnumber }}" >> $GITHUB_ENV
|
||||
|
||||
# We don't need expensive submodules for the managed side.
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build runtime v${{ env.BUILD_NUMBER }}
|
||||
uses: actions/setup-dotnet@v3
|
||||
- name: Build runtime v${{ needs.setup.outputs.gitversion_semver }}
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: "8.0.x"
|
||||
|
||||
@@ -151,27 +143,36 @@ jobs:
|
||||
run: dotnet restore managed/CounterStrikeSharp.sln
|
||||
|
||||
- name: Run tests
|
||||
run: dotnet test --logger trx --results-directory "TestResults-${{ env.GITHUB_SHA_SHORT }}" managed/CounterStrikeSharp.API.Tests/CounterStrikeSharp.API.Tests.csproj
|
||||
run: dotnet test --logger trx --results-directory "TestResults-${{ needs.setup.outputs.gitversion_semver }}" managed/CounterStrikeSharp.API.Tests/CounterStrikeSharp.API.Tests.csproj
|
||||
|
||||
- name: Upload dotnet test results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-results-${{ env.GITHUB_SHA_SHORT }}
|
||||
path: TestResults-${{ env.GITHUB_SHA_SHORT }}
|
||||
name: test-results-${{ needs.setup.outputs.gitversion_semver }}
|
||||
path: TestResults-${{ needs.setup.outputs.gitversion_semver }}
|
||||
if: ${{ always() }}
|
||||
|
||||
- name: Publish artifacts
|
||||
run: |
|
||||
dotnet publish -c Release /p:Version=1.0.${{ env.BUILD_NUMBER }} managed/CounterStrikeSharp.API
|
||||
dotnet pack -c Release /p:Version=1.0.${{ env.BUILD_NUMBER }} managed/CounterStrikeSharp.API
|
||||
dotnet publish -c Release \
|
||||
/p:Version=${{ needs.setup.outputs.gitversion_semver }} \
|
||||
/p:AssemblyVersion=${{ needs.setup.outputs.gitversion_assemblySemver }} \
|
||||
/p:InformationalVersion=${{ needs.setup.outputs.gitversion_informationalversion }} \
|
||||
managed/CounterStrikeSharp.API
|
||||
|
||||
dotnet pack -c Release \
|
||||
/p:Version=${{ needs.setup.outputs.gitversion_semver }} \
|
||||
/p:AssemblyVersion=${{ needs.setup.outputs.gitversion_assemblySemver }} \
|
||||
/p:InformationalVersion=${{ needs.setup.outputs.gitversion_informationalversion }} \
|
||||
managed/CounterStrikeSharp.API
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: counterstrikesharp-build-api-${{ env.GITHUB_SHA_SHORT }}
|
||||
name: counterstrikesharp-api-${{ needs.setup.outputs.gitversion_semver }}
|
||||
path: managed/CounterStrikeSharp.API/bin/Release
|
||||
|
||||
publish:
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'roflmuffin/CounterStrikeSharp' }}
|
||||
permissions:
|
||||
contents: write
|
||||
needs: ["setup", "build_linux", "build_windows", "build_managed"]
|
||||
@@ -181,19 +182,24 @@ jobs:
|
||||
shell: bash
|
||||
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: counterstrikesharp-build-windows-${{ env.GITHUB_SHA_SHORT }}
|
||||
name: counterstrikesharp-windows-${{ needs.setup.outputs.gitversion_semver }}
|
||||
path: build/windows
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: counterstrikesharp-build-linux-${{ env.GITHUB_SHA_SHORT }}
|
||||
name: counterstrikesharp-linux-${{ needs.setup.outputs.gitversion_semver }}
|
||||
path: build/linux
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: counterstrikesharp-build-api-${{ env.GITHUB_SHA_SHORT }}
|
||||
name: counterstrikesharp-api-${{ needs.setup.outputs.gitversion_semver }}
|
||||
path: build/api
|
||||
|
||||
# TODO: This stuff should really be in a matrix
|
||||
@@ -206,8 +212,8 @@ jobs:
|
||||
|
||||
- name: Zip Builds
|
||||
run: |
|
||||
(cd build/linux && zip -qq -r ../../counterstrikesharp-build-${{ needs.setup.outputs.buildnumber }}-linux-${{ env.GITHUB_SHA_SHORT }}.zip *)
|
||||
(cd build/windows && zip -qq -r ../../counterstrikesharp-build-${{ needs.setup.outputs.buildnumber }}-windows-${{ env.GITHUB_SHA_SHORT }}.zip *)
|
||||
(cd build/linux && zip -qq -r ../../counterstrikesharp-linux-${{ needs.setup.outputs.gitversion_semver }}.zip *)
|
||||
(cd build/windows && zip -qq -r ../../counterstrikesharp-windows-${{ needs.setup.outputs.gitversion_semver }}.zip *)
|
||||
|
||||
- name: Add dotnet runtime
|
||||
run: |
|
||||
@@ -221,28 +227,44 @@ jobs:
|
||||
|
||||
- name: Zip Builds
|
||||
run: |
|
||||
(cd build/linux && zip -qq -r ../../counterstrikesharp-with-runtime-build-${{ needs.setup.outputs.buildnumber }}-linux-${{ env.GITHUB_SHA_SHORT }}.zip *)
|
||||
(cd build/windows && zip -qq -r ../../counterstrikesharp-with-runtime-build-${{ needs.setup.outputs.buildnumber }}-windows-${{ env.GITHUB_SHA_SHORT }}.zip *)
|
||||
(cd build/linux && zip -qq -r ../../counterstrikesharp-with-runtime-linux-${{ needs.setup.outputs.gitversion_semver }}.zip *)
|
||||
(cd build/windows && zip -qq -r ../../counterstrikesharp-with-runtime-windows-${{ needs.setup.outputs.gitversion_semver }}.zip *)
|
||||
|
||||
- name: Generate a changelog
|
||||
uses: orhun/git-cliff-action@v4
|
||||
id: git-cliff
|
||||
with:
|
||||
config: cliff.toml
|
||||
args: --current -s footer
|
||||
|
||||
- name: Release
|
||||
id: release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: v${{ needs.setup.outputs.buildnumber }}
|
||||
append_body: true
|
||||
body: |
|
||||
${{ steps.git-cliff.outputs.content }}
|
||||
|
||||
Please refer to [CHANGELOG.md](https://github.com/roflmuffin/CounterStrikeSharp/blob/${{ github.ref_name }}/CHANGELOG.md) for details.
|
||||
files: |
|
||||
counterstrikesharp-build-${{ needs.setup.outputs.buildnumber }}-windows-${{ env.GITHUB_SHA_SHORT }}.zip
|
||||
counterstrikesharp-with-runtime-build-${{ needs.setup.outputs.buildnumber }}-windows-${{ env.GITHUB_SHA_SHORT }}.zip
|
||||
counterstrikesharp-build-${{ needs.setup.outputs.buildnumber }}-linux-${{ env.GITHUB_SHA_SHORT }}.zip
|
||||
counterstrikesharp-with-runtime-build-${{ needs.setup.outputs.buildnumber }}-linux-${{ env.GITHUB_SHA_SHORT }}.zip
|
||||
counterstrikesharp-windows-${{ needs.setup.outputs.gitversion_semver }}.zip
|
||||
counterstrikesharp-with-runtime-windows-${{ needs.setup.outputs.gitversion_semver }}.zip
|
||||
counterstrikesharp-linux-${{ needs.setup.outputs.gitversion_semver }}.zip
|
||||
counterstrikesharp-with-runtime-linux-${{ needs.setup.outputs.gitversion_semver }}.zip
|
||||
|
||||
- name: Publish NuGet package
|
||||
run: |
|
||||
dotnet nuget push build/api/CounterStrikeSharp.API.1.0.${{ needs.setup.outputs.buildnumber }}.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
||||
dotnet nuget push build/api/CounterStrikeSharp.API.1.0.${{ needs.setup.outputs.buildnumber }}.snupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
||||
dotnet nuget push build/api/CounterStrikeSharp.API.${{ needs.setup.outputs.gitversion_semver }}.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
||||
dotnet nuget push build/api/CounterStrikeSharp.API.${{ needs.setup.outputs.gitversion_semver }}.snupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
||||
|
||||
- name: Send Notification to Discord
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
uses: Ilshidur/action-discord@0.3.2
|
||||
with:
|
||||
args: "A new release of CS# has been tagged (v${{ needs.setup.outputs.buildnumber }}) at ${{ steps.release.outputs.url }}"
|
||||
args: |
|
||||
A new release of CS# has been tagged [v${{ needs.setup.outputs.gitversion_semver }}](${{ steps.release.outputs.url }})
|
||||
|
||||
${{ steps.git-cliff.outputs.content }}
|
||||
|
||||
Please refer to [CHANGELOG.md](https://github.com/roflmuffin/CounterStrikeSharp/blob/${{ github.ref_name }}/CHANGELOG.md) for details.
|
||||
25
.github/workflows/lint-code.yaml
vendored
Normal file
25
.github/workflows/lint-code.yaml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Code format checks
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'src/**'
|
||||
- '.clang-format'
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'src/**'
|
||||
- '.clang-format'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint code with clang-format
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: jidicula/clang-format-action@4726374d1aa3c6aecf132e5197e498979588ebc8
|
||||
with:
|
||||
clang-format-version: '20'
|
||||
check-path: 'src'
|
||||
exclude-regex: '(sdk|\.proto)'
|
||||
50
.vscode/tasks.json
vendored
Normal file
50
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "sync-linux",
|
||||
"type": "shell",
|
||||
"command": "lftp -c \"open -u $LINUX_SERVER_SFTP_USERNAME,$LINUX_SERVER_SFTP_PASSWORD $LINUX_SERVER_SFTP_HOST; mirror -R ${workspaceFolder}/build/addons /game/csgo/addons; mirror -R ${workspaceFolder}/managed/CounterStrikeSharp.API/bin/Release/net8.0/ /game/csgo/addons/counterstrikesharp/api; mirror -R ${workspaceFolder}/managed/CounterStrikeSharp.Tests.Native/bin/Debug/net8.0/ /game/csgo/addons/counterstrikesharp/plugins/NativeTestsPlugin\"",
|
||||
"dependsOn": [
|
||||
"build",
|
||||
"build-api",
|
||||
"build-test-plugin"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "build",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -G Ninja && cmake --build build -j$(nproc)",
|
||||
},
|
||||
{
|
||||
"label": "build-api",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "dotnet build -c Release",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/managed/CounterStrikeSharp.API"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "build-test-plugin",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "dotnet build -c Debug",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/managed/CounterStrikeSharp.Tests.Native"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "generate-schema",
|
||||
"type": "shell",
|
||||
"command": "dotnet run -- ../CounterStrikeSharp.API/Core/Schema",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/managed/CounterStrikeSharp.SchemaGen"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
1513
CHANGELOG.md
Normal file
1513
CHANGELOG.md
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,6 +7,11 @@ include("makefiles/shared.cmake")
|
||||
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
|
||||
set(FUNCHOOK_BUILD_TESTS OFF CACHE BOOL "Disable building tests for funchook." FORCE)
|
||||
set(ZYDIS_BUILD_EXAMPLES OFF CACHE BOOL "Disable building examples for Zydis." FORCE)
|
||||
set(ZYDIS_BUILD_TOOLS OFF CACHE BOOL "Disable building tools for Zydis." FORCE)
|
||||
set(DYNOHOOK_BUILD_TESTS OFF CACHE BOOL "Disable building tests for funchook." FORCE)
|
||||
|
||||
add_subdirectory(libraries/spdlog)
|
||||
add_subdirectory(libraries/dyncall)
|
||||
add_subdirectory(libraries/funchook)
|
||||
@@ -43,6 +48,8 @@ set(SOURCE_FILES
|
||||
src/core/coreconfig.cpp
|
||||
src/core/gameconfig.h
|
||||
src/core/gameconfig.cpp
|
||||
src/core/gameconfig_updater.h
|
||||
src/core/gameconfig_updater.cpp
|
||||
src/core/log.h
|
||||
src/core/log.cpp
|
||||
src/scripting/script_engine.h
|
||||
@@ -70,6 +77,7 @@ set(SOURCE_FILES
|
||||
src/core/managers/con_command_manager.cpp
|
||||
src/core/managers/con_command_manager.h
|
||||
src/scripting/natives/natives_commands.cpp
|
||||
src/scripting/natives/natives_convars.cpp
|
||||
src/core/memory_module.h
|
||||
src/core/memory_module.cpp
|
||||
src/core/cs2_sdk/interfaces/cgameresourceserviceserver.h
|
||||
@@ -84,6 +92,8 @@ set(SOURCE_FILES
|
||||
src/scripting/natives/natives_entities.cpp
|
||||
src/scripting/natives/natives_voice.cpp
|
||||
src/scripting/natives/natives_metamod.cpp
|
||||
src/scripting/natives/natives_cvariant.cpp
|
||||
src/scripting/natives/natives_cutil.cpp
|
||||
src/core/managers/entity_manager.cpp
|
||||
src/core/managers/entity_manager.h
|
||||
src/core/managers/chat_manager.cpp
|
||||
|
||||
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
||||
FROM registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
RUN apt update && apt install -y \
|
||||
clang-16 \
|
||||
cmake \
|
||||
ninja-build \
|
||||
git \
|
||||
zlib1g-dev \
|
||||
libssl-dev \
|
||||
libprotobuf-dev \
|
||||
protobuf-compiler \
|
||||
pkg-config \
|
||||
curl && \
|
||||
ln -sf /usr/bin/clang-16 /usr/bin/clang && \
|
||||
ln -sf /usr/bin/clang++-16 /usr/bin/clang++
|
||||
1
GitVersion.yml
Normal file
1
GitVersion.yml
Normal file
@@ -0,0 +1 @@
|
||||
workflow: GitHubFlow/v1
|
||||
85
cliff.toml
Normal file
85
cliff.toml
Normal file
@@ -0,0 +1,85 @@
|
||||
# git-cliff ~ configuration file
|
||||
# https://git-cliff.org/docs/configuration
|
||||
|
||||
[remote.github]
|
||||
owner = "roflmuffin"
|
||||
repo = "CounterStrikeSharp"
|
||||
# token = ""
|
||||
|
||||
[changelog]
|
||||
# A Tera template to be rendered for each release in the changelog.
|
||||
# See https://keats.github.io/tera/docs/#introduction
|
||||
body = """
|
||||
## What's Changed
|
||||
|
||||
{%- if version %} in {{ version }}{%- endif -%}
|
||||
{% for commit in commits %}
|
||||
* {{ commit.message | split(pat="\n") | first | trim }}\
|
||||
{% if commit.remote.username and commit.remote.username != remote.github.owner %} by \
|
||||
[@{{ commit.remote.username }}](https://github.com/{{ commit.remote.username }}) \
|
||||
{%- endif -%}
|
||||
{% if commit.remote.pr_number %} in \
|
||||
[#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }})\
|
||||
{%- endif %}
|
||||
{%- if commit.id %} ([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url()}}/commit/{{ commit.id }})){%- endif -%}
|
||||
|
||||
{%- endfor -%}
|
||||
|
||||
{%- if github -%}
|
||||
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
|
||||
{% raw %}\n{% endraw -%}
|
||||
## New Contributors
|
||||
{%- endif %}\
|
||||
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
|
||||
* [@{{ contributor.username }}](https://github.com/{{ contributor.username }}) made their first contribution
|
||||
{%- if contributor.pr_number %} in \
|
||||
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
|
||||
{%- endif %}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
|
||||
{% if version %}
|
||||
|
||||
{% else -%}
|
||||
{% raw %}\n{% endraw %}
|
||||
{% endif %}
|
||||
|
||||
{%- macro remote_url() -%}
|
||||
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
|
||||
{%- endmacro -%}
|
||||
"""
|
||||
# Remove leading and trailing whitespaces from the changelog's body.
|
||||
trim = true
|
||||
# A Tera template to be rendered as the changelog's footer.
|
||||
# See https://keats.github.io/tera/docs/#introduction
|
||||
footer = """
|
||||
<!-- generated by git-cliff -->
|
||||
"""
|
||||
# An array of regex based postprocessors to modify the changelog.
|
||||
# Replace the placeholder `<REPO>` with a URL.
|
||||
postprocessors = []
|
||||
|
||||
[git]
|
||||
# Parse commits according to the conventional commits specification.
|
||||
# See https://www.conventionalcommits.org
|
||||
conventional_commits = false
|
||||
# Exclude commits that do not match the conventional commits specification.
|
||||
filter_unconventional = true
|
||||
# Split commits on newlines, treating each line as an individual commit.
|
||||
split_commits = false
|
||||
# An array of regex based parsers to modify commit messages prior to further processing.
|
||||
commit_preprocessors = [
|
||||
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
|
||||
{ pattern = '\[no ci\]', replace = "" }
|
||||
]
|
||||
commit_parsers = [
|
||||
{ message = "^release:", skip = true }
|
||||
]
|
||||
# Exclude commits that are not matched by any commit parser.
|
||||
filter_commits = false
|
||||
# Order releases topologically instead of chronologically.
|
||||
topo_order = false
|
||||
# Order of commits in each group/release within the changelog.
|
||||
# Allowed values: newest, oldest
|
||||
sort_commits = "newest"
|
||||
tag_pattern = "v[0-9]+\\.[0-9]+\\.[0-9]+"
|
||||
@@ -4,7 +4,10 @@
|
||||
"FollowCS2ServerGuidelines": true,
|
||||
"PluginHotReloadEnabled": true,
|
||||
"PluginAutoLoadEnabled": true,
|
||||
"PluginResolveNugetPackages": false,
|
||||
"ServerLanguage": "en",
|
||||
"UnlockConCommands": true,
|
||||
"UnlockConVars": true
|
||||
"UnlockConVars": true,
|
||||
"AutoUpdateEnabled": true,
|
||||
"AutoUpdateURL": "http://gamedata.cssharp.dev"
|
||||
}
|
||||
@@ -2,62 +2,62 @@
|
||||
"UTIL_ClientPrintAll": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 48 81 EC 70 01 ? ? 8B E9",
|
||||
"linux": "55 48 89 E5 41 57 49 89 D7 41 56 49 89 F6 41 55 41 89 FD"
|
||||
"windows": "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 48 83 EC 60 8B E9",
|
||||
"linux": "55 48 89 E5 41 57 4D 89 CF 41 56 4D 89 C6 41 55 49 89 CD 41 54 49 89 D4 53 48 8D"
|
||||
}
|
||||
},
|
||||
"ClientPrint": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 85 C9 0F 84 ? ? ? ? 48 89 5C 24 ? 55",
|
||||
"linux": "55 48 89 E5 41 57 49 89 CF 41 56 49 89 D6 41 55 41 89 F5 41 54 4C 8D A5 A0 FE FF FF"
|
||||
"linux": "55 48 8D 05 ? ? ? ? 48 89 E5 41 57 41 89 F7 31 F6"
|
||||
}
|
||||
},
|
||||
"CCSPlayerController_SwitchTeam": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "40 56 57 48 81 EC ? ? ? ? 48 8B F9 8B F2 8B CA",
|
||||
"linux": "55 48 89 E5 41 55 49 89 FD 89 F7"
|
||||
"windows": "40 53 57 48 81 EC ? ? ? ? 48 8B D9 8B FA",
|
||||
"linux": "55 48 89 E5 41 54 49 89 FC 89 F7"
|
||||
}
|
||||
},
|
||||
"CCSPlayerController_ChangeTeam": {
|
||||
"offsets": {
|
||||
"windows": 100,
|
||||
"linux": 99
|
||||
"windows": 109,
|
||||
"linux": 108
|
||||
}
|
||||
},
|
||||
"CCSPlayerController_Respawn": {
|
||||
"offsets": {
|
||||
"windows": 257,
|
||||
"linux": 259
|
||||
"windows": 277,
|
||||
"linux": 279
|
||||
}
|
||||
},
|
||||
"CBasePlayerController_SetPawn": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 89 74 24 ? 55 41 54 41 55 41 56 41 57 48 8D 6C 24 ? 48 81 EC ? ? ? ? 4C 8B F9",
|
||||
"linux": "55 48 89 E5 41 57 41 56 41 55 49 89 FD 41 54 45 89 C4"
|
||||
"windows": "44 88 4C 24 ? 53 57",
|
||||
"linux": "55 48 8D 87 ? ? ? ? 48 89 E5 41 57 41 56 41 89 CE 41 55 45 89 CD"
|
||||
}
|
||||
},
|
||||
"CCSPlayerPawnBase_PostThink": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 ? ? 55 53 56 57 41 ? 48 ? ? ? 48 ? ? ? ? ? ? 4C 89 68",
|
||||
"linux": "55 48 89 E5 41 56 41 55 41 54 53 48 89 FB 48 83 EC 40 E8"
|
||||
"linux": "55 48 89 E5 41 56 41 55 41 54 53 48 89 FB 48 83 EC 40 E8 ? ? ? ? F3 0F 10 83"
|
||||
}
|
||||
},
|
||||
"CGameEventManager_Init": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "40 53 48 83 EC 20 48 8B 01 48 8B D9 FF 50 10",
|
||||
"linux": "55 48 89 E5 41 54 49 89 FC 48 83 EC 08 48 8B 07 FF 50 18"
|
||||
"linux": "55 48 89 E5 53 48 89 FB 48 83 EC 08 48 8B 07 FF 50 18"
|
||||
}
|
||||
},
|
||||
"GiveNamedItem": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 89 5C 24 ? 48 89 74 24 ? 55 57 41 ? 41 ? 41 ? 48 ? ? ? ? 48 ? ? ? ? ? ? 4D ? ? 48",
|
||||
"linux": "55 48 89 E5 41 57 41 56 4D 89 C6 41 55 49 89 D5 41 54 49 89 F4"
|
||||
"windows": "48 89 5C 24 ? 48 89 74 24 ? 55 57 41 55 41 56 41 57 48 8D 6C 24 ? 48 81 EC ? ? ? ? 4D 8B F9",
|
||||
"linux": "55 48 89 E5 41 57 41 56 41 55 41 54 53 48 81 EC D8 00 00 00 48 89 8D 18 FF FF FF"
|
||||
}
|
||||
},
|
||||
"UTIL_Remove": {
|
||||
@@ -67,57 +67,50 @@
|
||||
"linux": "48 89 FE 48 85 FF 74 ? 48 8D 05 ? ? ? ? 48"
|
||||
}
|
||||
},
|
||||
"Host_Say": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "44 89 4C 24 20 44 88 44 24 18",
|
||||
"linux": "55 48 89 E5 41 57 41 56 49 89 F6 41 55 4D 89 C5"
|
||||
}
|
||||
},
|
||||
"CBaseModelEntity_SetModel": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 89 5C 24 ? 48 89 7C 24 ? 55 48 8B EC 48 83 EC 50 48 8B F9 4C 8B C2",
|
||||
"linux": "55 48 89 F2 48 89 E5 41 54 49 89 FC 48 8D 7D E0 48 83 EC ? 48 8D 05 ? ? ? ? 48 8B 30 48 8B 06"
|
||||
"windows": "40 53 48 83 EC ? 48 8B D9 4C 8B C2 48 8B 0D ? ? ? ? 48 8D 54 24 ? 48 8B 01 FF 50 ? 48 8B 44 24 ? 48 8D 54 24 ? 48 8B CB 48 89 44 24 ? E8 ? ? ? ? 48 83 C4 ? 5B C3 CC CC CC CC CC 48 89 5C 24",
|
||||
"linux": "55 48 89 F2 48 89 E5 53 48 89 FB 48 8D 7D ? 48 83 EC ? 48 8D 05 ? ? ? ? 48 8B 30 48 8B 06 FF 50 ? 48 8B 45 ? 48 8D 75 ? 48 89 DF 48 89 45 ? E8 ? ? ? ? 48 8B 5D ? C9 C3 CC CC CC 55"
|
||||
}
|
||||
},
|
||||
"CCSPlayer_WeaponServices_CanUse": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 89 5C 24 ? 48 89 6C 24 ? 56 57 41 56 48 83 EC ? 48 8B 01 48 8B FA",
|
||||
"linux": "55 48 8D 15 ? ? ? ? 48 89 E5 41 55 49 89 FD 41 54 49 89 F4"
|
||||
"linux": "55 48 8D 15 ? ? ? ? 48 89 E5 41 55 41 54 49 89 FC 53 48 89 F3 48 83 EC ? 48 8B 07 48 8B 80 ? ? ? ?"
|
||||
}
|
||||
},
|
||||
"CCSPlayer_ItemServices_CanAcquire": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "44 89 44 24 ? 48 89 54 24 ? 48 89 4C 24 ? 55 56 57 41 54 41 55 41 56 41 57 48 8B EC",
|
||||
"linux": "55 48 89 E5 41 57 41 56 41 55 49 89 CD 41 54 53 48 83 EC"
|
||||
"windows": "44 89 44 24 ? 48 89 54 24 ? 48 89 4C 24 ? 55 53 56 57 41 55 41 56 41 57 48 8B EC",
|
||||
"linux": "55 48 89 E5 41 57 41 56 41 55 49 89 CD 41 54 49 89 FC 53 48 89 F3 48 83 EC 78"
|
||||
}
|
||||
},
|
||||
"GetCSWeaponDataFromKey": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC ? 48 8B FA 8B F1 48 85 D2 0F 84",
|
||||
"linux": "55 48 89 E5 41 57 41 56 41 89 FE 41 55 41 54 45"
|
||||
"windows": "48 89 5C 24 ? 57 48 83 EC ? 33 FF 4C 8B CA 8B D9",
|
||||
"linux": "55 31 D2 48 89 E5 41 57 41 56 41 55 41 54 41 89 FC"
|
||||
}
|
||||
},
|
||||
"CCSPlayer_ItemServices_GiveNamedItem": {
|
||||
"offsets": {
|
||||
"windows": 19,
|
||||
"linux": 20
|
||||
"windows": 18,
|
||||
"linux": 19
|
||||
}
|
||||
},
|
||||
"CCSPlayer_ItemServices_DropActivePlayerWeapon": {
|
||||
"offsets": {
|
||||
"windows": 20,
|
||||
"linux": 21
|
||||
"windows": 21,
|
||||
"linux": 22
|
||||
}
|
||||
},
|
||||
"CCSPlayer_ItemServices_RemoveWeapons": {
|
||||
"offsets": {
|
||||
"windows": 21,
|
||||
"linux": 22
|
||||
"windows": 22,
|
||||
"linux": 23
|
||||
}
|
||||
},
|
||||
"CGameSceneNode_GetSkeletonInstance": {
|
||||
@@ -129,14 +122,20 @@
|
||||
"CCSGameRules_TerminateRound": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 8B C4 4C 89 48 ? 48 89 48 ? 55 41 55",
|
||||
"linux": "55 48 89 E5 41 57 41 56 41 55 41 54 49 89 FC 53 48 81 EC 88 00 00 00 48 8D 05 ? ? ? ?"
|
||||
"windows": "48 8B C4 4C 89 48 ? 48 89 48 ? 55 56",
|
||||
"linux": "55 48 89 E5 41 57 41 56 49 89 FE 41 55 41 54 53 48 81 EC ? ? ? ? 48 8D 05 ? ? ? ? F3 0F 11 85"
|
||||
}
|
||||
},
|
||||
"CCSGameRules_FindPickerEntity": {
|
||||
"offsets": {
|
||||
"windows": 27,
|
||||
"linux": 28
|
||||
"windows": 25,
|
||||
"linux": 26
|
||||
}
|
||||
},
|
||||
"CTakeDamageInfo_HitGroup": {
|
||||
"offsets": {
|
||||
"windows": 104,
|
||||
"linux": 104
|
||||
}
|
||||
},
|
||||
"UTIL_CreateEntityByName": {
|
||||
@@ -150,68 +149,68 @@
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 89 5C 24 10 57 48 83 EC 30 48 8B DA 48 8B F9 48 85 C9",
|
||||
"linux": "48 85 FF 74 ? 55 48 89 E5 41 56"
|
||||
"linux": "48 85 FF 74 ? 55 48 89 E5 41 55 49 89 FD"
|
||||
}
|
||||
},
|
||||
"CBaseEntity_EmitSoundFilter": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 48 89 7C 24 20 41 56 48 83 EC 30 48 8B EA",
|
||||
"linux": "55 48 89 E5 41 56 49 89 D6 41 55 41 89 F5 41 54 48"
|
||||
"windows": "40 53 48 83 EC ? 4C 89 4C 24 ? 48 8B D9 45 8B C8",
|
||||
"linux": "55 48 89 E5 53 48 89 FB 48 83 EC ? E8 ? ? ? ? 48 89 D8 48 8B 5D ? C9 C3 CC CC CC CC CC CC 48 B8"
|
||||
}
|
||||
},
|
||||
"CEntityInstance_AcceptInput": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 89 5C 24 10 48 89 74 24 18 57 48 83 EC 40 49 8B F0",
|
||||
"linux": "55 48 89 E5 41 57 49 89 FF 41 56 48 8D 7D C0"
|
||||
"windows": "89 5C 24 ? 48 89 74 24 ? 57 48 83 EC ? 49 8B F0 48 8B D9 48 8B 0D",
|
||||
"linux": "55 48 89 F0 48 89 E5 41 57 49 89 FF 41 56 48 8D 7D C0"
|
||||
}
|
||||
},
|
||||
"CEntitySystem_AddEntityIOEvent": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 89 5C 24 ? 48 89 74 24 ? 57 48 ? ? ? 49 ? ? 48 ? ? 48 ? ? 74",
|
||||
"linux": "55 41 BA FF FF FF FF"
|
||||
"windows": "48 89 5C 24 ? 4C 89 4C 24 ? 48 89 4C 24 ? 55 56 57 41 54 41 55 41 56 41 57 48 83 EC ? 49 8B F9",
|
||||
"linux": "55 48 89 E5 41 55 49 89 CD 41 54 49 89 FC"
|
||||
}
|
||||
},
|
||||
"LegacyGameEventListener": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 8B 15 ? ? ? ? 48 85 D2 74 ? 85 C9 74",
|
||||
"linux": "48 8B 05 ? ? ? ? 48 85 C0 74 ? 85 FF"
|
||||
"windows": "48 8B 15 ? ? ? ? 48 85 D2 74 ? 83 F9 ? 77 ? 48 63 C1 48 C1 E0",
|
||||
"linux": "48 8B 05 ? ? ? ? 48 85 C0 74 ? 83 FF ? 77 ? 48 63 FF 48 C1 E7 ? 48 8D 44 38"
|
||||
}
|
||||
},
|
||||
"CBasePlayerPawn_CommitSuicide": {
|
||||
"offsets": {
|
||||
"windows": 380,
|
||||
"linux": 380
|
||||
"windows": 408,
|
||||
"linux": 408
|
||||
}
|
||||
},
|
||||
"CBasePlayerPawn_RemovePlayerItem": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 ? ? 0F 84 ? ? ? ? 48 89 5C 24 ? 57 48 ? ? ? 48 ? ? 48 ? ? E8",
|
||||
"linux": "55 48 89 ? 41 ? 49 89 ? 41 ? 49 89 ? E8 ? ? ? ? 49 39"
|
||||
"linux": "55 48 89 E5 41 54 49 89 FC 53 48 89 F3 E8 ? ? ? ? 48 39 C3 74 ? 4C 89 E7 E8 ? ? ? ? 48 39 C3 74 ? 4C 89 E7 48 89 DE E8 ? ? ? ? 48 89 DF 5B 41 5C 5D E9 ? ? ? ? 0F 1F 44 00 00"
|
||||
}
|
||||
},
|
||||
"CBaseEntity_Teleport": {
|
||||
"offsets": {
|
||||
"windows": 157,
|
||||
"linux": 156
|
||||
"windows": 168,
|
||||
"linux": 167
|
||||
}
|
||||
},
|
||||
"CBaseEntity_TakeDamageOld": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 89 74 24 ? 57 48 81 EC 80 00 00 00 48 8B 41",
|
||||
"linux": "55 48 89 E5 41 57 41 56 41 55 41 54 49 89 FC 53 48 83 EC 58 4C 8D 3D"
|
||||
"windows": "40 55 41 54 41 55 41 56 41 57 48 81 EC ? ? ? ? 48 8D 6C 24 ? 48 89 9D ? ? ? ? 45 33 ED",
|
||||
"linux": "55 48 89 E5 41 57 41 56 49 89 F6 41 55 41 54 49 89 FC 53 48 89 D3 48 83 EC ? 48 85 D2"
|
||||
}
|
||||
},
|
||||
"CBaseTrigger_StartTouch": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "40 57 41 57 48 83 EC 28 48 8B 01",
|
||||
"linux": "55 48 89 E5 41 56 49 89 F6 41 55 49 89 FD 41 54 53 BB"
|
||||
"windows": "40 57 41 56 48 83 EC ? 48 8B 01",
|
||||
"linux": "55 48 89 E5 41 56 41 55 49 89 F5 41 54 53 48 89 FB 48 83 EC 10 48 8B 07"
|
||||
}
|
||||
},
|
||||
"CBaseTrigger_EndTouch": {
|
||||
@@ -221,20 +220,6 @@
|
||||
"linux": "55 BA FF FF FF FF 48 89 E5 41 57 41 56 41 55 49 89 F5 41"
|
||||
}
|
||||
},
|
||||
"StateChanged": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "40 55 53 56 41 56 41 57 48 8D 6C 24 ? 48 81 EC 70 01 00 00",
|
||||
"linux": "55 48 89 E5 41 57 41 56 41 55 41 54 53 89 D3"
|
||||
}
|
||||
},
|
||||
"NetworkStateChanged": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "4C 8B C9 48 8B 09 48 85 C9 74 ? 48 8B 41 10",
|
||||
"linux": "4C 8B 07 4D 85 C0 74 ? 49 8B 40 10"
|
||||
}
|
||||
},
|
||||
"GameEntitySystem": {
|
||||
"offsets": {
|
||||
"windows": 88,
|
||||
@@ -250,15 +235,15 @@
|
||||
"CEntityIOOutput_FireOutputInternal": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "4C 89 4C 24 20 53 55 57 41 54 41 56 48 81 EC",
|
||||
"linux": "55 48 89 E5 41 57 41 56 41 55 41 54 49 89 D4 53 48 89 F3 48 83 EC 58"
|
||||
"windows": "4C 89 4C 24 ? 48 89 4C 24 ? 53 56",
|
||||
"linux": "55 48 89 E5 41 57 49 89 FF 41 56 41 55 41 54 49 89 D4 53 48 89 F3"
|
||||
}
|
||||
},
|
||||
"IGameSystem_InitAllSystems_pFirst": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 8B 3D ? ? ? ? 48 85 FF 0F 84 ? ? ? ? BE",
|
||||
"linux": "4C 8B 35 ? ? ? ? 4D 85 F6 75 ? E9"
|
||||
"windows": "48 8B 1D ? ? ? ? 48 85 DB 0F 84 ? ? ? ? BD",
|
||||
"linux": "4C 8B 35 ? ? ? ? 4D 85 F6 75"
|
||||
}
|
||||
},
|
||||
"CEntityResourceManifest_AddResource": {
|
||||
@@ -267,10 +252,43 @@
|
||||
"linux": 0
|
||||
}
|
||||
},
|
||||
"CheckTransmit": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 8B C4 4C 89 48 ? 48 89 50 ? 48 89 48 ? 55 48 8D A8",
|
||||
"linux": "55 48 89 E5 41 57 49 89 FF 41 56 48 8D 3D ? ? ? ? 41 55 41 89 D5"
|
||||
}
|
||||
},
|
||||
"CheckTransmitPlayerSlot": {
|
||||
"offsets": {
|
||||
"windows": 584,
|
||||
"linux": 584
|
||||
"windows": 576,
|
||||
"linux": 576
|
||||
}
|
||||
},
|
||||
"NetworkStateChanged": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "4C 8B C2 48 8B D1 48 8B 09",
|
||||
"linux": "48 8B 07 48 85 C0 74 ? 48 8B 50 10"
|
||||
}
|
||||
},
|
||||
"SetStateChanged": {
|
||||
"offsets": {
|
||||
"windows": 25,
|
||||
"linux": 26
|
||||
}
|
||||
},
|
||||
"ISource2GameEntities::CheckTransmit": {
|
||||
"offsets": {
|
||||
"windows": 12,
|
||||
"linux": 13
|
||||
}
|
||||
},
|
||||
"Host_Say": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "44 89 4C 24 20 44 88 44 24 18",
|
||||
"linux": "55 48 89 E5 41 57 49 89 F7 41 56 41 55 41 54 4D 89 C4"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
23
configs/addons/counterstrikesharp/lang/en.json
Normal file
23
configs/addons/counterstrikesharp/lang/en.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"menu.button.previous": "Prev",
|
||||
"menu.button.next": "Next",
|
||||
"menu.button.close": "Close",
|
||||
|
||||
"all": "all players",
|
||||
"bots": "bots",
|
||||
"humans": "humans",
|
||||
"alive": "alive players",
|
||||
"dead": "dead players",
|
||||
"notme": "all players except self",
|
||||
"ct": "ct players",
|
||||
"t": "t players",
|
||||
"spec": "spec players",
|
||||
|
||||
"No matching client": "No matching client was found.",
|
||||
"No matching clients": "No matching clients were found.",
|
||||
"Target must be alive": "This command can only be used on alive players.",
|
||||
"Target must be dead": "This command can only be used on dead players.",
|
||||
"Unable to target": "You cannot target this player.",
|
||||
"Cannot target bot": "Unable to perform this command on a bot.",
|
||||
"More than one client matched": "More than one client matched the given pattern."
|
||||
}
|
||||
23
configs/addons/counterstrikesharp/lang/tr.json
Normal file
23
configs/addons/counterstrikesharp/lang/tr.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"menu.button.previous": "Geri",
|
||||
"menu.button.next": "İleri",
|
||||
"menu.button.close": "Çıkış",
|
||||
|
||||
"all": "tüm oyuncular",
|
||||
"bots": "botlar",
|
||||
"humans": "insanlar",
|
||||
"alive": "hayatta olan oyuncular",
|
||||
"dead": "ölü oyuncular",
|
||||
"notme": "kendi hariç tüm oyuncular",
|
||||
"ct": "CT oyuncular",
|
||||
"t": "T oyuncular",
|
||||
"spec": "izleyici oyuncular",
|
||||
|
||||
"No matching client": "{white}Eşleşen bir istemci bulunamadı.",
|
||||
"No matching clients": "{white}Eşleşen istemciler bulunamadı.",
|
||||
"Target must be alive": "{white}Bu komut yalnızca hayatta olan oyunculara uygulanabilir.",
|
||||
"Target must be dead": "{white}Bu komut yalnızca ölü oyunculara uygulanabilir.",
|
||||
"Unable to target": "{white}Bu oyuncu hedeflenemez.",
|
||||
"Cannot target bot": "{white}Bu komut bir bota uygulanamaz.",
|
||||
"More than one client matched": "{white}Verilen kalıba birden fazla istemci eşleşti."
|
||||
}
|
||||
80
create-release.sh
Executable file
80
create-release.sh
Executable file
@@ -0,0 +1,80 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
DRY_RUN=false
|
||||
if [[ "$1" == "--dry-run" || "$1" == "-d" ]]; then
|
||||
DRY_RUN=true
|
||||
echo "Running in DRY-RUN mode - no changes will be pushed"
|
||||
fi
|
||||
|
||||
echo "Starting automated release process..."
|
||||
|
||||
echo "Fetching latest tags from remote..."
|
||||
git fetch --tags
|
||||
|
||||
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v1.0.0")
|
||||
echo "Latest tag found: $LATEST_TAG"
|
||||
|
||||
if [[ $LATEST_TAG =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
|
||||
MAJOR=${BASH_REMATCH[1]}
|
||||
MINOR=${BASH_REMATCH[2]}
|
||||
PATCH=${BASH_REMATCH[3]}
|
||||
else
|
||||
echo "Error: Could not parse version from tag $LATEST_TAG"
|
||||
echo "Expected format: v1.0.x (e.g., v1.0.322)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NEW_PATCH=$((PATCH + 1))
|
||||
NEW_TAG="v$MAJOR.$MINOR.$NEW_PATCH"
|
||||
|
||||
echo "New version will be: $NEW_TAG"
|
||||
|
||||
echo "Generating changelog with git-cliff..."
|
||||
npx git-cliff -o CHANGELOG.md -t "$NEW_TAG"
|
||||
|
||||
if ! git diff --quiet CHANGELOG.md; then
|
||||
echo "Changelog updated successfully"
|
||||
|
||||
git add CHANGELOG.md
|
||||
|
||||
COMMIT_MSG="release: $NEW_TAG"
|
||||
echo "Committing changelog with message: $COMMIT_MSG"
|
||||
|
||||
if [ "$DRY_RUN" = true ]; then
|
||||
git commit -m "$COMMIT_MSG"
|
||||
|
||||
echo "Creating tag locally: $NEW_TAG"
|
||||
git tag "$NEW_TAG"
|
||||
|
||||
echo "DRY-RUN: Would push commit to remote"
|
||||
echo "DRY-RUN: Would push tag to remote"
|
||||
else
|
||||
git commit -m "$COMMIT_MSG"
|
||||
|
||||
echo "Pushing commit to remote..."
|
||||
git push origin $(git branch --show-current)
|
||||
|
||||
echo "Creating and pushing tag: $NEW_TAG"
|
||||
git tag "$NEW_TAG"
|
||||
git push origin tag "$NEW_TAG"
|
||||
fi
|
||||
|
||||
echo "Release $NEW_TAG completed successfully!"
|
||||
echo "Summary:"
|
||||
echo " - Previous version: $LATEST_TAG"
|
||||
echo " - New version: $NEW_TAG"
|
||||
echo " - Changelog updated: Yes"
|
||||
if [ "$DRY_RUN" = true ]; then
|
||||
echo " - Commit pushed: (dry-run)"
|
||||
echo " - Tag created and pushed: (dry-run)"
|
||||
else
|
||||
echo " - Commit pushed: Yes"
|
||||
echo " - Tag created and pushed: Yes"
|
||||
fi
|
||||
else
|
||||
echo "No changes detected in CHANGELOG.md"
|
||||
echo "This might indicate that there are no new commits since the last release."
|
||||
exit 1
|
||||
fi
|
||||
@@ -5,6 +5,9 @@ description: How to add inter-plugin communication to CounterStrikeSharp plugins
|
||||
|
||||
# Shared Plugin API
|
||||
|
||||
> [!NOTE]
|
||||
> **New (experimental)**: You can now resolve plugin dependencies directly from your local **NuGet packages cache** instead of copying every DLL into the `shared/` folder. See **Dependency Resolution** below. This feature **disabled by default.**
|
||||
|
||||
How to expose and use shared plugin APIs between multiple plugins.
|
||||
|
||||
## Creating a Contract Library
|
||||
@@ -65,3 +68,36 @@ balance.Add(500);
|
||||
```
|
||||
|
||||
This value _MUST_ be checked for null, as if there are no plugins providing implementations for a given capability, this method will return null, and you must handle this flow in your plugin.
|
||||
|
||||
|
||||
## Dependency Resolution
|
||||
|
||||
CounterStrikeSharp supports two complementary ways to resolve **external** assemblies used by your plugins and shared contracts:
|
||||
|
||||
1. **Shared Folder Resolution (manual)**: copy dependency DLLs into `shared/<PackageName>/<Assembly>.dll`.
|
||||
2. **NuGet Dependency Resolver (auto)**: when enabled, resolves missing assemblies from the local **NuGet packages root**
|
||||
|
||||
### Enabling the NuGet Resolver
|
||||
|
||||
Add the following property to your core config (disabled by default):
|
||||
|
||||
```json
|
||||
{
|
||||
...
|
||||
"PluginResolveNugetPackages": true
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> The engine looks for assemblies in the NuGet cache defined by the `NUGET_PACKAGES` environment variable, or falls back to the default user cache (e.g., `~/.nuget/packages` on Linux/macOS, `%UserProfile%\.nuget\packages` on Windows).
|
||||
|
||||
### Dependencies Resolution Order
|
||||
|
||||
When the NuGet resolver is **enabled**, resolution proceeds in this general order:
|
||||
|
||||
1. **Plugins directory** (in-place assemblies)
|
||||
2. `shared/` **folder** (existing shared assemblies mechanism)
|
||||
3. **NuGet cache** (auto-resolver)
|
||||
|
||||
This lets you keep proven `shared/` workflows while reducing manual copying for common NuGet dependencies.
|
||||
99
docfx/docs/guides/auto-build-and-deploy.md
Normal file
99
docfx/docs/guides/auto-build-and-deploy.md
Normal file
@@ -0,0 +1,99 @@
|
||||
---
|
||||
title: Automatically build/deploy your changes
|
||||
description: Automatically build and deploy plugin changes to a remote development server as you work.
|
||||
---
|
||||
|
||||
# Automatically build and deploy your changes
|
||||
|
||||
<sup>Adapted from the
|
||||
[original guide](https://github.com/uFloppyDisk/create-cssharp-plugin/blob/c8fca43f86a61a5e874624f2f3ed39c5271c9a55/templates/standard-plugin/docs/auto-live-hot-reloading.md).
|
||||
</sup>
|
||||
|
||||
During development of your plugin, you may find yourself repeating a workflow
|
||||
similar to the following:
|
||||
1. Make a change to your plugin
|
||||
2. Run your build task (ex. `dotnet build`)
|
||||
3. Upload plugin DLLs to your server using an FTP client
|
||||
4. Alt-tab to the game
|
||||
5. Test your changes
|
||||
6. Repeat
|
||||
|
||||
Iterating on your plugin this way is painfully slow and impacts your productivity.
|
||||
Below, you will find a guide and recommendations on how to setup your dev environment
|
||||
to watch for file changes and automatically update plugin files on your server as you work.
|
||||
By following this guide, your new workflow should look like this:
|
||||
1. Make a change to your plugin
|
||||
2. Alt-tab to the game
|
||||
3. Test your changes
|
||||
4. Repeat
|
||||
|
||||
> [!CAUTION]
|
||||
> Exercise caution when developing your plugin while using this workflow.
|
||||
> Build time errors are mostly caught by .NET SDK before files are committed
|
||||
> but incomplete implementation may lead to issues such as server crashes.
|
||||
> Avoid using this workflow on a production server meant for players.
|
||||
|
||||
## Setup
|
||||
|
||||
#### 1. Build plugin on file changes
|
||||
|
||||
The `dotnet` CLI, included with the .NET SDK, offers a convenient command for
|
||||
automatically watching for source file changes. If you have access to the `dotnet`
|
||||
CLI, run the following command to start watching your source code.
|
||||
```shell
|
||||
dotnet watch build --project path/to/projectName.csproj
|
||||
```
|
||||
<sup>By default, `dotnet watch` executes the `dotnet run` command on file changes
|
||||
so specifying `build` as the first argument is required.</sup>
|
||||
|
||||
Your plugin will now build automatically on file change. By default, your builds
|
||||
should be placed in `bin/<config>/<framework>` in the same directory as your `.csproj`.
|
||||
|
||||
```txt
|
||||
projectDirectory
|
||||
├── projectName.csproj
|
||||
├── bin
|
||||
│ └── Debug
|
||||
│ └── net8.0
|
||||
│ └── PLUGIN BUILDS HERE
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> You can have your plugin build to a more convenient location by setting the
|
||||
> `<OutDir>` build property in your `.csproj` file.
|
||||
> Example: `<OutDir>./build/$(MSBuildProjectName)</OutDir>`
|
||||
|
||||
|
||||
#### 2. Setup automatic uploads
|
||||
|
||||
##### Using WinSCP (Windows only)
|
||||
Once connected to your server:
|
||||
1. Go to the `Commands` tab at the top of the WinSCP window
|
||||
and click `Keep Remote Directory up to Date`.
|
||||
2. Select the plugin build directory containing your DLLs.
|
||||
3. Select the plugin destination.
|
||||
(`csgo/addons/counterstrikesharp/plugins/<projectName>`)
|
||||
4. Click `Start`
|
||||
|
||||
> [!IMPORTANT]
|
||||
> **For WSL users:**
|
||||
> Applications running on Windows, such as WinSCP, cannot watch your Linux subsystem for file
|
||||
> changes. Try using [this workaround](#using-winscp-while-developing-in-wsl) or consider
|
||||
> moving development to Windows.
|
||||
|
||||
##### Using `lsyncd` (Linux)
|
||||
> **TODO:** in-depth guide for setting up lsyncd
|
||||
|
||||
Learn more about `lsyncd`: https://github.com/lsyncd/lsyncd
|
||||
|
||||
___
|
||||
|
||||
#### Using WinSCP while developing in WSL
|
||||
Run the following watch command in place of the one mentioned in
|
||||
[Step 1](#1-build-plugin-on-file-changes) to build to a directory in your Windows filesystem
|
||||
```shell
|
||||
dotnet watch build --project path/to/<projectName>.csproj --property:OutDir=/mnt/<drive-letter>/some/path/<projectName>`
|
||||
```
|
||||
and have [WinSCP in Step 2](#2-setup-automatic-uploads) watch that path instead.
|
||||
|
||||
[Learn about Windows filesystem mounts in WSL](https://blogs.windows.com/windowsdeveloper/2016/07/22/fun-with-the-windows-subsystem-for-linux/#Working%20with%20Windows%20files:~:text=Working%20with%20Windows%20files)
|
||||
@@ -8,4 +8,7 @@
|
||||
href: dependency-injection.md
|
||||
|
||||
- name: Referencing Players
|
||||
href: referencing-players.md
|
||||
href: referencing-players.md
|
||||
|
||||
- name: Automatically build and deploy your changes
|
||||
href: auto-build-and-deploy.md
|
||||
|
||||
@@ -47,3 +47,10 @@ When enabled, will remove the `FCVAR_HIDDEN`,`FCVAR_DEVELOPMENTONLY`, `FCVAR_MIS
|
||||
## UnlockConVars
|
||||
|
||||
When enabled, will remove the `FCVAR_HIDDEN`,`FCVAR_DEVELOPMENTONLY`, `FCVAR_MISSING0`, `FCVAR_MISSING1`, `FCVAR_MISSING2`, `FCVAR_MISSING3` flags from all console variables.
|
||||
|
||||
## AutoUpdateEnabled
|
||||
|
||||
When enabled, CS# will check for any updates to the gamedata.json file and automatically update it if a new version is available.
|
||||
|
||||
## AutoUpdateURL
|
||||
The URL to use for the auto-update feature. This URL should point to a JSON file that contains the latest version of the gamedata.json file.
|
||||
@@ -1,38 +1,60 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace WithConfig;
|
||||
|
||||
public class SampleConfig : BasePluginConfig
|
||||
{
|
||||
[JsonPropertyName("ChatPrefix")] public string ChatPrefix { get; set; } = "My Cool Plugin";
|
||||
|
||||
[JsonPropertyName("ChatInterval")] public float ChatInterval { get; set; } = 60;
|
||||
}
|
||||
|
||||
[MinimumApiVersion(80)]
|
||||
public class WithConfigPlugin : BasePlugin, IPluginConfig<SampleConfig>
|
||||
{
|
||||
public override string ModuleName => "Example: With Config";
|
||||
public override string ModuleVersion => "1.0.0";
|
||||
|
||||
public SampleConfig Config { get; set; }
|
||||
|
||||
public void OnConfigParsed(SampleConfig config)
|
||||
{
|
||||
// Do manual verification of the config and override any invalid values
|
||||
if (config.ChatInterval > 60)
|
||||
{
|
||||
config.ChatInterval = 60;
|
||||
}
|
||||
|
||||
if (config.ChatPrefix.Length > 25)
|
||||
{
|
||||
throw new Exception($"Invalid value has been set to config value 'ChatPrefix': {config.ChatPrefix}");
|
||||
}
|
||||
|
||||
// Once we've validated the config, we can set it to the instance
|
||||
Config = config;
|
||||
}
|
||||
}
|
||||
using System.Text.Json.Serialization;
|
||||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
using CounterStrikeSharp.API.Core.Attributes.Registration;
|
||||
using CounterStrikeSharp.API.Modules.Admin;
|
||||
using CounterStrikeSharp.API.Modules.Commands;
|
||||
using CounterStrikeSharp.API.Modules.Config;
|
||||
using CounterStrikeSharp.API.Modules.Extensions;
|
||||
|
||||
namespace WithConfig;
|
||||
|
||||
public class SampleConfig : BasePluginConfig
|
||||
{
|
||||
[JsonPropertyName("ChatPrefix")] public string ChatPrefix { get; set; } = "My Cool Plugin";
|
||||
|
||||
[JsonPropertyName("ChatInterval")] public float ChatInterval { get; set; } = 60;
|
||||
}
|
||||
|
||||
[MinimumApiVersion(80)]
|
||||
public class WithConfigPlugin : BasePlugin, IPluginConfig<SampleConfig>
|
||||
{
|
||||
public override string ModuleName => "Example: With Config";
|
||||
public override string ModuleVersion => "1.0.0";
|
||||
|
||||
public SampleConfig Config { get; set; }
|
||||
|
||||
public void OnConfigParsed(SampleConfig config)
|
||||
{
|
||||
// Do manual verification of the config and override any invalid values
|
||||
if (config.ChatInterval > 60)
|
||||
{
|
||||
config.ChatInterval = 60;
|
||||
}
|
||||
|
||||
if (config.ChatPrefix.Length > 25)
|
||||
{
|
||||
throw new Exception($"Invalid value has been set to config value 'ChatPrefix': {config.ChatPrefix}");
|
||||
}
|
||||
|
||||
// Once we've validated the config, we can set it to the instance
|
||||
Config = config;
|
||||
}
|
||||
|
||||
[ConsoleCommand("css_reload_config", "Reloads the plugin config")]
|
||||
public void OnReloadConfig(CCSPlayerController? player, CommandInfo commandInfo)
|
||||
{
|
||||
commandInfo.ReplyToCommand("Chat Interval before reload: " + Config.ChatInterval);
|
||||
Config.Reload();
|
||||
commandInfo.ReplyToCommand("Chat Interval after reload: " + Config.ChatInterval);
|
||||
}
|
||||
|
||||
[ConsoleCommand("css_reset_config", "Resets the plugin config")]
|
||||
public void OnResetConfig(CCSPlayerController? player, CommandInfo commandInfo)
|
||||
{
|
||||
commandInfo.ReplyToCommand("Chat Interval before reset: " + Config.ChatInterval);
|
||||
Config.ChatInterval = 60;
|
||||
Config.Update();
|
||||
commandInfo.ReplyToCommand("Chat Interval after reset: " + Config.ChatInterval);
|
||||
}
|
||||
}
|
||||
|
||||
Submodule libraries/Protobufs updated: 3d85413bf7...53da9bc320
Submodule libraries/hl2sdk-cs2 updated: a26ca82e87...84a823db04
12818
libraries/httplib/httplib.h
Normal file
12818
libraries/httplib/httplib.h
Normal file
File diff suppressed because it is too large
Load Diff
Submodule libraries/metamod-source updated: 607301adc3...4399ff0fd4
@@ -14,7 +14,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof -Wno-reorder")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=sse -msse -fno-strict-aliasing")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-threadsafe-statics -v -fvisibility=default")
|
||||
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--exclude-libs=libprotobuf.a")
|
||||
|
||||
set(
|
||||
|
||||
@@ -35,10 +35,10 @@ else()
|
||||
add_definitions(-DGITHUB_SHA="Local")
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{BUILD_NUMBER})
|
||||
add_definitions(-DBUILD_NUMBER="$ENV{BUILD_NUMBER}")
|
||||
if(DEFINED ENV{SEMVER})
|
||||
add_definitions(-DSEMVER="$ENV{SEMVER}")
|
||||
else()
|
||||
add_definitions(-DBUILD_NUMBER="0")
|
||||
add_definitions(-DSEMVER="Local")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
@@ -58,7 +58,6 @@ include_directories(
|
||||
${SOURCESDK}/public/tier1
|
||||
${SOURCESDK}/public/entity2
|
||||
${SOURCESDK}/public/game/server
|
||||
${SOURCESDK}/public/entity2
|
||||
${SOURCESDK}/public/schemasystem
|
||||
${METAMOD_DIR}/core
|
||||
${METAMOD_DIR}/core/sourcehook
|
||||
|
||||
@@ -11,8 +11,10 @@ using CounterStrikeSharp.API.Core.Plugin;
|
||||
using CounterStrikeSharp.API.Core.Plugin.Host;
|
||||
using CounterStrikeSharp.API.Core.Translations;
|
||||
using CounterStrikeSharp.API.Modules.Admin;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Serilog;
|
||||
|
||||
@@ -44,7 +46,11 @@ public static class Bootstrap
|
||||
services.AddSingleton<IPluginManager, PluginManager>();
|
||||
services.AddSingleton<IPlayerLanguageManager, PlayerLanguageManager>();
|
||||
services.AddScoped<IPluginContextQueryHandler, PluginContextQueryHandler>();
|
||||
services.AddSingleton<ICommandManager, CommandManager>();
|
||||
services.AddSingleton<ICommandManager, CommandManager>();
|
||||
|
||||
services.TryAddSingleton<IStringLocalizerFactory, CoreJsonStringLocalizerFactory>();
|
||||
services.TryAddTransient(typeof(IStringLocalizer<>), typeof(StringLocalizer<>));
|
||||
services.TryAddTransient(typeof(IStringLocalizer), typeof(StringLocalizer));
|
||||
|
||||
services.Scan(i => i.FromCallingAssembly()
|
||||
.AddClasses(c => c.AssignableTo<IStartupService>())
|
||||
@@ -71,4 +77,4 @@ public static class Bootstrap
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@ using CounterStrikeSharp.API.Modules.Utils;
|
||||
namespace CounterStrikeSharp.API.Core
|
||||
{
|
||||
public class NativeAPI {
|
||||
|
||||
|
||||
public static bool AddListener(string name, InputArgument callback){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
@@ -218,6 +218,288 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetConvarFlags(ushort convar, ulong flags){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(convar);
|
||||
ScriptContext.GlobalScriptContext.Push(flags);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0xB2BDCCBF);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static ulong GetConvarFlags(ushort convar){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(convar);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x94829E2B);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (ulong)ScriptContext.GlobalScriptContext.GetResult(typeof(ulong));
|
||||
}
|
||||
}
|
||||
|
||||
public static short GetConvarType(ushort convar){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(convar);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0xB6E0E54C);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (short)ScriptContext.GlobalScriptContext.GetResult(typeof(short));
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetConvarName(ushort convar){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(convar);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0xB6F0E2F3);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (string)ScriptContext.GlobalScriptContext.GetResult(typeof(string));
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetConvarHelpText(ushort convar){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(convar);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x341D1F67);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (string)ScriptContext.GlobalScriptContext.GetResult(typeof(string));
|
||||
}
|
||||
}
|
||||
|
||||
public static ushort GetConvarAccessIndexByName(string name){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(name);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x6288420D);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (ushort)ScriptContext.GlobalScriptContext.GetResult(typeof(ushort));
|
||||
}
|
||||
}
|
||||
|
||||
public static T GetConvarValue<T>(ushort convar){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(convar);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x935B2E9F);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (T)ScriptContext.GlobalScriptContext.GetResult(typeof(T));
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetConvarValueAsString(ushort convar){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(convar);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x5CC184F8);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (string)ScriptContext.GlobalScriptContext.GetResult(typeof(string));
|
||||
}
|
||||
}
|
||||
|
||||
public static IntPtr GetConvarValueAddress(ushort convar){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(convar);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0xECC4CC16);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (IntPtr)ScriptContext.GlobalScriptContext.GetResult(typeof(IntPtr));
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetConvarValueAsString(ushort convar, string value){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(convar);
|
||||
ScriptContext.GlobalScriptContext.Push(value);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x5EF52D6C);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetConvarValue<T>(ushort convar, T value){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(convar);
|
||||
ScriptContext.GlobalScriptContext.Push(value);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0xB3DDAA0B);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static ushort CreateConvar<T>(string name, short type, string helptext, ulong flags, bool hasmin, bool hasmax, T defaultvalue, T minvalue, T maxvalue){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(name);
|
||||
ScriptContext.GlobalScriptContext.Push(type);
|
||||
ScriptContext.GlobalScriptContext.Push(helptext);
|
||||
ScriptContext.GlobalScriptContext.Push(flags);
|
||||
ScriptContext.GlobalScriptContext.Push(hasmin);
|
||||
ScriptContext.GlobalScriptContext.Push(hasmax);
|
||||
ScriptContext.GlobalScriptContext.Push(defaultvalue);
|
||||
ScriptContext.GlobalScriptContext.Push(minvalue);
|
||||
ScriptContext.GlobalScriptContext.Push(maxvalue);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0xF22079B9);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (ushort)ScriptContext.GlobalScriptContext.GetResult(typeof(ushort));
|
||||
}
|
||||
}
|
||||
|
||||
public static void DeleteConvar(ushort convar){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(convar);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0xFC28F444);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetStringFromSymbolLarge(IntPtr pointer){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(pointer);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x600A804B);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (string)ScriptContext.GlobalScriptContext.GetResult(typeof(string));
|
||||
}
|
||||
}
|
||||
|
||||
public static uint GetVariantType(IntPtr pvariant){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(pvariant);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x7AC3DA1C);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (uint)ScriptContext.GlobalScriptContext.GetResult(typeof(uint));
|
||||
}
|
||||
}
|
||||
|
||||
public static int GetVariantInt(IntPtr pvariant){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(pvariant);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x78156617);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (int)ScriptContext.GlobalScriptContext.GetResult(typeof(int));
|
||||
}
|
||||
}
|
||||
|
||||
public static uint GetVariantUint(IntPtr pvariant){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(pvariant);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x7AC49FA2);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (uint)ScriptContext.GlobalScriptContext.GetResult(typeof(uint));
|
||||
}
|
||||
}
|
||||
|
||||
public static float GetVariantFloat(IntPtr pvariant){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(pvariant);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0xD20595B4);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (float)ScriptContext.GlobalScriptContext.GetResult(typeof(float));
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetVariantString(IntPtr pvariant){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(pvariant);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x41C49F71);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (string)ScriptContext.GlobalScriptContext.GetResult(typeof(string));
|
||||
}
|
||||
}
|
||||
|
||||
public static bool GetVariantBool(IntPtr pvariant){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(pvariant);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x7ABC76EA);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (bool)ScriptContext.GlobalScriptContext.GetResult(typeof(bool));
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetVariantInt(IntPtr pvariant, int value){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(pvariant);
|
||||
ScriptContext.GlobalScriptContext.Push(value);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x801EC403);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetVariantUint(IntPtr pvariant, uint value){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(pvariant);
|
||||
ScriptContext.GlobalScriptContext.Push(value);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x83EC7436);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetVariantFloat(IntPtr pvariant, float value){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(pvariant);
|
||||
ScriptContext.GlobalScriptContext.Push(value);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x266E8A0);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetVariantString(IntPtr pvariant, string value){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(pvariant);
|
||||
ScriptContext.GlobalScriptContext.Push(value);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x2450A3E5);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetVariantBool(IntPtr pvariant, bool value){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(pvariant);
|
||||
ScriptContext.GlobalScriptContext.Push(value);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x83F1967E);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static T DynamicHookGetReturn<T>(IntPtr hook, int datatype){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
@@ -379,6 +661,16 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
}
|
||||
|
||||
public static void AddResource(string name){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(name);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x3B1DC491);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static bool PrecacheSound(string name, bool preload){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
@@ -593,6 +885,18 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
}
|
||||
|
||||
public static void ClientPrint(int slot, int huddestination, string msg){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(slot);
|
||||
ScriptContext.GlobalScriptContext.Push(huddestination);
|
||||
ScriptContext.GlobalScriptContext.Push(msg);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x8F03FA72);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static IntPtr GetEntityFromIndex(int index){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
@@ -1127,10 +1431,11 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
}
|
||||
|
||||
public static T ExecuteVirtualFunction<T>(IntPtr function, object[] arguments){
|
||||
public static T ExecuteVirtualFunction<T>(IntPtr function, bool bypass, object[] arguments){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(function);
|
||||
ScriptContext.GlobalScriptContext.Push(bypass);
|
||||
foreach (var obj in arguments)
|
||||
{
|
||||
ScriptContext.GlobalScriptContext.Push(obj);
|
||||
@@ -1154,6 +1459,18 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
}
|
||||
|
||||
public static IntPtr FindVirtualTable(string modulepath, string vtablename){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(modulepath);
|
||||
ScriptContext.GlobalScriptContext.Push(vtablename);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0xB4A0F13C);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (IntPtr)ScriptContext.GlobalScriptContext.GetResult(typeof(IntPtr));
|
||||
}
|
||||
}
|
||||
|
||||
public static int GetNetworkVectorSize(IntPtr vec){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
@@ -1261,6 +1578,32 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
}
|
||||
|
||||
public static void SchemaSetStateChanged(IntPtr instance, uint offset, uint arrayindex, uint pathindex){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(instance);
|
||||
ScriptContext.GlobalScriptContext.Push(offset);
|
||||
ScriptContext.GlobalScriptContext.Push(arrayindex);
|
||||
ScriptContext.GlobalScriptContext.Push(pathindex);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x7D697B7C);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static void SchemaNetworkStateChanged(IntPtr instance, uint offset, uint arrayindex, uint pathindex){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(instance);
|
||||
ScriptContext.GlobalScriptContext.Push(offset);
|
||||
ScriptContext.GlobalScriptContext.Push(arrayindex);
|
||||
ScriptContext.GlobalScriptContext.Push(pathindex);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0xBBE9D700);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static IntPtr GetEconItemSystem(){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
@@ -1405,6 +1748,34 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
}
|
||||
|
||||
public static int PbReadbytes(UserMessage message, string name, IntPtr buffer, int size, int index){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(message);
|
||||
ScriptContext.GlobalScriptContext.Push(name);
|
||||
ScriptContext.GlobalScriptContext.Push(buffer);
|
||||
ScriptContext.GlobalScriptContext.Push(size);
|
||||
ScriptContext.GlobalScriptContext.Push(index);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0xECD23703);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (int)ScriptContext.GlobalScriptContext.GetResult(typeof(int));
|
||||
}
|
||||
}
|
||||
|
||||
public static int PbReadbyteslength(UserMessage message, string name, int index){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(message);
|
||||
ScriptContext.GlobalScriptContext.Push(name);
|
||||
ScriptContext.GlobalScriptContext.Push(index);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0xF74C465F);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (int)ScriptContext.GlobalScriptContext.GetResult(typeof(int));
|
||||
}
|
||||
}
|
||||
|
||||
public static int PbGetrepeatedfieldcount(UserMessage message, string name){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
@@ -1482,6 +1853,20 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
}
|
||||
|
||||
public static void PbSetbytes(UserMessage message, string name, IntPtr buffer, int size, int index){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(message);
|
||||
ScriptContext.GlobalScriptContext.Push(name);
|
||||
ScriptContext.GlobalScriptContext.Push(buffer);
|
||||
ScriptContext.GlobalScriptContext.Push(size);
|
||||
ScriptContext.GlobalScriptContext.Push(index);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0xF7C09993);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static void PbAddint(UserMessage message, string name, int value){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
@@ -1542,6 +1927,19 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
}
|
||||
|
||||
public static void PbAddbytes(UserMessage message, string name, IntPtr buffer, int size){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(message);
|
||||
ScriptContext.GlobalScriptContext.Push(name);
|
||||
ScriptContext.GlobalScriptContext.Push(buffer);
|
||||
ScriptContext.GlobalScriptContext.Push(size);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x50DB8210);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static void PbRemoverepeatedfieldvalue(UserMessage message, string name, int index){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CounterStrikeSharp.API.Core.Commands;
|
||||
using CounterStrikeSharp.API.Core.Hosting;
|
||||
using CounterStrikeSharp.API.Core.Plugin;
|
||||
@@ -28,6 +29,7 @@ using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Menu;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core
|
||||
@@ -35,6 +37,8 @@ namespace CounterStrikeSharp.API.Core
|
||||
public sealed class Application
|
||||
{
|
||||
private static Application _instance = null!;
|
||||
public static IStringLocalizer Localizer => Instance._localizer;
|
||||
|
||||
public ILogger Logger { get; }
|
||||
|
||||
public static Application Instance => _instance!;
|
||||
@@ -48,11 +52,12 @@ namespace CounterStrikeSharp.API.Core
|
||||
private readonly IPluginContextQueryHandler _pluginContextQueryHandler;
|
||||
private readonly IPlayerLanguageManager _playerLanguageManager;
|
||||
private readonly ICommandManager _commandManager;
|
||||
private readonly IStringLocalizer _localizer;
|
||||
|
||||
public Application(ILoggerFactory loggerFactory, IScriptHostConfiguration scriptHostConfiguration,
|
||||
GameDataProvider gameDataProvider, CoreConfig coreConfig, IPluginManager pluginManager,
|
||||
IPluginContextQueryHandler pluginContextQueryHandler, IPlayerLanguageManager playerLanguageManager,
|
||||
ICommandManager commandManager)
|
||||
ICommandManager commandManager, IStringLocalizer localizer)
|
||||
{
|
||||
Logger = loggerFactory.CreateLogger("Core");
|
||||
_scriptHostConfiguration = scriptHostConfiguration;
|
||||
@@ -62,11 +67,28 @@ namespace CounterStrikeSharp.API.Core
|
||||
_pluginContextQueryHandler = pluginContextQueryHandler;
|
||||
_playerLanguageManager = playerLanguageManager;
|
||||
_commandManager = commandManager;
|
||||
_localizer = localizer;
|
||||
_instance = this;
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
|
||||
{
|
||||
if ((e.ExceptionObject as Exception) is PluginTerminationException pluginEx)
|
||||
{
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
TaskScheduler.UnobservedTaskException += (sender, e) =>
|
||||
{
|
||||
if (e.Exception.InnerExceptions.Any(ex => ex is PluginTerminationException))
|
||||
{
|
||||
e.SetObserved();
|
||||
}
|
||||
};
|
||||
|
||||
Logger.LogInformation("CounterStrikeSharp is starting up...");
|
||||
|
||||
_coreConfig.Load();
|
||||
@@ -122,123 +144,129 @@ namespace CounterStrikeSharp.API.Core
|
||||
switch (info.GetArg(1))
|
||||
{
|
||||
case "list":
|
||||
{
|
||||
info.ReplyToCommand(
|
||||
$" List of all plugins currently loaded by CounterStrikeSharp: {_pluginManager.GetLoadedPlugins().Count()} plugins loaded.");
|
||||
|
||||
foreach (var plugin in _pluginManager.GetLoadedPlugins())
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.AppendFormat(" [#{0}:{1}]: \"{2}\" ({3})", plugin.PluginId,
|
||||
plugin.State.ToString().ToUpper(), plugin.Plugin?.ModuleName ?? "Unknown",
|
||||
plugin.Plugin?.ModuleVersion ?? "Unknown");
|
||||
if (!string.IsNullOrEmpty(plugin.Plugin?.ModuleAuthor))
|
||||
sb.AppendFormat(" by {0}", plugin.Plugin.ModuleAuthor);
|
||||
if (!string.IsNullOrEmpty(plugin.Plugin?.ModuleDescription))
|
||||
{
|
||||
sb.Append("\n");
|
||||
sb.Append(" ");
|
||||
sb.Append(plugin.Plugin.ModuleDescription);
|
||||
}
|
||||
|
||||
info.ReplyToCommand(sb.ToString());
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case "start":
|
||||
case "load":
|
||||
{
|
||||
if (info.ArgCount < 3)
|
||||
{
|
||||
info.ReplyToCommand(
|
||||
"Valid usage: css_plugins start/load [relative plugin path || absolute plugin path] (e.g \"TestPlugin\", \"plugins/TestPlugin/TestPlugin.dll\")\n");
|
||||
$" List of all plugins currently loaded by CounterStrikeSharp: {_pluginManager.GetLoadedPlugins().Count()} plugins loaded.");
|
||||
|
||||
foreach (var plugin in _pluginManager.GetLoadedPlugins())
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.AppendFormat(" [#{0}:{1}]: \"{2}\" ({3})", plugin.PluginId,
|
||||
plugin.State.ToString().ToUpper(), plugin.Plugin?.ModuleName ?? "Unknown",
|
||||
plugin.Plugin?.ModuleVersion ?? "Unknown");
|
||||
if (!string.IsNullOrEmpty(plugin.Plugin?.ModuleAuthor))
|
||||
sb.AppendFormat(" by {0}", plugin.Plugin.ModuleAuthor);
|
||||
if (!string.IsNullOrEmpty(plugin.Plugin?.ModuleDescription))
|
||||
{
|
||||
sb.Append("\n");
|
||||
sb.Append(" ");
|
||||
sb.Append(plugin.Plugin.ModuleDescription);
|
||||
}
|
||||
|
||||
if (plugin.State == PluginState.Unloaded && !string.IsNullOrEmpty(plugin.TerminationReason))
|
||||
{
|
||||
sb.Append("\n");
|
||||
sb.AppendFormat(" Termination Reason: {0}", plugin.TerminationReason);
|
||||
}
|
||||
|
||||
info.ReplyToCommand(sb.ToString());
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// If our argument doesn't end in ".dll" - try and construct a path similar to PluginName/PluginName.dll.
|
||||
// We'll assume we have a full path if we have ".dll".
|
||||
var path = info.GetArg(2);
|
||||
path = Path.Combine(_scriptHostConfiguration.RootPath, !path.EndsWith(".dll") ? $"plugins/{path}/{path}.dll" : path);
|
||||
|
||||
var plugin = _pluginContextQueryHandler.FindPluginByModulePath(path);
|
||||
|
||||
if (plugin == null)
|
||||
case "start":
|
||||
case "load":
|
||||
{
|
||||
try
|
||||
if (info.ArgCount < 3)
|
||||
{
|
||||
_pluginManager.LoadPlugin(path);
|
||||
plugin = _pluginContextQueryHandler.FindPluginByModulePath(path);
|
||||
info.ReplyToCommand(
|
||||
"Valid usage: css_plugins start/load [relative plugin path || absolute plugin path] (e.g \"TestPlugin\", \"plugins/TestPlugin/TestPlugin.dll\")\n");
|
||||
break;
|
||||
}
|
||||
|
||||
// If our argument doesn't end in ".dll" - try and construct a path similar to PluginName/PluginName.dll.
|
||||
// We'll assume we have a full path if we have ".dll".
|
||||
var path = info.GetArg(2);
|
||||
path = Path.Combine(_scriptHostConfiguration.RootPath, !path.EndsWith(".dll") ? $"plugins/{path}/{path}.dll" : path);
|
||||
|
||||
var plugin = _pluginContextQueryHandler.FindPluginByModulePath(path);
|
||||
|
||||
if (plugin == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
_pluginManager.LoadPlugin(path);
|
||||
plugin = _pluginContextQueryHandler.FindPluginByModulePath(path);
|
||||
plugin.Plugin.OnAllPluginsLoaded(false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
info.ReplyToCommand($"Could not load plugin \"{path}\"");
|
||||
Logger.LogError(e, "Could not load plugin \"{Path}\"", path);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
plugin.Load(false);
|
||||
plugin.Plugin.OnAllPluginsLoaded(false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
info.ReplyToCommand($"Could not load plugin \"{path}\"");
|
||||
Logger.LogError(e, "Could not load plugin \"{Path}\"", path);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
plugin.Load(false);
|
||||
plugin.Plugin.OnAllPluginsLoaded(false);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case "stop":
|
||||
case "unload":
|
||||
{
|
||||
if (info.ArgCount < 3)
|
||||
{
|
||||
info.ReplyToCommand(
|
||||
"Valid usage: css_plugins stop/unload [plugin name || #plugin id] (e.g \"TestPlugin\", \"1\")\n");
|
||||
if (info.ArgCount < 3)
|
||||
{
|
||||
info.ReplyToCommand(
|
||||
"Valid usage: css_plugins stop/unload [plugin name || #plugin id] (e.g \"TestPlugin\", \"1\")\n");
|
||||
break;
|
||||
}
|
||||
|
||||
var pluginIdentifier = info.GetArg(2);
|
||||
string path;
|
||||
path = Path.Combine(_scriptHostConfiguration.RootPath,
|
||||
!pluginIdentifier.EndsWith(".dll") ? $"plugins/{pluginIdentifier}/{pluginIdentifier}.dll" : pluginIdentifier);
|
||||
|
||||
var plugin = _pluginContextQueryHandler.FindPluginByIdOrName(pluginIdentifier)
|
||||
?? _pluginContextQueryHandler.FindPluginByModulePath(path);
|
||||
|
||||
if (plugin == null)
|
||||
{
|
||||
info.ReplyToCommand($"Could not unload plugin \"{pluginIdentifier}\"");
|
||||
break;
|
||||
}
|
||||
|
||||
plugin.Unload(false);
|
||||
break;
|
||||
}
|
||||
|
||||
var pluginIdentifier = info.GetArg(2);
|
||||
string path;
|
||||
path = Path.Combine(_scriptHostConfiguration.RootPath,
|
||||
!pluginIdentifier.EndsWith(".dll") ? $"plugins/{pluginIdentifier}/{pluginIdentifier}.dll" : pluginIdentifier);
|
||||
|
||||
var plugin = _pluginContextQueryHandler.FindPluginByIdOrName(pluginIdentifier)
|
||||
?? _pluginContextQueryHandler.FindPluginByModulePath(path);
|
||||
|
||||
if (plugin == null)
|
||||
{
|
||||
info.ReplyToCommand($"Could not unload plugin \"{pluginIdentifier}\"");
|
||||
break;
|
||||
}
|
||||
|
||||
plugin.Unload(false);
|
||||
break;
|
||||
}
|
||||
|
||||
case "restart":
|
||||
case "reload":
|
||||
{
|
||||
if (info.ArgCount < 3)
|
||||
{
|
||||
info.ReplyToCommand(
|
||||
"Valid usage: css_plugins restart/reload [plugin name || #plugin id] (e.g \"TestPlugin\", \"#1\")\n");
|
||||
if (info.ArgCount < 3)
|
||||
{
|
||||
info.ReplyToCommand(
|
||||
"Valid usage: css_plugins restart/reload [plugin name || #plugin id] (e.g \"TestPlugin\", \"#1\")\n");
|
||||
break;
|
||||
}
|
||||
|
||||
var pluginIdentifier = info.GetArg(2);
|
||||
var plugin = _pluginContextQueryHandler.FindPluginByIdOrName(pluginIdentifier);
|
||||
|
||||
if (plugin == null)
|
||||
{
|
||||
info.ReplyToCommand($"Could not reload plugin \"{pluginIdentifier}\"");
|
||||
break;
|
||||
}
|
||||
|
||||
plugin.Unload(true);
|
||||
plugin.Load(true);
|
||||
plugin.Plugin.OnAllPluginsLoaded(true);
|
||||
break;
|
||||
}
|
||||
|
||||
var pluginIdentifier = info.GetArg(2);
|
||||
var plugin = _pluginContextQueryHandler.FindPluginByIdOrName(pluginIdentifier);
|
||||
|
||||
if (plugin == null)
|
||||
{
|
||||
info.ReplyToCommand($"Could not reload plugin \"{pluginIdentifier}\"");
|
||||
break;
|
||||
}
|
||||
|
||||
plugin.Unload(true);
|
||||
plugin.Load(true);
|
||||
plugin.Plugin.OnAllPluginsLoaded(true);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
info.ReplyToCommand("Valid usage: css_plugins [option]\n" +
|
||||
" list - List all plugins currently loaded.\n" +
|
||||
|
||||
@@ -53,20 +53,27 @@ namespace CounterStrikeSharp.API.Core
|
||||
|
||||
public abstract string ModuleName { get; }
|
||||
public abstract string ModuleVersion { get; }
|
||||
|
||||
|
||||
public virtual string ModuleAuthor { get; }
|
||||
|
||||
|
||||
public virtual string ModuleDescription { get; }
|
||||
|
||||
public string ModulePath { get; set; }
|
||||
|
||||
public string ModuleDirectory => Path.GetDirectoryName(ModulePath);
|
||||
public ILogger Logger { get; set; }
|
||||
|
||||
|
||||
public ICommandManager CommandManager { get; set; }
|
||||
|
||||
public IStringLocalizer Localizer { get; set; }
|
||||
|
||||
|
||||
internal Plugin.ISelfPluginControl SelfControl { get; set; }
|
||||
|
||||
public void TerminateSelf(string reason)
|
||||
{
|
||||
SelfControl?.TerminateSelf(reason);
|
||||
}
|
||||
|
||||
public virtual void Load(bool hotReload)
|
||||
{
|
||||
}
|
||||
@@ -74,7 +81,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
public virtual void Unload(bool hotReload)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public virtual void OnAllPluginsLoaded(bool hotReload)
|
||||
{
|
||||
}
|
||||
@@ -116,7 +123,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
|
||||
public readonly Dictionary<Delegate, CallbackSubscriber> Handlers =
|
||||
new Dictionary<Delegate, CallbackSubscriber>();
|
||||
|
||||
|
||||
public readonly Dictionary<Delegate, CallbackSubscriber> CommandListeners =
|
||||
new Dictionary<Delegate, CallbackSubscriber>();
|
||||
|
||||
@@ -132,7 +139,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
public readonly List<CommandDefinition> CommandDefinitions = new List<CommandDefinition>();
|
||||
|
||||
public readonly List<Timer> Timers = new List<Timer>();
|
||||
|
||||
|
||||
public delegate HookResult GameEventHandler<T>(T @event, GameEventInfo info) where T : GameEvent;
|
||||
|
||||
private void RegisterEventHandlerInternal<T>(string name, GameEventHandler<T> handler, bool post)
|
||||
@@ -156,7 +163,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
var name = typeof(T).GetCustomAttribute<EventNameAttribute>()?.Name;
|
||||
RegisterEventHandlerInternal(name, handler, hookMode == HookMode.Post);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// De-registers a game event handler.
|
||||
/// </summary>
|
||||
@@ -164,7 +171,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
public void DeregisterEventHandler<T>(GameEventHandler<T> handler, HookMode hookMode = HookMode.Post) where T : GameEvent
|
||||
{
|
||||
var name = typeof(T).GetCustomAttribute<EventNameAttribute>()!.Name;
|
||||
|
||||
|
||||
if (!Handlers.TryGetValue(handler, out var subscriber)) return;
|
||||
|
||||
NativeAPI.UnhookEvent(name, subscriber.GetInputArgument(), hookMode == HookMode.Post);
|
||||
@@ -195,7 +202,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
CommandDefinitions.Add(definition);
|
||||
CommandManager.RegisterCommand(definition);
|
||||
}
|
||||
|
||||
|
||||
private void AddCommand(CommandDefinition definition)
|
||||
{
|
||||
CommandDefinitions.Add(definition);
|
||||
@@ -319,9 +326,9 @@ namespace CounterStrikeSharp.API.Core
|
||||
throw new ArgumentException("Listener of type T is invalid and does not have a name attribute",
|
||||
nameof(T));
|
||||
}
|
||||
|
||||
|
||||
if (!Listeners.TryGetValue(handler, out var subscriber)) return;
|
||||
|
||||
|
||||
NativeAPI.RemoveListener(listenerName, subscriber.GetInputArgument());
|
||||
FunctionReference.Remove(subscriber.GetReferenceIdentifier());
|
||||
Listeners.Remove(handler);
|
||||
@@ -408,7 +415,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
.Where(method =>
|
||||
method.GetParameters().FirstOrDefault()?.ParameterType.IsSubclassOf(typeof(GameEvent)) == true)
|
||||
.ToArray();
|
||||
|
||||
|
||||
var listenerHandlers = methods
|
||||
.Where(method => method.GetCustomAttribute(typeof(ListenerHandlerAttribute<>)) != null)
|
||||
.ToArray();
|
||||
@@ -440,7 +447,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
throw new ArgumentException("Listener of type T is invalid and does not have a name attribute",
|
||||
listenerType.Name);
|
||||
|
||||
var listenerDelegate = Delegate.CreateDelegate(listenerType, instance, listnerHandler);
|
||||
var listenerDelegate = Delegate.CreateDelegate(listenerType, instance, listnerHandler);
|
||||
|
||||
registerListener.MakeGenericMethod(listenerType).Invoke(this, [listenerDelegate]);
|
||||
}
|
||||
@@ -502,29 +509,29 @@ namespace CounterStrikeSharp.API.Core
|
||||
{
|
||||
var convars = type
|
||||
.GetFields(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static)
|
||||
.Where(prop => prop.FieldType.IsGenericType &&
|
||||
.Where(prop => prop.FieldType.IsGenericType &&
|
||||
prop.FieldType.GetGenericTypeDefinition() == typeof(FakeConVar<>));
|
||||
|
||||
|
||||
foreach (var prop in convars)
|
||||
{
|
||||
object propValue = prop.GetValue(instance); // FakeConvar<?> instance
|
||||
var propValueType = prop.FieldType.GenericTypeArguments[0];
|
||||
var name = prop.FieldType.GetProperty("Name", BindingFlags.Public | BindingFlags.Instance)
|
||||
.GetValue(propValue);
|
||||
|
||||
|
||||
var description = prop.FieldType.GetProperty("Description", BindingFlags.Public | BindingFlags.Instance)
|
||||
.GetValue(propValue);
|
||||
|
||||
MethodInfo executeCommandMethod = prop.FieldType
|
||||
.GetMethod("ExecuteCommand", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
|
||||
this.AddCommand((string)name, (string) description, (caller, command) =>
|
||||
|
||||
this.AddCommand((string)name, (string)description, (caller, command) =>
|
||||
{
|
||||
executeCommandMethod.Invoke(propValue, new object[] {caller, command});
|
||||
executeCommandMethod.Invoke(propValue, new object[] { caller, command });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Used to bind a fake ConVar to a plugin command. Only required for ConVars that are not public properties of the plugin class.
|
||||
/// </summary>
|
||||
@@ -549,7 +556,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
NativeAPI.HookEntityOutput(classname, outputName, subscriber.GetInputArgument(), mode);
|
||||
EntityOutputHooks[handler] = subscriber;
|
||||
}
|
||||
|
||||
|
||||
public void HookUserMessage(int messageId, UserMessage.UserMessageHandler handler, HookMode mode = HookMode.Pre)
|
||||
{
|
||||
var subscriber = new CallbackSubscriber(handler, handler,
|
||||
@@ -558,7 +565,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
NativeAPI.HookUsermessage(messageId, subscriber.GetInputArgument(), mode);
|
||||
Handlers[handler] = subscriber;
|
||||
}
|
||||
|
||||
|
||||
public void UnhookUserMessage(int messageId, UserMessage.UserMessageHandler handler, HookMode mode = HookMode.Pre)
|
||||
{
|
||||
if (!Handlers.TryGetValue(handler, out var subscriber)) return;
|
||||
@@ -641,7 +648,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
{
|
||||
subscriber.Dispose();
|
||||
}
|
||||
|
||||
|
||||
foreach (var subscriber in CommandListeners.Values)
|
||||
{
|
||||
subscriber.Dispose();
|
||||
|
||||
@@ -53,6 +53,9 @@ namespace CounterStrikeSharp.API.Core
|
||||
[JsonPropertyName("PluginAutoLoadEnabled")]
|
||||
public bool PluginAutoLoadEnabled { get; set; } = true;
|
||||
|
||||
[JsonPropertyName("PluginResolveNugetPackages")]
|
||||
public bool PluginResolveNugetPackages { get; set; }
|
||||
|
||||
[JsonPropertyName("ServerLanguage")]
|
||||
public string ServerLanguage { get; set; } = "en";
|
||||
|
||||
@@ -61,6 +64,12 @@ namespace CounterStrikeSharp.API.Core
|
||||
|
||||
[JsonPropertyName("UnlockConVars")]
|
||||
public bool UnlockConVars { get; set; } = true;
|
||||
|
||||
[JsonPropertyName("AutoUpdateEnabled")]
|
||||
public bool AutoUpdateEnabled { get; set; } = true;
|
||||
|
||||
[JsonPropertyName("AutoUpdateURL")]
|
||||
public string AutoUpdateURL { get; set; } = "http://gamedata.cssharp.dev";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -109,6 +118,8 @@ namespace CounterStrikeSharp.API.Core
|
||||
/// </summary>
|
||||
public static bool PluginAutoLoadEnabled => _coreConfig.PluginAutoLoadEnabled;
|
||||
|
||||
public static bool PluginResolveNugetPackages => _coreConfig.PluginResolveNugetPackages;
|
||||
|
||||
public static string ServerLanguage => _coreConfig.ServerLanguage;
|
||||
|
||||
public static bool UnlockConCommands => _coreConfig.UnlockConCommands;
|
||||
@@ -157,7 +168,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
{
|
||||
var data = JsonSerializer.Deserialize<CoreConfigData>(File.ReadAllText(_coreConfigPath),
|
||||
new JsonSerializerOptions() { ReadCommentHandling = JsonCommentHandling.Skip });
|
||||
|
||||
|
||||
if (data != null)
|
||||
{
|
||||
_coreConfig = data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* This file is part of CounterStrikeSharp.
|
||||
* CounterStrikeSharp is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
using System.Collections.Concurrent;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
@@ -26,7 +27,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
/// </summary>
|
||||
public enum FunctionLifetime
|
||||
{
|
||||
/// <summary>Delegate will be removed after the first invocation.</summary>
|
||||
/// <summary>Delegate will be removed after the first invocation.</summary>
|
||||
SingleUse,
|
||||
|
||||
/// <summary>Delegate will remain in memory for the lifetime of the application (or until <see cref="FunctionReference.Remove"/> is called).</summary>
|
||||
@@ -57,7 +58,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
_targetMethod = method;
|
||||
_nativeCallback = CreateWrappedCallback();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <inheritdoc cref="FunctionLifetime"/>
|
||||
/// </summary>
|
||||
@@ -106,6 +107,11 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if ((e.InnerException ?? e) is Plugin.PluginTerminationException pluginEx)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Application.Instance.Logger.LogError(e, "Error invoking callback");
|
||||
}
|
||||
finally
|
||||
@@ -176,4 +182,4 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -30,4 +30,4 @@ namespace CounterStrikeSharp.API.Core
|
||||
[DllImport(dllPath, EntryPoint = "InvokeNative")]
|
||||
public static extern void InvokeNative(IntPtr ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,5 +34,11 @@ public interface IScriptHostConfiguration
|
||||
/// Gets the absolute path to the directory that contains CounterStrikeSharp game data.
|
||||
/// e.g. /game/csgo/addons/counterstrikesharp/gamedata
|
||||
/// </summary>
|
||||
string GameDataPath { get; }
|
||||
}
|
||||
string GameDataPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the absolute path to the directory that contains CounterStrikeSharp translation files.
|
||||
/// e.g. /game/csgo/addons/counterstrikesharp/lang
|
||||
/// </summary>
|
||||
string LanguagePath { get; }
|
||||
}
|
||||
|
||||
@@ -9,7 +9,8 @@ internal sealed class ScriptHostConfiguration : IScriptHostConfiguration
|
||||
public string PluginPath { get; }
|
||||
public string SharedPath { get; }
|
||||
public string ConfigsPath { get; }
|
||||
public string GameDataPath { get; }
|
||||
public string GameDataPath { get; }
|
||||
public string LanguagePath { get; }
|
||||
|
||||
public ScriptHostConfiguration(IHostEnvironment hostEnvironment)
|
||||
{
|
||||
@@ -17,6 +18,7 @@ internal sealed class ScriptHostConfiguration : IScriptHostConfiguration
|
||||
SharedPath = Path.Join(new[] { hostEnvironment.ContentRootPath, "shared" });
|
||||
PluginPath = Path.Join(new[] { hostEnvironment.ContentRootPath, "plugins" });
|
||||
ConfigsPath = Path.Join(new[] { hostEnvironment.ContentRootPath, "configs" });
|
||||
GameDataPath = Path.Join(new[] { hostEnvironment.ContentRootPath, "gamedata" });
|
||||
GameDataPath = Path.Join(new[] { hostEnvironment.ContentRootPath, "gamedata" });
|
||||
LanguagePath = Path.Join(new[] { hostEnvironment.ContentRootPath, "lang" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ using CounterStrikeSharp.API.Modules.Utils;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core
|
||||
{
|
||||
public class Listeners {
|
||||
|
||||
public class Listeners
|
||||
{
|
||||
/// <summary>
|
||||
/// Called when an entity is spawned.
|
||||
/// </summary>
|
||||
@@ -44,6 +44,18 @@ namespace CounterStrikeSharp.API.Core
|
||||
[ListenerName("OnTick")]
|
||||
public delegate void OnTick();
|
||||
|
||||
/// <summary>
|
||||
/// Called on every server frame before entities think.
|
||||
/// </summary>
|
||||
[ListenerName("OnServerPreEntityThink")]
|
||||
public delegate void OnServerPreEntityThink();
|
||||
|
||||
/// <summary>
|
||||
/// Called on every server frame after entities think.
|
||||
/// </summary>
|
||||
[ListenerName("OnServerPostEntityThink")]
|
||||
public delegate void OnServerPostEntityThink();
|
||||
|
||||
/// <summary>
|
||||
/// Called when a new map is loaded.
|
||||
/// </summary>
|
||||
@@ -107,7 +119,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
/// <param name="playerSlot">The player slot of the authorized client.</param>
|
||||
/// <param name="steamId">The Steam ID of the authorized client.</param>
|
||||
[ListenerName("OnClientAuthorized")]
|
||||
public delegate void OnClientAuthorized(int playerSlot, [CastFrom(typeof(ulong))]SteamID steamId);
|
||||
public delegate void OnClientAuthorized(int playerSlot, [CastFrom(typeof(ulong))] SteamID steamId);
|
||||
|
||||
/// <summary>
|
||||
/// Called when the server is updating the hibernation state.
|
||||
@@ -169,7 +181,26 @@ namespace CounterStrikeSharp.API.Core
|
||||
/// </summary>
|
||||
/// <param name="infoList">Transmit info list</param>
|
||||
[ListenerName("CheckTransmit")]
|
||||
public delegate void CheckTransmit([CastFrom(typeof(nint))]CCheckTransmitInfoList infoList);
|
||||
public delegate void CheckTransmit([CastFrom(typeof(nint))] CCheckTransmitInfoList infoList);
|
||||
|
||||
/// <summary>
|
||||
/// Called in the entity pre-think when the player's buttons have changed.
|
||||
/// </summary>
|
||||
/// <param name="player"></param>
|
||||
/// <param name="pressed"></param>
|
||||
/// <param name="released"></param>
|
||||
[ListenerName("OnPlayerButtonsChanged")]
|
||||
public delegate void OnPlayerButtonsChanged(CCSPlayerController player, PlayerButtons pressed, PlayerButtons released);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Called when a player sends a chat message.
|
||||
/// </summary>
|
||||
/// <param name="player">The player who sent the chat message.</param>
|
||||
/// <param name="message">The content of the chat message.</param>
|
||||
/// <param name="teamChat">If the chat message was sent to team only.</param>
|
||||
[ListenerName("OnPlayerChat")]
|
||||
public delegate void OnPlayerChat(CCSPlayerController player, string message, bool teamChat);
|
||||
|
||||
/// <summary>
|
||||
/// Called when all metamod plugins are loaded.
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
using System;
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using Vector = CounterStrikeSharp.API.Modules.Utils.Vector;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CBaseEntity
|
||||
{
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
/// <exception cref="ArgumentNullException">No valid argument</exception>
|
||||
/// <exception cref="ArgumentNullException">At least one parameter must be specified</exception>
|
||||
public void Teleport(Vector? position = null, QAngle? angles = null, Vector? velocity = null)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
if (position == null && angles == null && velocity == null)
|
||||
throw new ArgumentNullException("No valid argument");
|
||||
throw new ArgumentException("At least one parameter must be specified");
|
||||
|
||||
nint _position = position?.Handle ?? 0;
|
||||
nint _angles = angles?.Handle ?? 0;
|
||||
@@ -25,6 +27,47 @@ public partial class CBaseEntity
|
||||
_angles, _velocity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Teleports the entity to the specified position, angles, and velocity using Vector3 parameters.
|
||||
/// This overload is optimized for memory efficiency by directly working with a Vector3 struct.
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
/// <exception cref="ArgumentException">At least one parameter must be specified</exception>
|
||||
public void Teleport(Vector3? position = null, Vector3? angles = null, Vector3? velocity = null)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
if (position == null && angles == null && velocity == null)
|
||||
throw new ArgumentException("At least one parameter must be specified");
|
||||
|
||||
unsafe
|
||||
{
|
||||
void* positionPtr = null, anglePtr = null, velocityPtr = null;
|
||||
|
||||
if (position.HasValue)
|
||||
{
|
||||
var pos = position.Value;
|
||||
positionPtr = &pos;
|
||||
}
|
||||
|
||||
if (angles.HasValue)
|
||||
{
|
||||
var ang = angles.Value;
|
||||
anglePtr = ∠
|
||||
}
|
||||
|
||||
if (velocity.HasValue)
|
||||
{
|
||||
var vel = velocity.Value;
|
||||
velocityPtr = &vel;
|
||||
}
|
||||
|
||||
VirtualFunction.CreateVoid<IntPtr, IntPtr, IntPtr, IntPtr>(Handle, GameData.GetOffset("CBaseEntity_Teleport"))(Handle,
|
||||
(nint)positionPtr,
|
||||
(nint)anglePtr, (nint)velocityPtr);
|
||||
}
|
||||
}
|
||||
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void DispatchSpawn()
|
||||
{
|
||||
@@ -62,7 +105,7 @@ public partial class CBaseEntity
|
||||
public uint EmitSound(string soundEventName, RecipientFilter? recipients = null, float volume = 1f, float pitch = 0)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
|
||||
if (recipients == null)
|
||||
{
|
||||
recipients = new RecipientFilter();
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
* along with CounterStrikeSharp. If not, see <https://www.gnu.org/licenses/>. *
|
||||
*/
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
using CounterStrikeSharp.API.Modules.Entities.Constants;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
@@ -30,11 +32,27 @@ public partial class CCSGameRules
|
||||
VirtualFunctions.TerminateRound(Handle, roundEndReason, delay, 0, 0);
|
||||
}
|
||||
|
||||
internal CBaseEntity? FindPickerEntityInternal(CBasePlayerController player)
|
||||
{
|
||||
// TODO: TEST!
|
||||
// the third parameter seems to be something like `CDefaultTypedEntityInstanceFilter<CBaseEntity>` but its optional (earlier it was a string?)
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
VirtualFunctionWithReturn<CCSGameRules, CBasePlayerController, IntPtr?, CBaseEntity?> CCSGameRules_FindPickerEntity = new(Handle, GameData.GetOffset("CCSGameRules_FindPickerEntity"));
|
||||
return CCSGameRules_FindPickerEntity.Invoke(this, player, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
VirtualFunctionWithReturn<CCSGameRules, CBasePlayerController, IntPtr?, double, double, CBaseEntity?> CCSGameRules_FindPickerEntity = new(Handle, GameData.GetOffset("CCSGameRules_FindPickerEntity"));
|
||||
return CCSGameRules_FindPickerEntity.Invoke(this, player, null, 0, 0); // on linux we have a fourth and fifth parameter aswell, but they are unused because the condition for them is always unmet.
|
||||
}
|
||||
}
|
||||
|
||||
public T? FindPickerEntity<T>(CBasePlayerController player)
|
||||
where T : CBaseEntity
|
||||
{
|
||||
VirtualFunctionWithReturn<CCSGameRules, CBasePlayerController, CBaseEntity?> CCSGameRules_FindPickerEntity = new (Handle, GameData.GetOffset("CCSGameRules_FindPickerEntity"));
|
||||
CBaseEntity? entity = CCSGameRules_FindPickerEntity.Invoke(this, player);
|
||||
CBaseEntity? entity = FindPickerEntityInternal(player);
|
||||
|
||||
if (entity == null || !entity.IsValid)
|
||||
{
|
||||
|
||||
@@ -50,7 +50,7 @@ public partial class CCSPlayerController
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
VirtualFunctions.ClientPrint(Handle, HudDestination.Chat, message, 0, 0, 0, 0);
|
||||
NativeAPI.ClientPrint(this.Slot, (int)HudDestination.Chat, message);
|
||||
}
|
||||
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
@@ -58,7 +58,7 @@ public partial class CCSPlayerController
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
VirtualFunctions.ClientPrint(Handle, HudDestination.Center, message, 0, 0, 0, 0);
|
||||
NativeAPI.ClientPrint(this.Slot, (int)HudDestination.Center, message);
|
||||
}
|
||||
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
@@ -66,7 +66,7 @@ public partial class CCSPlayerController
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
VirtualFunctions.ClientPrint(Handle, HudDestination.Alert, message, 0, 0, 0, 0);
|
||||
NativeAPI.ClientPrint(this.Slot, (int)HudDestination.Alert, message);
|
||||
}
|
||||
|
||||
public void PrintToCenterHtml(string message) => PrintToCenterHtml(message, 5);
|
||||
|
||||
@@ -13,7 +13,7 @@ public partial class CTakeDamageInfo
|
||||
/// </returns>
|
||||
public HitGroup_t GetHitGroup()
|
||||
{
|
||||
IntPtr v4 = Marshal.ReadIntPtr(Handle, 0x78);
|
||||
IntPtr v4 = Marshal.ReadIntPtr(Handle, GameData.GetOffset("CTakeDamageInfo_HitGroup"));
|
||||
|
||||
if (v4 == nint.Zero)
|
||||
{
|
||||
|
||||
18
managed/CounterStrikeSharp.API/Core/Model/CUtlSymbolLarge.cs
Normal file
18
managed/CounterStrikeSharp.API/Core/Model/CUtlSymbolLarge.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public class CUtlSymbolLarge : NativeObject
|
||||
{
|
||||
public CUtlSymbolLarge(IntPtr pointer) : base(pointer)
|
||||
{
|
||||
}
|
||||
|
||||
public bool IsValid => Handle != IntPtr.Zero;
|
||||
|
||||
public string String
|
||||
{
|
||||
get
|
||||
{
|
||||
return NativeAPI.GetStringFromSymbolLarge(Handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,56 @@
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
using System.Reflection.Metadata;
|
||||
|
||||
/// <summary>
|
||||
/// Placeholder for CVariant
|
||||
/// <see href="https://github.com/alliedmodders/hl2sdk/blob/cs2/public/variant.h"/>
|
||||
/// <remarks>A lot of entity outputs do not use this value</remarks>
|
||||
/// </summary>
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public class CVariant : NativeObject
|
||||
{
|
||||
public CVariant(IntPtr pointer) : base(pointer)
|
||||
{
|
||||
}
|
||||
|
||||
public bool IsValid => Handle != IntPtr.Zero;
|
||||
|
||||
public fieldtype_t FieldType => (fieldtype_t)NativeAPI.GetVariantType(Handle);
|
||||
|
||||
public T Get<T>()
|
||||
{
|
||||
var type = typeof(T);
|
||||
object result = type switch
|
||||
{
|
||||
_ when type == typeof(float) => NativeAPI.GetVariantFloat(Handle),
|
||||
_ when type == typeof(int) => NativeAPI.GetVariantInt(Handle),
|
||||
_ when type == typeof(uint) => NativeAPI.GetVariantUint(Handle),
|
||||
_ when type == typeof(string) => NativeAPI.GetVariantString(Handle),
|
||||
_ when type == typeof(bool) => NativeAPI.GetVariantBool(Handle),
|
||||
_ => throw new NotSupportedException(),
|
||||
};
|
||||
|
||||
return (T)result;
|
||||
}
|
||||
|
||||
public void Set<T>(T value)
|
||||
{
|
||||
var type = typeof(T);
|
||||
switch (type)
|
||||
{
|
||||
case var _ when value is float f:
|
||||
NativeAPI.SetVariantFloat(Handle, f);
|
||||
break;
|
||||
case var _ when value is int i:
|
||||
NativeAPI.SetVariantInt(Handle, i);
|
||||
break;
|
||||
case var _ when value is uint ui:
|
||||
NativeAPI.SetVariantUint(Handle, ui);
|
||||
break;
|
||||
case var _ when value is bool b:
|
||||
NativeAPI.SetVariantBool(Handle, b);
|
||||
break;
|
||||
case var _ when value is string s:
|
||||
NativeAPI.SetVariantString(Handle, s);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace CounterStrikeSharp.API.Core.Plugin.Host;
|
||||
|
||||
public interface IPluginContextDependencyResolver
|
||||
{
|
||||
public string? ResolvePath();
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
using System.Reflection;
|
||||
using Microsoft.Extensions.DependencyModel;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core.Plugin.Host;
|
||||
|
||||
public class PluginContextNuGetDependencyResolver : IPluginContextDependencyResolver
|
||||
{
|
||||
private const string NuGetPackagesEnvName = "NUGET_PACKAGES";
|
||||
|
||||
private readonly string _rootAssemblyName;
|
||||
private readonly string _rootAssemblyPath;
|
||||
private readonly AssemblyName _assemblyName;
|
||||
|
||||
public PluginContextNuGetDependencyResolver(string rootAssemblyName,
|
||||
string rootAssemblyPath,
|
||||
AssemblyName assemblyName)
|
||||
{
|
||||
_rootAssemblyName = rootAssemblyName;
|
||||
_rootAssemblyPath = rootAssemblyPath;
|
||||
_assemblyName = assemblyName;
|
||||
}
|
||||
|
||||
public string? ResolvePath()
|
||||
{
|
||||
var packagesRoot = GetNuGetPackagesRoot();
|
||||
if (string.IsNullOrWhiteSpace(packagesRoot))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var packageName = _assemblyName.Name;
|
||||
if (string.IsNullOrWhiteSpace(packageName))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var dependenciesPath = Path.Combine(_rootAssemblyPath, $"{_rootAssemblyName}.deps.json");
|
||||
if (!File.Exists(dependenciesPath))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
using var dependenciesStream = File.OpenRead(dependenciesPath);
|
||||
|
||||
using var dependencyReader = new DependencyContextJsonReader();
|
||||
var context = dependencyReader.Read(dependenciesStream);
|
||||
|
||||
var dependencyPath = string.Empty;
|
||||
foreach (var dependency in context.RuntimeLibraries)
|
||||
{
|
||||
if (dependency.Name == packageName)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(dependency.Path) || !dependency.RuntimeAssemblyGroups.Any())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var runtimeAssemblyGroup = dependency.RuntimeAssemblyGroups[0];
|
||||
if (!runtimeAssemblyGroup.AssetPaths.Any())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
dependencyPath = Path.Combine(dependency.Path, runtimeAssemblyGroup.AssetPaths[0]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(dependencyPath))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return Path.Combine(packagesRoot, dependencyPath);
|
||||
}
|
||||
|
||||
private static string? GetNuGetPackagesRoot()
|
||||
{
|
||||
var nugetPath = Environment.GetEnvironmentVariable(NuGetPackagesEnvName);
|
||||
if (!string.IsNullOrWhiteSpace(nugetPath) && Directory.Exists(nugetPath))
|
||||
{
|
||||
return nugetPath;
|
||||
}
|
||||
|
||||
var userProfilePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
||||
if (string.IsNullOrWhiteSpace(userProfilePath))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return Path.Combine(userProfilePath, ".nuget", "packages");
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Loader;
|
||||
@@ -36,6 +37,17 @@ public class PluginManager : IPluginManager
|
||||
config => { config.PreferSharedTypes = true; });
|
||||
var assembly = loader.LoadDefaultAssembly();
|
||||
|
||||
if (CoreConfig.PluginResolveNugetPackages)
|
||||
{
|
||||
foreach (var assemblyName in assembly.GetReferencedAssemblies())
|
||||
{
|
||||
if (TryLoadDependency(path, assembly.GetName().Name, assemblyName, out var dependency))
|
||||
{
|
||||
_sharedAssemblies.TryAdd(dependency.GetName().Name, dependency);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_sharedAssemblies[assembly.GetName().Name] = assembly;
|
||||
}
|
||||
|
||||
@@ -46,7 +58,7 @@ public class PluginManager : IPluginManager
|
||||
.Select(dir => Path.Combine(dir, Path.GetFileName(dir) + ".dll"))
|
||||
.Where(File.Exists)
|
||||
.ToArray();
|
||||
|
||||
|
||||
foreach (var sharedAssemblyPath in sharedAssemblyPaths)
|
||||
{
|
||||
try
|
||||
@@ -78,6 +90,11 @@ public class PluginManager : IPluginManager
|
||||
|
||||
if (!_sharedAssemblies.TryGetValue(name.Name, out var assembly))
|
||||
{
|
||||
if (CoreConfig.PluginResolveNugetPackages && TryLoadExternalLibrary(name, out assembly))
|
||||
{
|
||||
return assembly;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -98,7 +115,7 @@ public class PluginManager : IPluginManager
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach (var plugin in _loadedPluginContexts)
|
||||
{
|
||||
try
|
||||
@@ -112,6 +129,57 @@ public class PluginManager : IPluginManager
|
||||
}
|
||||
}
|
||||
|
||||
private bool TryLoadExternalLibrary(AssemblyName assemblyName, out Assembly? assembly)
|
||||
{
|
||||
assembly = null;
|
||||
if (!TryResolveReflectionAssemblyPath(out var pluginName, out var pluginPath))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!TryLoadDependency(pluginPath, pluginName, assemblyName, out assembly))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool TryLoadDependency(string pluginAssemblyPath,
|
||||
string pluginAssemblyName,
|
||||
AssemblyName dependencyAssemblyName,
|
||||
out Assembly? assembly)
|
||||
{
|
||||
assembly = null;
|
||||
|
||||
var dependencyName = dependencyAssemblyName.Name!;
|
||||
if (string.IsNullOrEmpty(pluginAssemblyPath) || _sharedAssemblies.ContainsKey(dependencyName))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var resolver = new PluginContextNuGetDependencyResolver(
|
||||
rootAssemblyName: pluginAssemblyName,
|
||||
rootAssemblyPath: Path.GetDirectoryName(pluginAssemblyPath)!,
|
||||
assemblyName: dependencyAssemblyName);
|
||||
|
||||
var dependencyPath = resolver.ResolvePath();
|
||||
if (string.IsNullOrWhiteSpace(dependencyPath))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var loader = PluginLoader.CreateFromAssemblyFile(dependencyPath, configure: c =>
|
||||
{
|
||||
c.PreferSharedTypes = true;
|
||||
});
|
||||
|
||||
assembly = loader.LoadDefaultAssembly();
|
||||
_sharedAssemblies[dependencyAssemblyName.Name!] = assembly;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public IEnumerable<PluginContext> GetLoadedPlugins()
|
||||
{
|
||||
return _loadedPluginContexts;
|
||||
@@ -124,4 +192,27 @@ public class PluginManager : IPluginManager
|
||||
_loadedPluginContexts.Add(plugin);
|
||||
plugin.Load();
|
||||
}
|
||||
}
|
||||
|
||||
private static bool TryResolveReflectionAssemblyPath(out string? assemblyName, out string? assemblyPath)
|
||||
{
|
||||
assemblyPath = null;
|
||||
assemblyName = null;
|
||||
|
||||
if (AssemblyLoadContext.CurrentContextualReflectionContext is var reflectionContext && reflectionContext is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var mainAssemblyPathField = reflectionContext
|
||||
.GetType()
|
||||
.GetField("_mainAssemblyPath", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
if (mainAssemblyPathField is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
assemblyPath = (string)mainAssemblyPathField.GetValue(reflectionContext)!;
|
||||
return !string.IsNullOrEmpty(assemblyPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,10 +31,17 @@ using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Serilog;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
using System.Threading;
|
||||
using System;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core.Plugin
|
||||
{
|
||||
public class PluginContext : IPluginContext
|
||||
public interface ISelfPluginControl
|
||||
{
|
||||
void TerminateSelf(string reason);
|
||||
}
|
||||
|
||||
public class PluginContext : IPluginContext, ISelfPluginControl
|
||||
{
|
||||
public PluginState State { get; set; } = PluginState.Unregistered;
|
||||
public IPlugin Plugin { get; private set; }
|
||||
@@ -50,10 +57,12 @@ namespace CounterStrikeSharp.API.Core.Plugin
|
||||
private readonly string _path;
|
||||
private readonly FileSystemWatcher _fileWatcher;
|
||||
private readonly IServiceProvider _applicationServiceProvider;
|
||||
|
||||
|
||||
public string FilePath => _path;
|
||||
private IServiceScope _serviceScope;
|
||||
|
||||
public string TerminationReason { get; private set; }
|
||||
|
||||
// TOOD: ServiceCollection
|
||||
private ILogger _logger = CoreLogging.Factory.CreateLogger<PluginContext>();
|
||||
|
||||
@@ -65,7 +74,7 @@ namespace CounterStrikeSharp.API.Core.Plugin
|
||||
_hostConfiguration = hostConfiguration;
|
||||
_path = path;
|
||||
PluginId = id;
|
||||
|
||||
|
||||
Loader = PluginLoader.CreateFromAssemblyFile(path,
|
||||
new[]
|
||||
{
|
||||
@@ -77,7 +86,7 @@ namespace CounterStrikeSharp.API.Core.Plugin
|
||||
config.IsUnloadable = true;
|
||||
config.PreferSharedTypes = true;
|
||||
});
|
||||
|
||||
|
||||
if (CoreConfig.PluginHotReloadEnabled)
|
||||
{
|
||||
_fileWatcher = new FileSystemWatcher
|
||||
@@ -113,14 +122,14 @@ namespace CounterStrikeSharp.API.Core.Plugin
|
||||
Load(hotReload: true);
|
||||
Plugin.OnAllPluginsLoaded(hotReload: true);
|
||||
});
|
||||
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public void Load(bool hotReload = false)
|
||||
{
|
||||
if (State == PluginState.Loaded) return;
|
||||
|
||||
|
||||
using (Loader.EnterContextualReflection())
|
||||
{
|
||||
var defaultAssembly = Loader.LoadDefaultAssembly();
|
||||
@@ -178,7 +187,7 @@ namespace CounterStrikeSharp.API.Core.Plugin
|
||||
method?.Invoke(pluginServiceCollection, new object[] { serviceCollection });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
serviceCollection.AddScoped<ICommandManager>(c => _commandManager);
|
||||
serviceCollection.DecorateSingleton<ICommandManager, PluginCommandManagerDecorator>();
|
||||
|
||||
@@ -215,7 +224,33 @@ namespace CounterStrikeSharp.API.Core.Plugin
|
||||
Plugin.Logger = ServiceProvider.GetRequiredService<ILoggerFactory>().CreateLogger(pluginType);
|
||||
|
||||
Plugin.InitializeConfig(Plugin, pluginType);
|
||||
Plugin.Load(hotReload);
|
||||
|
||||
if (Plugin is BasePlugin basePlugin)
|
||||
{
|
||||
basePlugin.SelfControl = this;
|
||||
}
|
||||
|
||||
this.TerminationReason = string.Empty;
|
||||
try
|
||||
{
|
||||
Plugin.Load(hotReload);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if ((ex.InnerException ?? ex) is PluginTerminationException pluginEx)
|
||||
{
|
||||
_logger.LogCritical("Terminating plugin {Name} with reason: {Reason}", Plugin.ModuleName, pluginEx.TerminationReason);
|
||||
this.TerminationReason = pluginEx.TerminationReason;
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogError(ex, "Failed to load plugin {Name}", Plugin.ModuleName);
|
||||
this.TerminationReason = ex.Message ?? "Unknown";
|
||||
}
|
||||
|
||||
Unload(hotReload);
|
||||
return;
|
||||
}
|
||||
|
||||
_logger.LogInformation("Finished loading plugin {Name}", Plugin.ModuleName);
|
||||
|
||||
@@ -233,12 +268,60 @@ namespace CounterStrikeSharp.API.Core.Plugin
|
||||
|
||||
_logger.LogInformation("Unloading plugin {Name}", Plugin.ModuleName);
|
||||
|
||||
Plugin.Unload(hotReload);
|
||||
|
||||
Plugin.Dispose();
|
||||
_serviceScope.Dispose();
|
||||
try
|
||||
{
|
||||
Plugin.Unload(hotReload);
|
||||
}
|
||||
catch
|
||||
{
|
||||
_logger.LogError("Failed to unload {Name} during error recovery, forcing cleanup", Plugin.ModuleName);
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Plugin.Dispose();
|
||||
_serviceScope.Dispose();
|
||||
}
|
||||
|
||||
_logger.LogInformation("Finished unloading plugin {Name}", cachedName);
|
||||
}
|
||||
|
||||
public void TerminateWithReason(string reason)
|
||||
{
|
||||
this.TerminationReason = reason;
|
||||
|
||||
switch (State)
|
||||
{
|
||||
case PluginState.Unloaded:
|
||||
case PluginState.Loading:
|
||||
break;
|
||||
case PluginState.Loaded:
|
||||
_logger.LogInformation("Terminating plugin {Name} with reason: {Reason}", Plugin.ModuleName, reason);
|
||||
Unload(false);
|
||||
break;
|
||||
}
|
||||
|
||||
// Force execution flow interruption via globally-handled exception to prevent stack unwinding
|
||||
throw new PluginTerminationException(reason);
|
||||
}
|
||||
|
||||
void ISelfPluginControl.TerminateSelf(string reason)
|
||||
{
|
||||
if (State != PluginState.Unloaded)
|
||||
{
|
||||
if (Thread.CurrentThread.IsThreadPoolThread)
|
||||
{
|
||||
Server.NextFrame(() => TerminateWithReason(reason));
|
||||
}
|
||||
else
|
||||
{
|
||||
TerminateWithReason(reason);
|
||||
}
|
||||
|
||||
// **Failsafe mechanism** ensures execution termination
|
||||
// Prevents control flow leakage back to plugin execution context
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core.Plugin
|
||||
{
|
||||
public class PluginTerminationException : Exception
|
||||
{
|
||||
public string PluginName { get; }
|
||||
public string TerminationReason { get; }
|
||||
|
||||
public PluginTerminationException(string reason) : base($"Plugin terminated: {reason}")
|
||||
{
|
||||
TerminationReason = reason;
|
||||
}
|
||||
|
||||
public PluginTerminationException(string pluginName, string reason) : base($"Plugin '{pluginName}' terminated: {reason}")
|
||||
{
|
||||
PluginName = pluginName;
|
||||
TerminationReason = reason;
|
||||
}
|
||||
|
||||
public PluginTerminationException(string reason, Exception innerException) : base($"Plugin terminated: {reason}", innerException)
|
||||
{
|
||||
TerminationReason = reason;
|
||||
}
|
||||
|
||||
public PluginTerminationException(string pluginName, string reason, Exception innerException) : base($"Plugin '{pluginName}' terminated: {reason}", innerException)
|
||||
{
|
||||
PluginName = pluginName;
|
||||
TerminationReason = reason;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CAISound : CPointEntity
|
||||
{
|
||||
public CAISound (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_iSoundType
|
||||
[SchemaMember("CAISound", "m_iSoundType")]
|
||||
public ref SoundTypes_t SoundType => ref Schema.GetRef<SoundTypes_t>(this.Handle, "CAISound", "m_iSoundType");
|
||||
|
||||
// m_iSoundFlags
|
||||
[SchemaMember("CAISound", "m_iSoundFlags")]
|
||||
public ref SoundFlags_t SoundFlags => ref Schema.GetRef<SoundFlags_t>(this.Handle, "CAISound", "m_iSoundFlags");
|
||||
|
||||
// m_iVolume
|
||||
[SchemaMember("CAISound", "m_iVolume")]
|
||||
public ref Int32 Volume => ref Schema.GetRef<Int32>(this.Handle, "CAISound", "m_iVolume");
|
||||
|
||||
// m_iSoundIndex
|
||||
[SchemaMember("CAISound", "m_iSoundIndex")]
|
||||
public ref Int32 SoundIndex => ref Schema.GetRef<Int32>(this.Handle, "CAISound", "m_iSoundIndex");
|
||||
|
||||
// m_flDuration
|
||||
[SchemaMember("CAISound", "m_flDuration")]
|
||||
public ref float Duration => ref Schema.GetRef<float>(this.Handle, "CAISound", "m_flDuration");
|
||||
|
||||
// m_iszProxyEntityName
|
||||
[SchemaMember("CAISound", "m_iszProxyEntityName")]
|
||||
public string ProxyEntityName
|
||||
{
|
||||
get { return Schema.GetUtf8String(this.Handle, "CAISound", "m_iszProxyEntityName"); }
|
||||
set { Schema.SetString(this.Handle, "CAISound", "m_iszProxyEntityName", value); }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,6 +26,10 @@ public partial class CAI_Expresser : NativeObject
|
||||
[SchemaMember("CAI_Expresser", "m_flStopTalkTimeWithoutDelay")]
|
||||
public ref float StopTalkTimeWithoutDelay => ref Schema.GetRef<float>(this.Handle, "CAI_Expresser", "m_flStopTalkTimeWithoutDelay");
|
||||
|
||||
// m_flQueuedSpeechTime
|
||||
[SchemaMember("CAI_Expresser", "m_flQueuedSpeechTime")]
|
||||
public ref float QueuedSpeechTime => ref Schema.GetRef<float>(this.Handle, "CAI_Expresser", "m_flQueuedSpeechTime");
|
||||
|
||||
// m_flBlockedTalkTime
|
||||
[SchemaMember("CAI_Expresser", "m_flBlockedTalkTime")]
|
||||
public ref float BlockedTalkTime => ref Schema.GetRef<float>(this.Handle, "CAI_Expresser", "m_flBlockedTalkTime");
|
||||
|
||||
@@ -18,8 +18,4 @@ public partial class CAI_ExpresserWithFollowup : CAI_Expresser
|
||||
{
|
||||
public CAI_ExpresserWithFollowup (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_pPostponedFollowup
|
||||
[SchemaMember("CAI_ExpresserWithFollowup", "m_pPostponedFollowup")]
|
||||
public ResponseFollowup? PostponedFollowup => Schema.GetPointer<ResponseFollowup>(this.Handle, "CAI_ExpresserWithFollowup", "m_pPostponedFollowup");
|
||||
|
||||
}
|
||||
|
||||
@@ -54,6 +54,14 @@ public partial class CBarnLight : CBaseModelEntity
|
||||
[SchemaMember("CBarnLight", "m_nBakedShadowIndex")]
|
||||
public ref Int32 BakedShadowIndex => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nBakedShadowIndex");
|
||||
|
||||
// m_nLightPathUniqueId
|
||||
[SchemaMember("CBarnLight", "m_nLightPathUniqueId")]
|
||||
public ref Int32 LightPathUniqueId => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nLightPathUniqueId");
|
||||
|
||||
// m_nLightMapUniqueId
|
||||
[SchemaMember("CBarnLight", "m_nLightMapUniqueId")]
|
||||
public ref Int32 LightMapUniqueId => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nLightMapUniqueId");
|
||||
|
||||
// m_nLuminaireShape
|
||||
[SchemaMember("CBarnLight", "m_nLuminaireShape")]
|
||||
public ref Int32 LuminaireShape => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nLuminaireShape");
|
||||
@@ -154,6 +162,10 @@ public partial class CBarnLight : CBaseModelEntity
|
||||
[SchemaMember("CBarnLight", "m_bContactShadow")]
|
||||
public ref bool ContactShadow => ref Schema.GetRef<bool>(this.Handle, "CBarnLight", "m_bContactShadow");
|
||||
|
||||
// m_bForceShadowsEnabled
|
||||
[SchemaMember("CBarnLight", "m_bForceShadowsEnabled")]
|
||||
public ref bool ForceShadowsEnabled => ref Schema.GetRef<bool>(this.Handle, "CBarnLight", "m_bForceShadowsEnabled");
|
||||
|
||||
// m_nBounceLight
|
||||
[SchemaMember("CBarnLight", "m_nBounceLight")]
|
||||
public ref Int32 BounceLight => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nBounceLight");
|
||||
|
||||
@@ -54,12 +54,16 @@ public partial class CBaseAnimGraph : CBaseModelEntity
|
||||
[SchemaMember("CBaseAnimGraph", "m_RagdollPose")]
|
||||
public PhysicsRagdollPose_t RagdollPose => Schema.GetDeclaredClass<PhysicsRagdollPose_t>(this.Handle, "CBaseAnimGraph", "m_RagdollPose");
|
||||
|
||||
// m_bRagdollEnabled
|
||||
[SchemaMember("CBaseAnimGraph", "m_bRagdollEnabled")]
|
||||
public ref bool RagdollEnabled => ref Schema.GetRef<bool>(this.Handle, "CBaseAnimGraph", "m_bRagdollEnabled");
|
||||
|
||||
// m_bRagdollClientSide
|
||||
[SchemaMember("CBaseAnimGraph", "m_bRagdollClientSide")]
|
||||
public ref bool RagdollClientSide => ref Schema.GetRef<bool>(this.Handle, "CBaseAnimGraph", "m_bRagdollClientSide");
|
||||
|
||||
// m_nLastDestructiblePartDestroyedAnimgraphSetTick
|
||||
[SchemaMember("CBaseAnimGraph", "m_nLastDestructiblePartDestroyedAnimgraphSetTick")]
|
||||
public ref Int32 LastDestructiblePartDestroyedAnimgraphSetTick => ref Schema.GetRef<Int32>(this.Handle, "CBaseAnimGraph", "m_nLastDestructiblePartDestroyedAnimgraphSetTick");
|
||||
|
||||
// m_xParentedRagdollRootInEntitySpace
|
||||
[SchemaMember("CBaseAnimGraph", "m_xParentedRagdollRootInEntitySpace")]
|
||||
public CTransform XParentedRagdollRootInEntitySpace => Schema.GetDeclaredClass<CTransform>(this.Handle, "CBaseAnimGraph", "m_xParentedRagdollRootInEntitySpace");
|
||||
|
||||
}
|
||||
|
||||
@@ -74,4 +74,36 @@ public partial class CBaseAnimGraphController : CSkeletonAnimationController
|
||||
[SchemaMember("CBaseAnimGraphController", "m_flPrevAnimUpdateTime")]
|
||||
public ref float PrevAnimUpdateTime => ref Schema.GetRef<float>(this.Handle, "CBaseAnimGraphController", "m_flPrevAnimUpdateTime");
|
||||
|
||||
// m_hGraphDefinitionAG2
|
||||
[SchemaMember("CBaseAnimGraphController", "m_hGraphDefinitionAG2")]
|
||||
public CStrongHandle<InfoForResourceTypeCNmGraphDefinition> GraphDefinitionAG2 => Schema.GetDeclaredClass<CStrongHandle<InfoForResourceTypeCNmGraphDefinition>>(this.Handle, "CBaseAnimGraphController", "m_hGraphDefinitionAG2");
|
||||
|
||||
// m_bIsUsingAG2
|
||||
[SchemaMember("CBaseAnimGraphController", "m_bIsUsingAG2")]
|
||||
public ref bool IsUsingAG2 => ref Schema.GetRef<bool>(this.Handle, "CBaseAnimGraphController", "m_bIsUsingAG2");
|
||||
|
||||
// m_serializedPoseRecipeAG2
|
||||
[SchemaMember("CBaseAnimGraphController", "m_serializedPoseRecipeAG2")]
|
||||
public NetworkedVector<byte> SerializedPoseRecipeAG2 => Schema.GetDeclaredClass<NetworkedVector<byte>>(this.Handle, "CBaseAnimGraphController", "m_serializedPoseRecipeAG2");
|
||||
|
||||
// m_nSerializePoseRecipeSizeAG2
|
||||
[SchemaMember("CBaseAnimGraphController", "m_nSerializePoseRecipeSizeAG2")]
|
||||
public ref Int32 SerializePoseRecipeSizeAG2 => ref Schema.GetRef<Int32>(this.Handle, "CBaseAnimGraphController", "m_nSerializePoseRecipeSizeAG2");
|
||||
|
||||
// m_nSerializePoseRecipeVersionAG2
|
||||
[SchemaMember("CBaseAnimGraphController", "m_nSerializePoseRecipeVersionAG2")]
|
||||
public ref Int32 SerializePoseRecipeVersionAG2 => ref Schema.GetRef<Int32>(this.Handle, "CBaseAnimGraphController", "m_nSerializePoseRecipeVersionAG2");
|
||||
|
||||
// m_nGraphCreationFlagsAG2
|
||||
[SchemaMember("CBaseAnimGraphController", "m_nGraphCreationFlagsAG2")]
|
||||
public ref byte GraphCreationFlagsAG2 => ref Schema.GetRef<byte>(this.Handle, "CBaseAnimGraphController", "m_nGraphCreationFlagsAG2");
|
||||
|
||||
// m_nServerGraphDefReloadCountAG2
|
||||
[SchemaMember("CBaseAnimGraphController", "m_nServerGraphDefReloadCountAG2")]
|
||||
public ref Int32 ServerGraphDefReloadCountAG2 => ref Schema.GetRef<Int32>(this.Handle, "CBaseAnimGraphController", "m_nServerGraphDefReloadCountAG2");
|
||||
|
||||
// m_nServerSerializationContextIteration
|
||||
[SchemaMember("CBaseAnimGraphController", "m_nServerSerializationContextIteration")]
|
||||
public ref Int32 ServerSerializationContextIteration => ref Schema.GetRef<Int32>(this.Handle, "CBaseAnimGraphController", "m_nServerSerializationContextIteration");
|
||||
|
||||
}
|
||||
|
||||
@@ -46,10 +46,6 @@ public partial class CBaseCSGrenade : CCSWeaponBase
|
||||
[SchemaMember("CBaseCSGrenade", "m_flThrowStrength")]
|
||||
public ref float ThrowStrength => ref Schema.GetRef<float>(this.Handle, "CBaseCSGrenade", "m_flThrowStrength");
|
||||
|
||||
// m_flThrowStrengthApproach
|
||||
[SchemaMember("CBaseCSGrenade", "m_flThrowStrengthApproach")]
|
||||
public ref float ThrowStrengthApproach => ref Schema.GetRef<float>(this.Handle, "CBaseCSGrenade", "m_flThrowStrengthApproach");
|
||||
|
||||
// m_fDropTime
|
||||
[SchemaMember("CBaseCSGrenade", "m_fDropTime")]
|
||||
public ref float DropTime => ref Schema.GetRef<float>(this.Handle, "CBaseCSGrenade", "m_fDropTime");
|
||||
|
||||
@@ -78,8 +78,8 @@ public partial class CBaseCSGrenadeProjectile : CBaseGrenade
|
||||
[SchemaMember("CBaseCSGrenadeProjectile", "m_nTicksAtZeroVelocity")]
|
||||
public ref Int32 TicksAtZeroVelocity => ref Schema.GetRef<Int32>(this.Handle, "CBaseCSGrenadeProjectile", "m_nTicksAtZeroVelocity");
|
||||
|
||||
// m_bHasEverHitEnemy
|
||||
[SchemaMember("CBaseCSGrenadeProjectile", "m_bHasEverHitEnemy")]
|
||||
public ref bool HasEverHitEnemy => ref Schema.GetRef<bool>(this.Handle, "CBaseCSGrenadeProjectile", "m_bHasEverHitEnemy");
|
||||
// m_bHasEverHitEnemy
|
||||
[SchemaMember("CBaseCSGrenadeProjectile", "m_bHasEverHitEnemy")]
|
||||
public ref bool HasEverHitEnemy => ref Schema.GetRef<bool>(this.Handle, "CBaseCSGrenadeProjectile", "m_bHasEverHitEnemy");
|
||||
|
||||
}
|
||||
|
||||
@@ -34,9 +34,9 @@ public partial class CBaseCombatCharacter : CBaseFlex
|
||||
[SchemaMember("CBaseCombatCharacter", "m_bApplyStressDamage")]
|
||||
public ref bool ApplyStressDamage => ref Schema.GetRef<bool>(this.Handle, "CBaseCombatCharacter", "m_bApplyStressDamage");
|
||||
|
||||
// m_iDamageCount
|
||||
[SchemaMember("CBaseCombatCharacter", "m_iDamageCount")]
|
||||
public ref Int32 DamageCount => ref Schema.GetRef<Int32>(this.Handle, "CBaseCombatCharacter", "m_iDamageCount");
|
||||
// m_bDeathEventsDispatched
|
||||
[SchemaMember("CBaseCombatCharacter", "m_bDeathEventsDispatched")]
|
||||
public ref bool DeathEventsDispatched => ref Schema.GetRef<bool>(this.Handle, "CBaseCombatCharacter", "m_bDeathEventsDispatched");
|
||||
|
||||
// m_strRelationships
|
||||
[SchemaMember("CBaseCombatCharacter", "m_strRelationships")]
|
||||
@@ -54,4 +54,8 @@ public partial class CBaseCombatCharacter : CBaseFlex
|
||||
[SchemaMember("CBaseCombatCharacter", "m_nNavHullIdx")]
|
||||
public ref UInt32 NavHullIdx => ref Schema.GetRef<UInt32>(this.Handle, "CBaseCombatCharacter", "m_nNavHullIdx");
|
||||
|
||||
// m_movementStats
|
||||
[SchemaMember("CBaseCombatCharacter", "m_movementStats")]
|
||||
public CMovementStatsProperty MovementStats => Schema.GetDeclaredClass<CMovementStatsProperty>(this.Handle, "CBaseCombatCharacter", "m_movementStats");
|
||||
|
||||
}
|
||||
|
||||
@@ -46,6 +46,10 @@ public partial class CBaseDoor : CBaseToggle
|
||||
[SchemaMember("CBaseDoor", "m_bIgnoreDebris")]
|
||||
public ref bool IgnoreDebris => ref Schema.GetRef<bool>(this.Handle, "CBaseDoor", "m_bIgnoreDebris");
|
||||
|
||||
// m_bNoNPCs
|
||||
[SchemaMember("CBaseDoor", "m_bNoNPCs")]
|
||||
public ref bool NoNPCs => ref Schema.GetRef<bool>(this.Handle, "CBaseDoor", "m_bNoNPCs");
|
||||
|
||||
// m_eSpawnPosition
|
||||
[SchemaMember("CBaseDoor", "m_eSpawnPosition")]
|
||||
public ref FuncDoorSpawnPos_t SpawnPosition => ref Schema.GetRef<FuncDoorSpawnPos_t>(this.Handle, "CBaseDoor", "m_eSpawnPosition");
|
||||
|
||||
@@ -274,10 +274,22 @@ public partial class CBaseEntity : CEntityInstance
|
||||
[SchemaMember("CBaseEntity", "m_flWaterLevel")]
|
||||
public ref float WaterLevel => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flWaterLevel");
|
||||
|
||||
// m_bGravityDisabled
|
||||
[SchemaMember("CBaseEntity", "m_bGravityDisabled")]
|
||||
public ref bool GravityDisabled => ref Schema.GetRef<bool>(this.Handle, "CBaseEntity", "m_bGravityDisabled");
|
||||
|
||||
// m_bAnimatedEveryTick
|
||||
[SchemaMember("CBaseEntity", "m_bAnimatedEveryTick")]
|
||||
public ref bool AnimatedEveryTick => ref Schema.GetRef<bool>(this.Handle, "CBaseEntity", "m_bAnimatedEveryTick");
|
||||
|
||||
// m_flActualGravityScale
|
||||
[SchemaMember("CBaseEntity", "m_flActualGravityScale")]
|
||||
public ref float ActualGravityScale => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flActualGravityScale");
|
||||
|
||||
// m_bGravityActuallyDisabled
|
||||
[SchemaMember("CBaseEntity", "m_bGravityActuallyDisabled")]
|
||||
public ref bool GravityActuallyDisabled => ref Schema.GetRef<bool>(this.Handle, "CBaseEntity", "m_bGravityActuallyDisabled");
|
||||
|
||||
// m_bDisableLowViolence
|
||||
[SchemaMember("CBaseEntity", "m_bDisableLowViolence")]
|
||||
public ref bool DisableLowViolence => ref Schema.GetRef<bool>(this.Handle, "CBaseEntity", "m_bDisableLowViolence");
|
||||
@@ -326,10 +338,6 @@ public partial class CBaseEntity : CEntityInstance
|
||||
[SchemaMember("CBaseEntity", "m_bLagCompensate")]
|
||||
public ref bool LagCompensate => ref Schema.GetRef<bool>(this.Handle, "CBaseEntity", "m_bLagCompensate");
|
||||
|
||||
// m_flOverriddenFriction
|
||||
[SchemaMember("CBaseEntity", "m_flOverriddenFriction")]
|
||||
public ref float OverriddenFriction => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flOverriddenFriction");
|
||||
|
||||
// m_pBlocker
|
||||
[SchemaMember("CBaseEntity", "m_pBlocker")]
|
||||
public CHandle<CBaseEntity> Blocker => Schema.GetDeclaredClass<CHandle<CBaseEntity>>(this.Handle, "CBaseEntity", "m_pBlocker");
|
||||
@@ -346,4 +354,8 @@ public partial class CBaseEntity : CEntityInstance
|
||||
[SchemaMember("CBaseEntity", "m_nBloodType")]
|
||||
public ref BloodType BloodType => ref Schema.GetRef<BloodType>(this.Handle, "CBaseEntity", "m_nBloodType");
|
||||
|
||||
// m_pPulseGraphInstance
|
||||
[SchemaMember("CBaseEntity", "m_pPulseGraphInstance")]
|
||||
public CPulseGraphInstance_ServerEntity? PulseGraphInstance => Schema.GetPointer<CPulseGraphInstance_ServerEntity>(this.Handle, "CBaseEntity", "m_pPulseGraphInstance");
|
||||
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CBaseFire : CBaseEntity
|
||||
{
|
||||
public CBaseFire (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_flScale
|
||||
[SchemaMember("CBaseFire", "m_flScale")]
|
||||
public ref float Scale => ref Schema.GetRef<float>(this.Handle, "CBaseFire", "m_flScale");
|
||||
|
||||
// m_flStartScale
|
||||
[SchemaMember("CBaseFire", "m_flStartScale")]
|
||||
public ref float StartScale => ref Schema.GetRef<float>(this.Handle, "CBaseFire", "m_flStartScale");
|
||||
|
||||
// m_flScaleTime
|
||||
[SchemaMember("CBaseFire", "m_flScaleTime")]
|
||||
public ref float ScaleTime => ref Schema.GetRef<float>(this.Handle, "CBaseFire", "m_flScaleTime");
|
||||
|
||||
// m_nFlags
|
||||
[SchemaMember("CBaseFire", "m_nFlags")]
|
||||
public ref UInt32 FireFlags => ref Schema.GetRef<UInt32>(this.Handle, "CBaseFire", "m_nFlags");
|
||||
|
||||
}
|
||||
@@ -26,34 +26,66 @@ public partial class CBaseModelEntity : CBaseEntity
|
||||
[SchemaMember("CBaseModelEntity", "m_CHitboxComponent")]
|
||||
public CHitboxComponent CHitboxComponent => Schema.GetDeclaredClass<CHitboxComponent>(this.Handle, "CBaseModelEntity", "m_CHitboxComponent");
|
||||
|
||||
// m_nDestructiblePartInitialStateDestructed0
|
||||
[SchemaMember("CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed0")]
|
||||
public ref HitGroup_t DestructiblePartInitialStateDestructed0 => ref Schema.GetRef<HitGroup_t>(this.Handle, "CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed0");
|
||||
|
||||
// m_nDestructiblePartInitialStateDestructed1
|
||||
[SchemaMember("CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed1")]
|
||||
public ref HitGroup_t DestructiblePartInitialStateDestructed1 => ref Schema.GetRef<HitGroup_t>(this.Handle, "CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed1");
|
||||
|
||||
// m_nDestructiblePartInitialStateDestructed2
|
||||
[SchemaMember("CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed2")]
|
||||
public ref HitGroup_t DestructiblePartInitialStateDestructed2 => ref Schema.GetRef<HitGroup_t>(this.Handle, "CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed2");
|
||||
|
||||
// m_nDestructiblePartInitialStateDestructed3
|
||||
[SchemaMember("CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed3")]
|
||||
public ref HitGroup_t DestructiblePartInitialStateDestructed3 => ref Schema.GetRef<HitGroup_t>(this.Handle, "CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed3");
|
||||
|
||||
// m_nDestructiblePartInitialStateDestructed4
|
||||
[SchemaMember("CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed4")]
|
||||
public ref HitGroup_t DestructiblePartInitialStateDestructed4 => ref Schema.GetRef<HitGroup_t>(this.Handle, "CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed4");
|
||||
|
||||
// m_nLastHitDestructiblePartIndex
|
||||
[SchemaMember("CBaseModelEntity", "m_nLastHitDestructiblePartIndex")]
|
||||
public ref Int32 LastHitDestructiblePartIndex => ref Schema.GetRef<Int32>(this.Handle, "CBaseModelEntity", "m_nLastHitDestructiblePartIndex");
|
||||
|
||||
// m_LastHitGroup
|
||||
[SchemaMember("CBaseModelEntity", "m_LastHitGroup")]
|
||||
public ref HitGroup_t LastHitGroup => ref Schema.GetRef<HitGroup_t>(this.Handle, "CBaseModelEntity", "m_LastHitGroup");
|
||||
|
||||
// m_nDestructiblePartInitialStateDestructed0
|
||||
[SchemaMember("CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed0")]
|
||||
public ref HitGroup_t DestructiblePartInitialStateDestructed0 => ref Schema.GetRef<HitGroup_t>(this.Handle, "CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed0");
|
||||
|
||||
// m_nDestructiblePartInitialStateDestructed1
|
||||
[SchemaMember("CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed1")]
|
||||
public ref HitGroup_t DestructiblePartInitialStateDestructed1 => ref Schema.GetRef<HitGroup_t>(this.Handle, "CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed1");
|
||||
|
||||
// m_nDestructiblePartInitialStateDestructed2
|
||||
[SchemaMember("CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed2")]
|
||||
public ref HitGroup_t DestructiblePartInitialStateDestructed2 => ref Schema.GetRef<HitGroup_t>(this.Handle, "CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed2");
|
||||
|
||||
// m_nDestructiblePartInitialStateDestructed3
|
||||
[SchemaMember("CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed3")]
|
||||
public ref HitGroup_t DestructiblePartInitialStateDestructed3 => ref Schema.GetRef<HitGroup_t>(this.Handle, "CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed3");
|
||||
|
||||
// m_nDestructiblePartInitialStateDestructed4
|
||||
[SchemaMember("CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed4")]
|
||||
public ref HitGroup_t DestructiblePartInitialStateDestructed4 => ref Schema.GetRef<HitGroup_t>(this.Handle, "CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed4");
|
||||
|
||||
// m_nDestructiblePartInitialStateDestructed0_PartIndex
|
||||
[SchemaMember("CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed0_PartIndex")]
|
||||
public ref Int32 DestructiblePartInitialStateDestructed0_PartIndex => ref Schema.GetRef<Int32>(this.Handle, "CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed0_PartIndex");
|
||||
|
||||
// m_nDestructiblePartInitialStateDestructed1_PartIndex
|
||||
[SchemaMember("CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed1_PartIndex")]
|
||||
public ref Int32 DestructiblePartInitialStateDestructed1_PartIndex => ref Schema.GetRef<Int32>(this.Handle, "CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed1_PartIndex");
|
||||
|
||||
// m_nDestructiblePartInitialStateDestructed2_PartIndex
|
||||
[SchemaMember("CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed2_PartIndex")]
|
||||
public ref Int32 DestructiblePartInitialStateDestructed2_PartIndex => ref Schema.GetRef<Int32>(this.Handle, "CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed2_PartIndex");
|
||||
|
||||
// m_nDestructiblePartInitialStateDestructed3_PartIndex
|
||||
[SchemaMember("CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed3_PartIndex")]
|
||||
public ref Int32 DestructiblePartInitialStateDestructed3_PartIndex => ref Schema.GetRef<Int32>(this.Handle, "CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed3_PartIndex");
|
||||
|
||||
// m_nDestructiblePartInitialStateDestructed4_PartIndex
|
||||
[SchemaMember("CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed4_PartIndex")]
|
||||
public ref Int32 DestructiblePartInitialStateDestructed4_PartIndex => ref Schema.GetRef<Int32>(this.Handle, "CBaseModelEntity", "m_nDestructiblePartInitialStateDestructed4_PartIndex");
|
||||
|
||||
// m_pDestructiblePartsSystemComponent
|
||||
[SchemaMember("CBaseModelEntity", "m_pDestructiblePartsSystemComponent")]
|
||||
public CDestructiblePartsComponent? DestructiblePartsSystemComponent => Schema.GetPointer<CDestructiblePartsComponent>(this.Handle, "CBaseModelEntity", "m_pDestructiblePartsSystemComponent");
|
||||
|
||||
// m_LastHitGroup
|
||||
[SchemaMember("CBaseModelEntity", "m_LastHitGroup")]
|
||||
public ref HitGroup_t LastHitGroup => ref Schema.GetRef<HitGroup_t>(this.Handle, "CBaseModelEntity", "m_LastHitGroup");
|
||||
|
||||
// m_sLastDamageSourceName
|
||||
[SchemaMember("CBaseModelEntity", "m_sLastDamageSourceName")]
|
||||
public string LastDamageSourceName
|
||||
{
|
||||
get { return Schema.GetUtf8String(this.Handle, "CBaseModelEntity", "m_sLastDamageSourceName"); }
|
||||
set { Schema.SetString(this.Handle, "CBaseModelEntity", "m_sLastDamageSourceName", value); }
|
||||
}
|
||||
|
||||
// m_vLastDamagePosition
|
||||
[SchemaMember("CBaseModelEntity", "m_vLastDamagePosition")]
|
||||
public Vector LastDamagePosition => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseModelEntity", "m_vLastDamagePosition");
|
||||
|
||||
// m_flDissolveStartTime
|
||||
[SchemaMember("CBaseModelEntity", "m_flDissolveStartTime")]
|
||||
public ref float DissolveStartTime => ref Schema.GetRef<float>(this.Handle, "CBaseModelEntity", "m_flDissolveStartTime");
|
||||
@@ -96,7 +128,7 @@ public partial class CBaseModelEntity : CBaseEntity
|
||||
|
||||
// m_Collision
|
||||
[SchemaMember("CBaseModelEntity", "m_Collision")]
|
||||
public CCollisionProperty Collision => Schema.GetDeclaredClass<CCollisionProperty>(this.Handle, "CBaseModelEntity", "m_Collision");
|
||||
public new CCollisionProperty Collision => Schema.GetDeclaredClass<CCollisionProperty>(this.Handle, "CBaseModelEntity", "m_Collision");
|
||||
|
||||
// m_Glow
|
||||
[SchemaMember("CBaseModelEntity", "m_Glow")]
|
||||
@@ -138,13 +170,13 @@ public partial class CBaseModelEntity : CBaseEntity
|
||||
[SchemaMember("CBaseModelEntity", "m_vDecalForwardAxis")]
|
||||
public Vector DecalForwardAxis => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseModelEntity", "m_vDecalForwardAxis");
|
||||
|
||||
// m_flDecalHealBloodRate
|
||||
[SchemaMember("CBaseModelEntity", "m_flDecalHealBloodRate")]
|
||||
public ref float DecalHealBloodRate => ref Schema.GetRef<float>(this.Handle, "CBaseModelEntity", "m_flDecalHealBloodRate");
|
||||
// m_nDecalMode
|
||||
[SchemaMember("CBaseModelEntity", "m_nDecalMode")]
|
||||
public ref DecalMode_t DecalMode => ref Schema.GetRef<DecalMode_t>(this.Handle, "CBaseModelEntity", "m_nDecalMode");
|
||||
|
||||
// m_flDecalHealHeightRate
|
||||
[SchemaMember("CBaseModelEntity", "m_flDecalHealHeightRate")]
|
||||
public ref float DecalHealHeightRate => ref Schema.GetRef<float>(this.Handle, "CBaseModelEntity", "m_flDecalHealHeightRate");
|
||||
// m_nRequiredDecalMode
|
||||
[SchemaMember("CBaseModelEntity", "m_nRequiredDecalMode")]
|
||||
public ref DecalMode_t RequiredDecalMode => ref Schema.GetRef<DecalMode_t>(this.Handle, "CBaseModelEntity", "m_nRequiredDecalMode");
|
||||
|
||||
// m_ConfigEntitiesToPropagateMaterialDecalsTo
|
||||
[SchemaMember("CBaseModelEntity", "m_ConfigEntitiesToPropagateMaterialDecalsTo")]
|
||||
@@ -154,4 +186,8 @@ public partial class CBaseModelEntity : CBaseEntity
|
||||
[SchemaMember("CBaseModelEntity", "m_vecViewOffset")]
|
||||
public CNetworkViewOffsetVector ViewOffset => Schema.GetDeclaredClass<CNetworkViewOffsetVector>(this.Handle, "CBaseModelEntity", "m_vecViewOffset");
|
||||
|
||||
// m_bvDisabledHitGroups
|
||||
[SchemaMember("CBaseModelEntity", "m_bvDisabledHitGroups")]
|
||||
public Span<UInt32> DisabledHitGroups => Schema.GetFixedArray<UInt32>(this.Handle, "CBaseModelEntity", "m_bvDisabledHitGroups", 1);
|
||||
|
||||
}
|
||||
|
||||
@@ -82,10 +82,6 @@ public partial class CBasePlayerController : CBaseEntity
|
||||
[SchemaMember("CBasePlayerController", "m_bPredict")]
|
||||
public ref bool Predict => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerController", "m_bPredict");
|
||||
|
||||
// m_bAutoKickDisabled
|
||||
[SchemaMember("CBasePlayerController", "m_bAutoKickDisabled")]
|
||||
public ref bool AutoKickDisabled => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerController", "m_bAutoKickDisabled");
|
||||
|
||||
// m_bIsLowViolence
|
||||
[SchemaMember("CBasePlayerController", "m_bIsLowViolence")]
|
||||
public ref bool IsLowViolence => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerController", "m_bIsLowViolence");
|
||||
@@ -118,6 +114,10 @@ public partial class CBasePlayerController : CBaseEntity
|
||||
[SchemaMember("CBasePlayerController", "m_steamID")]
|
||||
public ref UInt64 SteamID => ref Schema.GetRef<UInt64>(this.Handle, "CBasePlayerController", "m_steamID");
|
||||
|
||||
// m_bNoClipEnabled
|
||||
[SchemaMember("CBasePlayerController", "m_bNoClipEnabled")]
|
||||
public ref bool NoClipEnabled => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerController", "m_bNoClipEnabled");
|
||||
|
||||
// m_iDesiredFOV
|
||||
[SchemaMember("CBasePlayerController", "m_iDesiredFOV")]
|
||||
public ref UInt32 DesiredFOV => ref Schema.GetRef<UInt32>(this.Handle, "CBasePlayerController", "m_iDesiredFOV");
|
||||
|
||||
@@ -58,10 +58,6 @@ public partial class CBasePlayerPawn : CBaseCombatCharacter
|
||||
[SchemaMember("CBasePlayerPawn", "m_ServerViewAngleChanges")]
|
||||
public NetworkedVector<ViewAngleServerChange_t> ServerViewAngleChanges => Schema.GetDeclaredClass<NetworkedVector<ViewAngleServerChange_t>>(this.Handle, "CBasePlayerPawn", "m_ServerViewAngleChanges");
|
||||
|
||||
// m_nHighestGeneratedServerViewAngleChangeIndex
|
||||
[SchemaMember("CBasePlayerPawn", "m_nHighestGeneratedServerViewAngleChangeIndex")]
|
||||
public ref UInt32 HighestGeneratedServerViewAngleChangeIndex => ref Schema.GetRef<UInt32>(this.Handle, "CBasePlayerPawn", "m_nHighestGeneratedServerViewAngleChangeIndex");
|
||||
|
||||
// v_angle
|
||||
[SchemaMember("CBasePlayerPawn", "v_angle")]
|
||||
public QAngle V_angle => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBasePlayerPawn", "v_angle");
|
||||
@@ -102,6 +98,10 @@ public partial class CBasePlayerPawn : CBaseCombatCharacter
|
||||
[SchemaMember("CBasePlayerPawn", "m_hController")]
|
||||
public CHandle<CBasePlayerController> Controller => Schema.GetDeclaredClass<CHandle<CBasePlayerController>>(this.Handle, "CBasePlayerPawn", "m_hController");
|
||||
|
||||
// m_hDefaultController
|
||||
[SchemaMember("CBasePlayerPawn", "m_hDefaultController")]
|
||||
public CHandle<CBasePlayerController> DefaultController => Schema.GetDeclaredClass<CHandle<CBasePlayerController>>(this.Handle, "CBasePlayerPawn", "m_hDefaultController");
|
||||
|
||||
// m_fHltvReplayDelay
|
||||
[SchemaMember("CBasePlayerPawn", "m_fHltvReplayDelay")]
|
||||
public ref float HltvReplayDelay => ref Schema.GetRef<float>(this.Handle, "CBasePlayerPawn", "m_fHltvReplayDelay");
|
||||
|
||||
@@ -26,6 +26,26 @@ public partial class CBasePlayerWeaponVData : CEntitySubclassVDataBase
|
||||
[SchemaMember("CBasePlayerWeaponVData", "m_bAllowFlipping")]
|
||||
public ref bool AllowFlipping => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerWeaponVData", "m_bAllowFlipping");
|
||||
|
||||
// m_szMuzzleFlashParticleConfig
|
||||
[SchemaMember("CBasePlayerWeaponVData", "m_szMuzzleFlashParticleConfig")]
|
||||
public string MuzzleFlashParticleConfig
|
||||
{
|
||||
get { return Schema.GetUtf8String(this.Handle, "CBasePlayerWeaponVData", "m_szMuzzleFlashParticleConfig"); }
|
||||
set { Schema.SetString(this.Handle, "CBasePlayerWeaponVData", "m_szMuzzleFlashParticleConfig", value); }
|
||||
}
|
||||
|
||||
// m_nMuzzleSmokeShotThreshold
|
||||
[SchemaMember("CBasePlayerWeaponVData", "m_nMuzzleSmokeShotThreshold")]
|
||||
public ref byte MuzzleSmokeShotThreshold => ref Schema.GetRef<byte>(this.Handle, "CBasePlayerWeaponVData", "m_nMuzzleSmokeShotThreshold");
|
||||
|
||||
// m_flMuzzleSmokeTimeout
|
||||
[SchemaMember("CBasePlayerWeaponVData", "m_flMuzzleSmokeTimeout")]
|
||||
public ref float MuzzleSmokeTimeout => ref Schema.GetRef<float>(this.Handle, "CBasePlayerWeaponVData", "m_flMuzzleSmokeTimeout");
|
||||
|
||||
// m_flMuzzleSmokeDecrementRate
|
||||
[SchemaMember("CBasePlayerWeaponVData", "m_flMuzzleSmokeDecrementRate")]
|
||||
public ref float MuzzleSmokeDecrementRate => ref Schema.GetRef<float>(this.Handle, "CBasePlayerWeaponVData", "m_flMuzzleSmokeDecrementRate");
|
||||
|
||||
// m_bLinkedCooldowns
|
||||
[SchemaMember("CBasePlayerWeaponVData", "m_bLinkedCooldowns")]
|
||||
public ref bool LinkedCooldowns => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerWeaponVData", "m_bLinkedCooldowns");
|
||||
@@ -62,6 +82,14 @@ public partial class CBasePlayerWeaponVData : CEntitySubclassVDataBase
|
||||
[SchemaMember("CBasePlayerWeaponVData", "m_bReserveAmmoAsClips")]
|
||||
public ref bool ReserveAmmoAsClips => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerWeaponVData", "m_bReserveAmmoAsClips");
|
||||
|
||||
// m_bTreatAsSingleClip
|
||||
[SchemaMember("CBasePlayerWeaponVData", "m_bTreatAsSingleClip")]
|
||||
public ref bool TreatAsSingleClip => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerWeaponVData", "m_bTreatAsSingleClip");
|
||||
|
||||
// m_bKeepLoadedAmmo
|
||||
[SchemaMember("CBasePlayerWeaponVData", "m_bKeepLoadedAmmo")]
|
||||
public ref bool KeepLoadedAmmo => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerWeaponVData", "m_bKeepLoadedAmmo");
|
||||
|
||||
// m_iWeight
|
||||
[SchemaMember("CBasePlayerWeaponVData", "m_iWeight")]
|
||||
public ref Int32 Weight => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerWeaponVData", "m_iWeight");
|
||||
@@ -78,6 +106,10 @@ public partial class CBasePlayerWeaponVData : CEntitySubclassVDataBase
|
||||
[SchemaMember("CBasePlayerWeaponVData", "m_iRumbleEffect")]
|
||||
public ref RumbleEffect_t RumbleEffect => ref Schema.GetRef<RumbleEffect_t>(this.Handle, "CBasePlayerWeaponVData", "m_iRumbleEffect");
|
||||
|
||||
// m_flDropSpeed
|
||||
[SchemaMember("CBasePlayerWeaponVData", "m_flDropSpeed")]
|
||||
public ref float DropSpeed => ref Schema.GetRef<float>(this.Handle, "CBasePlayerWeaponVData", "m_flDropSpeed");
|
||||
|
||||
// m_iSlot
|
||||
[SchemaMember("CBasePlayerWeaponVData", "m_iSlot")]
|
||||
public ref Int32 Slot => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerWeaponVData", "m_iSlot");
|
||||
|
||||
@@ -32,6 +32,6 @@ public partial class CBaseProp : CBaseAnimGraph
|
||||
|
||||
// m_mPreferredCatchTransform
|
||||
[SchemaMember("CBaseProp", "m_mPreferredCatchTransform")]
|
||||
public matrix3x4_t MPreferredCatchTransform => Schema.GetDeclaredClass<matrix3x4_t>(this.Handle, "CBaseProp", "m_mPreferredCatchTransform");
|
||||
public CTransform MPreferredCatchTransform => Schema.GetDeclaredClass<CTransform>(this.Handle, "CBaseProp", "m_mPreferredCatchTransform");
|
||||
|
||||
}
|
||||
|
||||
@@ -42,6 +42,10 @@ public partial class CBasePropDoor : CDynamicProp
|
||||
[SchemaMember("CBasePropDoor", "m_bLocked")]
|
||||
public ref bool Locked => ref Schema.GetRef<bool>(this.Handle, "CBasePropDoor", "m_bLocked");
|
||||
|
||||
// m_bNoNPCs
|
||||
[SchemaMember("CBasePropDoor", "m_bNoNPCs")]
|
||||
public ref bool NoNPCs => ref Schema.GetRef<bool>(this.Handle, "CBasePropDoor", "m_bNoNPCs");
|
||||
|
||||
// m_closedPosition
|
||||
[SchemaMember("CBasePropDoor", "m_closedPosition")]
|
||||
public Vector ClosedPosition => Schema.GetDeclaredClass<Vector>(this.Handle, "CBasePropDoor", "m_closedPosition");
|
||||
@@ -52,7 +56,7 @@ public partial class CBasePropDoor : CDynamicProp
|
||||
|
||||
// m_hBlocker
|
||||
[SchemaMember("CBasePropDoor", "m_hBlocker")]
|
||||
public CHandle<CBaseEntity> Blocker => Schema.GetDeclaredClass<CHandle<CBaseEntity>>(this.Handle, "CBasePropDoor", "m_hBlocker");
|
||||
public new CHandle<CBaseEntity> Blocker => Schema.GetDeclaredClass<CHandle<CBaseEntity>>(this.Handle, "CBasePropDoor", "m_hBlocker");
|
||||
|
||||
// m_bFirstBlocked
|
||||
[SchemaMember("CBasePropDoor", "m_bFirstBlocked")]
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CBumpMine : CCSWeaponBase
|
||||
{
|
||||
public CBumpMine (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
}
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CBasePulseGraphInstance : NativeObject
|
||||
{
|
||||
public CBasePulseGraphInstance (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
}
|
||||
@@ -18,22 +18,6 @@ public partial class CBaseTrigger : CBaseToggle
|
||||
{
|
||||
public CBaseTrigger (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_bDisabled
|
||||
[SchemaMember("CBaseTrigger", "m_bDisabled")]
|
||||
public ref bool Disabled => ref Schema.GetRef<bool>(this.Handle, "CBaseTrigger", "m_bDisabled");
|
||||
|
||||
// m_iFilterName
|
||||
[SchemaMember("CBaseTrigger", "m_iFilterName")]
|
||||
public string FilterName
|
||||
{
|
||||
get { return Schema.GetUtf8String(this.Handle, "CBaseTrigger", "m_iFilterName"); }
|
||||
set { Schema.SetString(this.Handle, "CBaseTrigger", "m_iFilterName", value); }
|
||||
}
|
||||
|
||||
// m_hFilter
|
||||
[SchemaMember("CBaseTrigger", "m_hFilter")]
|
||||
public CHandle<CBaseFilter> Filter => Schema.GetDeclaredClass<CHandle<CBaseFilter>>(this.Handle, "CBaseTrigger", "m_hFilter");
|
||||
|
||||
// m_OnStartTouch
|
||||
[SchemaMember("CBaseTrigger", "m_OnStartTouch")]
|
||||
public CEntityIOOutput OnStartTouch => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseTrigger", "m_OnStartTouch");
|
||||
@@ -66,8 +50,24 @@ public partial class CBaseTrigger : CBaseToggle
|
||||
[SchemaMember("CBaseTrigger", "m_hTouchingEntities")]
|
||||
public NetworkedVector<CHandle<CBaseEntity>> TouchingEntities => Schema.GetDeclaredClass<NetworkedVector<CHandle<CBaseEntity>>>(this.Handle, "CBaseTrigger", "m_hTouchingEntities");
|
||||
|
||||
// m_bClientSidePredicted
|
||||
[SchemaMember("CBaseTrigger", "m_bClientSidePredicted")]
|
||||
public ref bool ClientSidePredicted => ref Schema.GetRef<bool>(this.Handle, "CBaseTrigger", "m_bClientSidePredicted");
|
||||
// m_iFilterName
|
||||
[SchemaMember("CBaseTrigger", "m_iFilterName")]
|
||||
public string FilterName
|
||||
{
|
||||
get { return Schema.GetUtf8String(this.Handle, "CBaseTrigger", "m_iFilterName"); }
|
||||
set { Schema.SetString(this.Handle, "CBaseTrigger", "m_iFilterName", value); }
|
||||
}
|
||||
|
||||
// m_hFilter
|
||||
[SchemaMember("CBaseTrigger", "m_hFilter")]
|
||||
public CHandle<CBaseFilter> Filter => Schema.GetDeclaredClass<CHandle<CBaseFilter>>(this.Handle, "CBaseTrigger", "m_hFilter");
|
||||
|
||||
// m_bDisabled
|
||||
[SchemaMember("CBaseTrigger", "m_bDisabled")]
|
||||
public ref bool Disabled => ref Schema.GetRef<bool>(this.Handle, "CBaseTrigger", "m_bDisabled");
|
||||
|
||||
// m_bUseAsyncQueries
|
||||
[SchemaMember("CBaseTrigger", "m_bUseAsyncQueries")]
|
||||
public ref bool UseAsyncQueries => ref Schema.GetRef<bool>(this.Handle, "CBaseTrigger", "m_bUseAsyncQueries");
|
||||
|
||||
}
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CBaseViewModel : CBaseAnimGraph
|
||||
{
|
||||
public CBaseViewModel (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_vecLastFacing
|
||||
[SchemaMember("CBaseViewModel", "m_vecLastFacing")]
|
||||
public Vector LastFacing => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseViewModel", "m_vecLastFacing");
|
||||
|
||||
// m_nViewModelIndex
|
||||
[SchemaMember("CBaseViewModel", "m_nViewModelIndex")]
|
||||
public ref UInt32 ViewModelIndex => ref Schema.GetRef<UInt32>(this.Handle, "CBaseViewModel", "m_nViewModelIndex");
|
||||
|
||||
// m_nAnimationParity
|
||||
[SchemaMember("CBaseViewModel", "m_nAnimationParity")]
|
||||
public ref UInt32 AnimationParity => ref Schema.GetRef<UInt32>(this.Handle, "CBaseViewModel", "m_nAnimationParity");
|
||||
|
||||
// m_flAnimationStartTime
|
||||
[SchemaMember("CBaseViewModel", "m_flAnimationStartTime")]
|
||||
public ref float AnimationStartTime => ref Schema.GetRef<float>(this.Handle, "CBaseViewModel", "m_flAnimationStartTime");
|
||||
|
||||
// m_hWeapon
|
||||
[SchemaMember("CBaseViewModel", "m_hWeapon")]
|
||||
public CHandle<CBasePlayerWeapon> Weapon => Schema.GetDeclaredClass<CHandle<CBasePlayerWeapon>>(this.Handle, "CBaseViewModel", "m_hWeapon");
|
||||
|
||||
// m_sVMName
|
||||
[SchemaMember("CBaseViewModel", "m_sVMName")]
|
||||
public string VMName
|
||||
{
|
||||
get { return Schema.GetUtf8String(this.Handle, "CBaseViewModel", "m_sVMName"); }
|
||||
set { Schema.SetString(this.Handle, "CBaseViewModel", "m_sVMName", value); }
|
||||
}
|
||||
|
||||
// m_sAnimationPrefix
|
||||
[SchemaMember("CBaseViewModel", "m_sAnimationPrefix")]
|
||||
public string AnimationPrefix
|
||||
{
|
||||
get { return Schema.GetUtf8String(this.Handle, "CBaseViewModel", "m_sAnimationPrefix"); }
|
||||
set { Schema.SetString(this.Handle, "CBaseViewModel", "m_sAnimationPrefix", value); }
|
||||
}
|
||||
|
||||
// m_hOldLayerSequence
|
||||
[SchemaMember("CBaseViewModel", "m_hOldLayerSequence")]
|
||||
public ref Int32 OldLayerSequence => ref Schema.GetRef<Int32>(this.Handle, "CBaseViewModel", "m_hOldLayerSequence");
|
||||
|
||||
// m_oldLayer
|
||||
[SchemaMember("CBaseViewModel", "m_oldLayer")]
|
||||
public ref Int32 OldLayer => ref Schema.GetRef<Int32>(this.Handle, "CBaseViewModel", "m_oldLayer");
|
||||
|
||||
// m_oldLayerStartTime
|
||||
[SchemaMember("CBaseViewModel", "m_oldLayerStartTime")]
|
||||
public ref float OldLayerStartTime => ref Schema.GetRef<float>(this.Handle, "CBaseViewModel", "m_oldLayerStartTime");
|
||||
|
||||
// m_hControlPanel
|
||||
[SchemaMember("CBaseViewModel", "m_hControlPanel")]
|
||||
public CHandle<CBaseEntity> ControlPanel => Schema.GetDeclaredClass<CHandle<CBaseEntity>>(this.Handle, "CBaseViewModel", "m_hControlPanel");
|
||||
|
||||
}
|
||||
@@ -88,7 +88,7 @@ public partial class CBeam : CBaseModelEntity
|
||||
|
||||
// m_fSpeed
|
||||
[SchemaMember("CBeam", "m_fSpeed")]
|
||||
public ref float Speed => ref Schema.GetRef<float>(this.Handle, "CBeam", "m_fSpeed");
|
||||
public new ref float Speed => ref Schema.GetRef<float>(this.Handle, "CBeam", "m_fSpeed");
|
||||
|
||||
// m_flFrame
|
||||
[SchemaMember("CBeam", "m_flFrame")]
|
||||
|
||||
@@ -20,6 +20,6 @@ public partial class CBodyComponentPoint : CBodyComponent
|
||||
|
||||
// m_sceneNode
|
||||
[SchemaMember("CBodyComponentPoint", "m_sceneNode")]
|
||||
public CGameSceneNode SceneNode => Schema.GetDeclaredClass<CGameSceneNode>(this.Handle, "CBodyComponentPoint", "m_sceneNode");
|
||||
public new CGameSceneNode SceneNode => Schema.GetDeclaredClass<CGameSceneNode>(this.Handle, "CBodyComponentPoint", "m_sceneNode");
|
||||
|
||||
}
|
||||
|
||||
@@ -22,6 +22,10 @@ public partial class CBreakableProp : CBaseProp
|
||||
[SchemaMember("CBreakableProp", "m_CPropDataComponent")]
|
||||
public CPropDataComponent CPropDataComponent => Schema.GetDeclaredClass<CPropDataComponent>(this.Handle, "CBreakableProp", "m_CPropDataComponent");
|
||||
|
||||
// m_OnStartDeath
|
||||
[SchemaMember("CBreakableProp", "m_OnStartDeath")]
|
||||
public CEntityIOOutput OnStartDeath => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBreakableProp", "m_OnStartDeath");
|
||||
|
||||
// m_OnBreak
|
||||
[SchemaMember("CBreakableProp", "m_OnBreak")]
|
||||
public CEntityIOOutput OnBreak => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBreakableProp", "m_OnBreak");
|
||||
@@ -142,10 +146,6 @@ public partial class CBreakableProp : CBaseProp
|
||||
[SchemaMember("CBreakableProp", "m_flLastPhysicsInfluenceTime")]
|
||||
public ref float LastPhysicsInfluenceTime => ref Schema.GetRef<float>(this.Handle, "CBreakableProp", "m_flLastPhysicsInfluenceTime");
|
||||
|
||||
// m_bOriginalBlockLOS
|
||||
[SchemaMember("CBreakableProp", "m_bOriginalBlockLOS")]
|
||||
public ref bool OriginalBlockLOS => ref Schema.GetRef<bool>(this.Handle, "CBreakableProp", "m_bOriginalBlockLOS");
|
||||
|
||||
// m_flDefaultFadeScale
|
||||
[SchemaMember("CBreakableProp", "m_flDefaultFadeScale")]
|
||||
public ref float DefaultFadeScale => ref Schema.GetRef<float>(this.Handle, "CBreakableProp", "m_flDefaultFadeScale");
|
||||
@@ -154,14 +154,6 @@ public partial class CBreakableProp : CBaseProp
|
||||
[SchemaMember("CBreakableProp", "m_hLastAttacker")]
|
||||
public CHandle<CBaseEntity> LastAttacker => Schema.GetDeclaredClass<CHandle<CBaseEntity>>(this.Handle, "CBreakableProp", "m_hLastAttacker");
|
||||
|
||||
// m_hFlareEnt
|
||||
[SchemaMember("CBreakableProp", "m_hFlareEnt")]
|
||||
public CHandle<CBaseEntity> FlareEnt => Schema.GetDeclaredClass<CHandle<CBaseEntity>>(this.Handle, "CBreakableProp", "m_hFlareEnt");
|
||||
|
||||
// m_bUsePuntSound
|
||||
[SchemaMember("CBreakableProp", "m_bUsePuntSound")]
|
||||
public ref bool UsePuntSound => ref Schema.GetRef<bool>(this.Handle, "CBreakableProp", "m_bUsePuntSound");
|
||||
|
||||
// m_iszPuntSound
|
||||
[SchemaMember("CBreakableProp", "m_iszPuntSound")]
|
||||
public string PuntSound
|
||||
@@ -170,8 +162,12 @@ public partial class CBreakableProp : CBaseProp
|
||||
set { Schema.SetString(this.Handle, "CBreakableProp", "m_iszPuntSound", value); }
|
||||
}
|
||||
|
||||
// m_noGhostCollision
|
||||
[SchemaMember("CBreakableProp", "m_noGhostCollision")]
|
||||
public ref bool NoGhostCollision => ref Schema.GetRef<bool>(this.Handle, "CBreakableProp", "m_noGhostCollision");
|
||||
// m_bUsePuntSound
|
||||
[SchemaMember("CBreakableProp", "m_bUsePuntSound")]
|
||||
public ref bool UsePuntSound => ref Schema.GetRef<bool>(this.Handle, "CBreakableProp", "m_bUsePuntSound");
|
||||
|
||||
// m_bOriginalBlockLOS
|
||||
[SchemaMember("CBreakableProp", "m_bOriginalBlockLOS")]
|
||||
public ref bool OriginalBlockLOS => ref Schema.GetRef<bool>(this.Handle, "CBreakableProp", "m_bOriginalBlockLOS");
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CBubbling : CBaseModelEntity
|
||||
{
|
||||
public CBubbling (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_density
|
||||
[SchemaMember("CBubbling", "m_density")]
|
||||
public ref Int32 Density => ref Schema.GetRef<Int32>(this.Handle, "CBubbling", "m_density");
|
||||
|
||||
// m_frequency
|
||||
[SchemaMember("CBubbling", "m_frequency")]
|
||||
public ref Int32 Frequency => ref Schema.GetRef<Int32>(this.Handle, "CBubbling", "m_frequency");
|
||||
|
||||
// m_state
|
||||
[SchemaMember("CBubbling", "m_state")]
|
||||
public ref Int32 State => ref Schema.GetRef<Int32>(this.Handle, "CBubbling", "m_state");
|
||||
|
||||
}
|
||||
@@ -26,6 +26,22 @@ public partial class CBuoyancyHelper : NativeObject
|
||||
[SchemaMember("CBuoyancyHelper", "m_flFluidDensity")]
|
||||
public ref float FluidDensity => ref Schema.GetRef<float>(this.Handle, "CBuoyancyHelper", "m_flFluidDensity");
|
||||
|
||||
// m_flNeutrallyBuoyantGravity
|
||||
[SchemaMember("CBuoyancyHelper", "m_flNeutrallyBuoyantGravity")]
|
||||
public ref float NeutrallyBuoyantGravity => ref Schema.GetRef<float>(this.Handle, "CBuoyancyHelper", "m_flNeutrallyBuoyantGravity");
|
||||
|
||||
// m_flNeutrallyBuoyantLinearDamping
|
||||
[SchemaMember("CBuoyancyHelper", "m_flNeutrallyBuoyantLinearDamping")]
|
||||
public ref float NeutrallyBuoyantLinearDamping => ref Schema.GetRef<float>(this.Handle, "CBuoyancyHelper", "m_flNeutrallyBuoyantLinearDamping");
|
||||
|
||||
// m_flNeutrallyBuoyantAngularDamping
|
||||
[SchemaMember("CBuoyancyHelper", "m_flNeutrallyBuoyantAngularDamping")]
|
||||
public ref float NeutrallyBuoyantAngularDamping => ref Schema.GetRef<float>(this.Handle, "CBuoyancyHelper", "m_flNeutrallyBuoyantAngularDamping");
|
||||
|
||||
// m_bNeutrallyBuoyant
|
||||
[SchemaMember("CBuoyancyHelper", "m_bNeutrallyBuoyant")]
|
||||
public ref bool NeutrallyBuoyant => ref Schema.GetRef<bool>(this.Handle, "CBuoyancyHelper", "m_bNeutrallyBuoyant");
|
||||
|
||||
// m_vecFractionOfWheelSubmergedForWheelFriction
|
||||
[SchemaMember("CBuoyancyHelper", "m_vecFractionOfWheelSubmergedForWheelFriction")]
|
||||
public NetworkedVector<float> FractionOfWheelSubmergedForWheelFriction => Schema.GetDeclaredClass<NetworkedVector<float>>(this.Handle, "CBuoyancyHelper", "m_vecFractionOfWheelSubmergedForWheelFriction");
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CCSGOViewModel : CPredictedViewModel
|
||||
{
|
||||
public CCSGOViewModel (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_bShouldIgnoreOffsetAndAccuracy
|
||||
[SchemaMember("CCSGOViewModel", "m_bShouldIgnoreOffsetAndAccuracy")]
|
||||
public ref bool ShouldIgnoreOffsetAndAccuracy => ref Schema.GetRef<bool>(this.Handle, "CCSGOViewModel", "m_bShouldIgnoreOffsetAndAccuracy");
|
||||
|
||||
}
|
||||
@@ -34,10 +34,6 @@ public partial class CCSGameRules : CTeamplayRules
|
||||
[SchemaMember("CCSGameRules", "m_fWarmupPeriodStart")]
|
||||
public ref float WarmupPeriodStart => ref Schema.GetRef<float>(this.Handle, "CCSGameRules", "m_fWarmupPeriodStart");
|
||||
|
||||
// m_bServerPaused
|
||||
[SchemaMember("CCSGameRules", "m_bServerPaused")]
|
||||
public ref bool ServerPaused => ref Schema.GetRef<bool>(this.Handle, "CCSGameRules", "m_bServerPaused");
|
||||
|
||||
// m_bTerroristTimeOutActive
|
||||
[SchemaMember("CCSGameRules", "m_bTerroristTimeOutActive")]
|
||||
public ref bool TerroristTimeOutActive => ref Schema.GetRef<bool>(this.Handle, "CCSGameRules", "m_bTerroristTimeOutActive");
|
||||
@@ -286,10 +282,6 @@ public partial class CCSGameRules : CTeamplayRules
|
||||
[SchemaMember("CCSGameRules", "m_flNextRespawnWave")]
|
||||
public Span<float> NextRespawnWave => Schema.GetFixedArray<float>(this.Handle, "CCSGameRules", "m_flNextRespawnWave", 32);
|
||||
|
||||
// m_nServerQuestID
|
||||
[SchemaMember("CCSGameRules", "m_nServerQuestID")]
|
||||
public ref Int32 ServerQuestID => ref Schema.GetRef<Int32>(this.Handle, "CCSGameRules", "m_nServerQuestID");
|
||||
|
||||
// m_vMinimapMins
|
||||
[SchemaMember("CCSGameRules", "m_vMinimapMins")]
|
||||
public Vector MinimapMins => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSGameRules", "m_vMinimapMins");
|
||||
@@ -302,9 +294,9 @@ public partial class CCSGameRules : CTeamplayRules
|
||||
[SchemaMember("CCSGameRules", "m_MinimapVerticalSectionHeights")]
|
||||
public Span<float> MinimapVerticalSectionHeights => Schema.GetFixedArray<float>(this.Handle, "CCSGameRules", "m_MinimapVerticalSectionHeights", 8);
|
||||
|
||||
// m_bSpawnedTerrorHuntHeavy
|
||||
[SchemaMember("CCSGameRules", "m_bSpawnedTerrorHuntHeavy")]
|
||||
public ref bool SpawnedTerrorHuntHeavy => ref Schema.GetRef<bool>(this.Handle, "CCSGameRules", "m_bSpawnedTerrorHuntHeavy");
|
||||
// m_ullLocalMatchID
|
||||
[SchemaMember("CCSGameRules", "m_ullLocalMatchID")]
|
||||
public ref UInt64 UllLocalMatchID => ref Schema.GetRef<UInt64>(this.Handle, "CCSGameRules", "m_ullLocalMatchID");
|
||||
|
||||
// m_nEndMatchMapGroupVoteTypes
|
||||
[SchemaMember("CCSGameRules", "m_nEndMatchMapGroupVoteTypes")]
|
||||
@@ -446,6 +438,14 @@ public partial class CCSGameRules : CTeamplayRules
|
||||
[SchemaMember("CCSGameRules", "m_numSpectatorsCountMaxLnk")]
|
||||
public ref UInt32 NumSpectatorsCountMaxLnk => ref Schema.GetRef<UInt32>(this.Handle, "CCSGameRules", "m_numSpectatorsCountMaxLnk");
|
||||
|
||||
// m_nCTsAliveAtFreezetimeEnd
|
||||
[SchemaMember("CCSGameRules", "m_nCTsAliveAtFreezetimeEnd")]
|
||||
public ref Int32 CTsAliveAtFreezetimeEnd => ref Schema.GetRef<Int32>(this.Handle, "CCSGameRules", "m_nCTsAliveAtFreezetimeEnd");
|
||||
|
||||
// m_nTerroristsAliveAtFreezetimeEnd
|
||||
[SchemaMember("CCSGameRules", "m_nTerroristsAliveAtFreezetimeEnd")]
|
||||
public ref Int32 TerroristsAliveAtFreezetimeEnd => ref Schema.GetRef<Int32>(this.Handle, "CCSGameRules", "m_nTerroristsAliveAtFreezetimeEnd");
|
||||
|
||||
// m_bForceTeamChangeSilent
|
||||
[SchemaMember("CCSGameRules", "m_bForceTeamChangeSilent")]
|
||||
public ref bool ForceTeamChangeSilent => ref Schema.GetRef<bool>(this.Handle, "CCSGameRules", "m_bForceTeamChangeSilent");
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CCSObserver_ViewModelServices : CPlayer_ViewModelServices
|
||||
{
|
||||
public CCSObserver_ViewModelServices (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
}
|
||||
@@ -1,21 +1,21 @@
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CMelee : CCSWeaponBase
|
||||
{
|
||||
public CMelee (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
}
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CCSPetPlacement : CBaseEntity
|
||||
{
|
||||
public CCSPetPlacement (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
}
|
||||
@@ -42,6 +42,10 @@ public partial class CCSPlayerController : CBasePlayerController
|
||||
[SchemaMember("CCSPlayerController", "m_bHasCommunicationAbuseMute")]
|
||||
public ref bool HasCommunicationAbuseMute => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerController", "m_bHasCommunicationAbuseMute");
|
||||
|
||||
// m_uiCommunicationMuteFlags
|
||||
[SchemaMember("CCSPlayerController", "m_uiCommunicationMuteFlags")]
|
||||
public ref UInt32 UiCommunicationMuteFlags => ref Schema.GetRef<UInt32>(this.Handle, "CCSPlayerController", "m_uiCommunicationMuteFlags");
|
||||
|
||||
// m_szCrosshairCodes
|
||||
[SchemaMember("CCSPlayerController", "m_szCrosshairCodes")]
|
||||
public string CrosshairCodes
|
||||
@@ -98,10 +102,10 @@ public partial class CCSPlayerController : CBasePlayerController
|
||||
[SchemaMember("CCSPlayerController", "m_bRemoveAllItemsOnNextRoundReset")]
|
||||
public ref bool RemoveAllItemsOnNextRoundReset => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerController", "m_bRemoveAllItemsOnNextRoundReset");
|
||||
|
||||
// m_flLastJoinTeamTime
|
||||
[SchemaMember("CCSPlayerController", "m_flLastJoinTeamTime")]
|
||||
public ref float LastJoinTeamTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerController", "m_flLastJoinTeamTime");
|
||||
|
||||
// m_flLastJoinTeamTime
|
||||
[SchemaMember("CCSPlayerController", "m_flLastJoinTeamTime")]
|
||||
public ref float LastJoinTeamTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerController", "m_flLastJoinTeamTime");
|
||||
|
||||
// m_szClan
|
||||
[SchemaMember("CCSPlayerController", "m_szClan")]
|
||||
public string Clan
|
||||
@@ -110,14 +114,6 @@ public partial class CCSPlayerController : CBasePlayerController
|
||||
set { Schema.SetString(this.Handle, "CCSPlayerController", "m_szClan", value); }
|
||||
}
|
||||
|
||||
// m_szClanName
|
||||
[SchemaMember("CCSPlayerController", "m_szClanName")]
|
||||
public string ClanName
|
||||
{
|
||||
get { return Schema.GetString(this.Handle, "CCSPlayerController", "m_szClanName"); }
|
||||
set { Schema.SetStringBytes(this.Handle, "CCSPlayerController", "m_szClanName", value, 32); }
|
||||
}
|
||||
|
||||
// m_iCoachingTeam
|
||||
[SchemaMember("CCSPlayerController", "m_iCoachingTeam")]
|
||||
public ref Int32 CoachingTeam => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerController", "m_iCoachingTeam");
|
||||
@@ -162,6 +158,10 @@ public partial class CCSPlayerController : CBasePlayerController
|
||||
[SchemaMember("CCSPlayerController", "m_unActiveQuestId")]
|
||||
public ref UInt16 ActiveQuestId => ref Schema.GetRef<UInt16>(this.Handle, "CCSPlayerController", "m_unActiveQuestId");
|
||||
|
||||
// m_rtActiveMissionPeriod
|
||||
[SchemaMember("CCSPlayerController", "m_rtActiveMissionPeriod")]
|
||||
public ref UInt32 RtActiveMissionPeriod => ref Schema.GetRef<UInt32>(this.Handle, "CCSPlayerController", "m_rtActiveMissionPeriod");
|
||||
|
||||
// m_unPlayerTvControlFlags
|
||||
[SchemaMember("CCSPlayerController", "m_unPlayerTvControlFlags")]
|
||||
public ref UInt32 PlayerTvControlFlags => ref Schema.GetRef<UInt32>(this.Handle, "CCSPlayerController", "m_unPlayerTvControlFlags");
|
||||
@@ -178,6 +178,10 @@ public partial class CCSPlayerController : CBasePlayerController
|
||||
[SchemaMember("CCSPlayerController", "m_uiAbandonRecordedReason")]
|
||||
public ref UInt32 UiAbandonRecordedReason => ref Schema.GetRef<UInt32>(this.Handle, "CCSPlayerController", "m_uiAbandonRecordedReason");
|
||||
|
||||
// m_eNetworkDisconnectionReason
|
||||
[SchemaMember("CCSPlayerController", "m_eNetworkDisconnectionReason")]
|
||||
public ref UInt32 NetworkDisconnectionReason => ref Schema.GetRef<UInt32>(this.Handle, "CCSPlayerController", "m_eNetworkDisconnectionReason");
|
||||
|
||||
// m_bCannotBeKicked
|
||||
[SchemaMember("CCSPlayerController", "m_bCannotBeKicked")]
|
||||
public ref bool CannotBeKicked => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerController", "m_bCannotBeKicked");
|
||||
@@ -294,17 +298,17 @@ public partial class CCSPlayerController : CBasePlayerController
|
||||
[SchemaMember("CCSPlayerController", "m_iRoundsWon")]
|
||||
public ref Int32 RoundsWon => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerController", "m_iRoundsWon");
|
||||
|
||||
// m_recentKillQueue
|
||||
[SchemaMember("CCSPlayerController", "m_recentKillQueue")]
|
||||
public Span<byte> RecentKillQueue => Schema.GetFixedArray<byte>(this.Handle, "CCSPlayerController", "m_recentKillQueue", 8);
|
||||
|
||||
// m_nFirstKill
|
||||
[SchemaMember("CCSPlayerController", "m_nFirstKill")]
|
||||
public ref byte FirstKill => ref Schema.GetRef<byte>(this.Handle, "CCSPlayerController", "m_nFirstKill");
|
||||
|
||||
// m_nKillCount
|
||||
[SchemaMember("CCSPlayerController", "m_nKillCount")]
|
||||
public ref byte KillCount => ref Schema.GetRef<byte>(this.Handle, "CCSPlayerController", "m_nKillCount");
|
||||
// m_recentKillQueue
|
||||
[SchemaMember("CCSPlayerController", "m_recentKillQueue")]
|
||||
public Span<byte> RecentKillQueue => Schema.GetFixedArray<byte>(this.Handle, "CCSPlayerController", "m_recentKillQueue", 8);
|
||||
|
||||
// m_nFirstKill
|
||||
[SchemaMember("CCSPlayerController", "m_nFirstKill")]
|
||||
public ref byte FirstKill => ref Schema.GetRef<byte>(this.Handle, "CCSPlayerController", "m_nFirstKill");
|
||||
|
||||
// m_nKillCount
|
||||
[SchemaMember("CCSPlayerController", "m_nKillCount")]
|
||||
public ref byte KillCount => ref Schema.GetRef<byte>(this.Handle, "CCSPlayerController", "m_nKillCount");
|
||||
|
||||
// m_bMvpNoMusic
|
||||
[SchemaMember("CCSPlayerController", "m_bMvpNoMusic")]
|
||||
@@ -382,8 +386,8 @@ public partial class CCSPlayerController : CBasePlayerController
|
||||
[SchemaMember("CCSPlayerController", "m_nNonSuspiciousHitStreak")]
|
||||
public ref UInt32 NonSuspiciousHitStreak => ref Schema.GetRef<UInt32>(this.Handle, "CCSPlayerController", "m_nNonSuspiciousHitStreak");
|
||||
|
||||
// m_bFireBulletsSeedSynchronized
|
||||
[SchemaMember("CCSPlayerController", "m_bFireBulletsSeedSynchronized")]
|
||||
public ref bool FireBulletsSeedSynchronized => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerController", "m_bFireBulletsSeedSynchronized");
|
||||
|
||||
// m_bFireBulletsSeedSynchronized
|
||||
[SchemaMember("CCSPlayerController", "m_bFireBulletsSeedSynchronized")]
|
||||
public ref bool FireBulletsSeedSynchronized => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerController", "m_bFireBulletsSeedSynchronized");
|
||||
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@ public partial class CCSPlayerController_ActionTrackingServices : CPlayerControl
|
||||
[SchemaMember("CCSPlayerController_ActionTrackingServices", "m_iNumRoundKillsHeadshots")]
|
||||
public ref Int32 NumRoundKillsHeadshots => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerController_ActionTrackingServices", "m_iNumRoundKillsHeadshots");
|
||||
|
||||
// m_unTotalRoundDamageDealt
|
||||
[SchemaMember("CCSPlayerController_ActionTrackingServices", "m_unTotalRoundDamageDealt")]
|
||||
public ref UInt32 TotalRoundDamageDealt => ref Schema.GetRef<UInt32>(this.Handle, "CCSPlayerController_ActionTrackingServices", "m_unTotalRoundDamageDealt");
|
||||
// m_flTotalRoundDamageDealt
|
||||
[SchemaMember("CCSPlayerController_ActionTrackingServices", "m_flTotalRoundDamageDealt")]
|
||||
public ref float TotalRoundDamageDealt => ref Schema.GetRef<float>(this.Handle, "CCSPlayerController_ActionTrackingServices", "m_flTotalRoundDamageDealt");
|
||||
|
||||
}
|
||||
|
||||
@@ -50,6 +50,10 @@ public partial class CCSPlayerController_InventoryServices : CPlayerControllerCo
|
||||
[SchemaMember("CCSPlayerController_InventoryServices", "m_unEquippedPlayerSprayIDs")]
|
||||
public Span<UInt32> EquippedPlayerSprayIDs => Schema.GetFixedArray<UInt32>(this.Handle, "CCSPlayerController_InventoryServices", "m_unEquippedPlayerSprayIDs", 1);
|
||||
|
||||
// m_unCurrentLoadoutHash
|
||||
[SchemaMember("CCSPlayerController_InventoryServices", "m_unCurrentLoadoutHash")]
|
||||
public ref UInt64 CurrentLoadoutHash => ref Schema.GetRef<UInt64>(this.Handle, "CCSPlayerController_InventoryServices", "m_unCurrentLoadoutHash");
|
||||
|
||||
// m_vecServerAuthoritativeWeaponSlots
|
||||
[SchemaMember("CCSPlayerController_InventoryServices", "m_vecServerAuthoritativeWeaponSlots")]
|
||||
public NetworkedVector<ServerAuthoritativeWeaponSlot_t> ServerAuthoritativeWeaponSlots => Schema.GetDeclaredClass<NetworkedVector<ServerAuthoritativeWeaponSlot_t>>(this.Handle, "CCSPlayerController_InventoryServices", "m_vecServerAuthoritativeWeaponSlots");
|
||||
|
||||
@@ -150,14 +150,6 @@ public partial class CCSPlayerPawn : CCSPlayerPawnBase
|
||||
[SchemaMember("CCSPlayerPawn", "m_bIsBuyMenuOpen")]
|
||||
public ref bool IsBuyMenuOpen => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bIsBuyMenuOpen");
|
||||
|
||||
// m_xLastHeadBoneTransform
|
||||
[SchemaMember("CCSPlayerPawn", "m_xLastHeadBoneTransform")]
|
||||
public CTransform XLastHeadBoneTransform => Schema.GetDeclaredClass<CTransform>(this.Handle, "CCSPlayerPawn", "m_xLastHeadBoneTransform");
|
||||
|
||||
// m_bLastHeadBoneTransformIsValid
|
||||
[SchemaMember("CCSPlayerPawn", "m_bLastHeadBoneTransformIsValid")]
|
||||
public ref bool LastHeadBoneTransformIsValid => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bLastHeadBoneTransformIsValid");
|
||||
|
||||
// m_lastLandTime
|
||||
[SchemaMember("CCSPlayerPawn", "m_lastLandTime")]
|
||||
public ref float LastLandTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_lastLandTime");
|
||||
@@ -378,10 +370,6 @@ public partial class CCSPlayerPawn : CCSPlayerPawnBase
|
||||
[SchemaMember("CCSPlayerPawn", "m_LastHitBox")]
|
||||
public ref Int32 LastHitBox => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawn", "m_LastHitBox");
|
||||
|
||||
// m_LastHealth
|
||||
[SchemaMember("CCSPlayerPawn", "m_LastHealth")]
|
||||
public ref Int32 LastHealth => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawn", "m_LastHealth");
|
||||
|
||||
// m_pBot
|
||||
[SchemaMember("CCSPlayerPawn", "m_pBot")]
|
||||
public CCSBot? Bot => Schema.GetPointer<CCSBot>(this.Handle, "CCSPlayerPawn", "m_pBot");
|
||||
@@ -506,4 +494,28 @@ public partial class CCSPlayerPawn : CCSPlayerPawnBase
|
||||
[SchemaMember("CCSPlayerPawn", "m_nHighestAppliedDamageTagTick")]
|
||||
public ref Int32 HighestAppliedDamageTagTick => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawn", "m_nHighestAppliedDamageTagTick");
|
||||
|
||||
// m_bCommittingSuicideOnTeamChange
|
||||
[SchemaMember("CCSPlayerPawn", "m_bCommittingSuicideOnTeamChange")]
|
||||
public ref bool CommittingSuicideOnTeamChange => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bCommittingSuicideOnTeamChange");
|
||||
|
||||
// m_wasNotKilledNaturally
|
||||
[SchemaMember("CCSPlayerPawn", "m_wasNotKilledNaturally")]
|
||||
public ref bool WasNotKilledNaturally => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_wasNotKilledNaturally");
|
||||
|
||||
// m_fImmuneToGunGameDamageTime
|
||||
[SchemaMember("CCSPlayerPawn", "m_fImmuneToGunGameDamageTime")]
|
||||
public ref float ImmuneToGunGameDamageTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_fImmuneToGunGameDamageTime");
|
||||
|
||||
// m_bGunGameImmunity
|
||||
[SchemaMember("CCSPlayerPawn", "m_bGunGameImmunity")]
|
||||
public ref bool GunGameImmunity => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bGunGameImmunity");
|
||||
|
||||
// m_fMolotovDamageTime
|
||||
[SchemaMember("CCSPlayerPawn", "m_fMolotovDamageTime")]
|
||||
public ref float MolotovDamageTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_fMolotovDamageTime");
|
||||
|
||||
// m_angEyeAngles
|
||||
[SchemaMember("CCSPlayerPawn", "m_angEyeAngles")]
|
||||
public QAngle EyeAngles => Schema.GetDeclaredClass<QAngle>(this.Handle, "CCSPlayerPawn", "m_angEyeAngles");
|
||||
|
||||
}
|
||||
|
||||
@@ -26,10 +26,6 @@ public partial class CCSPlayerPawnBase : CBasePlayerPawn
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_pPingServices")]
|
||||
public CCSPlayer_PingServices? PingServices => Schema.GetPointer<CCSPlayer_PingServices>(this.Handle, "CCSPlayerPawnBase", "m_pPingServices");
|
||||
|
||||
// m_pViewModelServices
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_pViewModelServices")]
|
||||
public CPlayer_ViewModelServices? ViewModelServices => Schema.GetPointer<CPlayer_ViewModelServices>(this.Handle, "CCSPlayerPawnBase", "m_pViewModelServices");
|
||||
|
||||
// m_blindUntilTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_blindUntilTime")]
|
||||
public ref float BlindUntilTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_blindUntilTime");
|
||||
@@ -46,18 +42,6 @@ public partial class CCSPlayerPawnBase : CBasePlayerPawn
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bRespawning")]
|
||||
public ref bool Respawning => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bRespawning");
|
||||
|
||||
// m_fImmuneToGunGameDamageTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_fImmuneToGunGameDamageTime")]
|
||||
public ref float ImmuneToGunGameDamageTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_fImmuneToGunGameDamageTime");
|
||||
|
||||
// m_bGunGameImmunity
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bGunGameImmunity")]
|
||||
public ref bool GunGameImmunity => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bGunGameImmunity");
|
||||
|
||||
// m_fMolotovDamageTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_fMolotovDamageTime")]
|
||||
public ref float MolotovDamageTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_fMolotovDamageTime");
|
||||
|
||||
// m_bHasMovedSinceSpawn
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bHasMovedSinceSpawn")]
|
||||
public ref bool HasMovedSinceSpawn => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bHasMovedSinceSpawn");
|
||||
@@ -90,18 +74,6 @@ public partial class CCSPlayerPawnBase : CBasePlayerPawn
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iProgressBarDuration")]
|
||||
public ref Int32 ProgressBarDuration => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_iProgressBarDuration");
|
||||
|
||||
// m_angEyeAngles
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_angEyeAngles")]
|
||||
public QAngle EyeAngles => Schema.GetDeclaredClass<QAngle>(this.Handle, "CCSPlayerPawnBase", "m_angEyeAngles");
|
||||
|
||||
// m_wasNotKilledNaturally
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_wasNotKilledNaturally")]
|
||||
public ref bool WasNotKilledNaturally => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_wasNotKilledNaturally");
|
||||
|
||||
// m_bCommittingSuicideOnTeamChange
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bCommittingSuicideOnTeamChange")]
|
||||
public ref bool CommittingSuicideOnTeamChange => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bCommittingSuicideOnTeamChange");
|
||||
|
||||
// m_hOriginalController
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_hOriginalController")]
|
||||
public CHandle<CCSPlayerController> OriginalController => Schema.GetDeclaredClass<CHandle<CCSPlayerController>>(this.Handle, "CCSPlayerPawnBase", "m_hOriginalController");
|
||||
|
||||
@@ -26,8 +26,4 @@ public partial class CCSPlayer_ItemServices : CPlayer_ItemServices
|
||||
[SchemaMember("CCSPlayer_ItemServices", "m_bHasHelmet")]
|
||||
public ref bool HasHelmet => ref Schema.GetRef<bool>(this.Handle, "CCSPlayer_ItemServices", "m_bHasHelmet");
|
||||
|
||||
// m_bHasHeavyArmor
|
||||
[SchemaMember("CCSPlayer_ItemServices", "m_bHasHeavyArmor")]
|
||||
public ref bool HasHeavyArmor => ref Schema.GetRef<bool>(this.Handle, "CCSPlayer_ItemServices", "m_bHasHeavyArmor");
|
||||
|
||||
}
|
||||
|
||||
@@ -78,10 +78,6 @@ public partial class CCSPlayer_MovementServices : CPlayer_MovementServices_Human
|
||||
[SchemaMember("CCSPlayer_MovementServices", "m_bInStuckTest")]
|
||||
public ref bool InStuckTest => ref Schema.GetRef<bool>(this.Handle, "CCSPlayer_MovementServices", "m_bInStuckTest");
|
||||
|
||||
// m_flStuckCheckTime
|
||||
[SchemaMember("CCSPlayer_MovementServices", "m_flStuckCheckTime")]
|
||||
public Span<float[]> StuckCheckTime => Schema.GetFixedArray<float[]>(this.Handle, "CCSPlayer_MovementServices", "m_flStuckCheckTime", 2);
|
||||
|
||||
// m_nTraceCount
|
||||
[SchemaMember("CCSPlayer_MovementServices", "m_nTraceCount")]
|
||||
public ref Int32 TraceCount => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayer_MovementServices", "m_nTraceCount");
|
||||
@@ -94,10 +90,6 @@ public partial class CCSPlayer_MovementServices : CPlayer_MovementServices_Human
|
||||
[SchemaMember("CCSPlayer_MovementServices", "m_bSpeedCropped")]
|
||||
public ref bool SpeedCropped => ref Schema.GetRef<bool>(this.Handle, "CCSPlayer_MovementServices", "m_bSpeedCropped");
|
||||
|
||||
// m_flGroundMoveEfficiency
|
||||
[SchemaMember("CCSPlayer_MovementServices", "m_flGroundMoveEfficiency")]
|
||||
public ref float GroundMoveEfficiency => ref Schema.GetRef<float>(this.Handle, "CCSPlayer_MovementServices", "m_flGroundMoveEfficiency");
|
||||
|
||||
// m_nOldWaterLevel
|
||||
[SchemaMember("CCSPlayer_MovementServices", "m_nOldWaterLevel")]
|
||||
public ref Int32 OldWaterLevel => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayer_MovementServices", "m_nOldWaterLevel");
|
||||
@@ -170,12 +162,24 @@ public partial class CCSPlayer_MovementServices : CPlayer_MovementServices_Human
|
||||
[SchemaMember("CCSPlayer_MovementServices", "m_flMaxJumpHeightLastJump")]
|
||||
public ref float MaxJumpHeightLastJump => ref Schema.GetRef<float>(this.Handle, "CCSPlayer_MovementServices", "m_flMaxJumpHeightLastJump");
|
||||
|
||||
// m_flStaminaAtJumpStart
|
||||
[SchemaMember("CCSPlayer_MovementServices", "m_flStaminaAtJumpStart")]
|
||||
public ref float StaminaAtJumpStart => ref Schema.GetRef<float>(this.Handle, "CCSPlayer_MovementServices", "m_flStaminaAtJumpStart");
|
||||
|
||||
// m_flAccumulatedJumpError
|
||||
[SchemaMember("CCSPlayer_MovementServices", "m_flAccumulatedJumpError")]
|
||||
public ref float AccumulatedJumpError => ref Schema.GetRef<float>(this.Handle, "CCSPlayer_MovementServices", "m_flAccumulatedJumpError");
|
||||
|
||||
// m_flStaminaAtJumpStart
|
||||
[SchemaMember("CCSPlayer_MovementServices", "m_flStaminaAtJumpStart")]
|
||||
public ref float StaminaAtJumpStart => ref Schema.GetRef<float>(this.Handle, "CCSPlayer_MovementServices", "m_flStaminaAtJumpStart");
|
||||
|
||||
// m_flAccumulatedJumpError
|
||||
[SchemaMember("CCSPlayer_MovementServices", "m_flAccumulatedJumpError")]
|
||||
public ref float AccumulatedJumpError => ref Schema.GetRef<float>(this.Handle, "CCSPlayer_MovementServices", "m_flAccumulatedJumpError");
|
||||
|
||||
// m_flTicksSinceLastSurfingDetected
|
||||
[SchemaMember("CCSPlayer_MovementServices", "m_flTicksSinceLastSurfingDetected")]
|
||||
public ref float TicksSinceLastSurfingDetected => ref Schema.GetRef<float>(this.Handle, "CCSPlayer_MovementServices", "m_flTicksSinceLastSurfingDetected");
|
||||
|
||||
// m_bWasSurfing
|
||||
[SchemaMember("CCSPlayer_MovementServices", "m_bWasSurfing")]
|
||||
public ref bool WasSurfing => ref Schema.GetRef<bool>(this.Handle, "CCSPlayer_MovementServices", "m_bWasSurfing");
|
||||
|
||||
// m_vecInputRotated
|
||||
[SchemaMember("CCSPlayer_MovementServices", "m_vecInputRotated")]
|
||||
public Vector InputRotated => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSPlayer_MovementServices", "m_vecInputRotated");
|
||||
|
||||
}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CCSPlayer_ViewModelServices : CPlayer_ViewModelServices
|
||||
{
|
||||
public CCSPlayer_ViewModelServices (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_hViewModel
|
||||
[SchemaMember("CCSPlayer_ViewModelServices", "m_hViewModel")]
|
||||
public Span<CHandle<CBaseViewModel>> ViewModel => Schema.GetFixedArray<CHandle<CBaseViewModel>>(this.Handle, "CCSPlayer_ViewModelServices", "m_hViewModel", 3);
|
||||
|
||||
}
|
||||
@@ -70,12 +70,12 @@ public partial class CCSPlayer_WeaponServices : CPlayer_WeaponServices
|
||||
[SchemaMember("CCSPlayer_WeaponServices", "m_bIsPickingUpGroundWeapon")]
|
||||
public ref bool IsPickingUpGroundWeapon => ref Schema.GetRef<bool>(this.Handle, "CCSPlayer_WeaponServices", "m_bIsPickingUpGroundWeapon");
|
||||
|
||||
// m_nOldShootPositionHistoryCount
|
||||
[SchemaMember("CCSPlayer_WeaponServices", "m_nOldShootPositionHistoryCount")]
|
||||
public ref UInt32 OldShootPositionHistoryCount => ref Schema.GetRef<UInt32>(this.Handle, "CCSPlayer_WeaponServices", "m_nOldShootPositionHistoryCount");
|
||||
// m_networkAnimTiming
|
||||
[SchemaMember("CCSPlayer_WeaponServices", "m_networkAnimTiming")]
|
||||
public NetworkedVector<byte> NetworkAnimTiming => Schema.GetDeclaredClass<NetworkedVector<byte>>(this.Handle, "CCSPlayer_WeaponServices", "m_networkAnimTiming");
|
||||
|
||||
// m_nOldInputHistoryCount
|
||||
[SchemaMember("CCSPlayer_WeaponServices", "m_nOldInputHistoryCount")]
|
||||
public ref UInt32 OldInputHistoryCount => ref Schema.GetRef<UInt32>(this.Handle, "CCSPlayer_WeaponServices", "m_nOldInputHistoryCount");
|
||||
// m_bBlockInspectUntilNextGraphUpdate
|
||||
[SchemaMember("CCSPlayer_WeaponServices", "m_bBlockInspectUntilNextGraphUpdate")]
|
||||
public ref bool BlockInspectUntilNextGraphUpdate => ref Schema.GetRef<bool>(this.Handle, "CCSPlayer_WeaponServices", "m_bBlockInspectUntilNextGraphUpdate");
|
||||
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CCSPointScriptExtensions_CCSWeaponBaseVData : NativeObject
|
||||
{
|
||||
public CCSPointScriptExtensions_CCSWeaponBaseVData (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CCSServerPointScriptEntity : CCSPointScriptEntity
|
||||
{
|
||||
public CCSServerPointScriptEntity (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
}
|
||||
@@ -22,54 +22,6 @@ public partial class CCSWeaponBase : CBasePlayerWeapon
|
||||
[SchemaMember("CCSWeaponBase", "m_bRemoveable")]
|
||||
public ref bool Removeable => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBase", "m_bRemoveable");
|
||||
|
||||
// m_flFireSequenceStartTime
|
||||
[SchemaMember("CCSWeaponBase", "m_flFireSequenceStartTime")]
|
||||
public ref float FireSequenceStartTime => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBase", "m_flFireSequenceStartTime");
|
||||
|
||||
// m_nFireSequenceStartTimeChange
|
||||
[SchemaMember("CCSWeaponBase", "m_nFireSequenceStartTimeChange")]
|
||||
public ref Int32 FireSequenceStartTimeChange => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBase", "m_nFireSequenceStartTimeChange");
|
||||
|
||||
// m_nFireSequenceStartTimeAck
|
||||
[SchemaMember("CCSWeaponBase", "m_nFireSequenceStartTimeAck")]
|
||||
public ref Int32 FireSequenceStartTimeAck => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBase", "m_nFireSequenceStartTimeAck");
|
||||
|
||||
// m_ePlayerFireEvent
|
||||
[SchemaMember("CCSWeaponBase", "m_ePlayerFireEvent")]
|
||||
public ref PlayerAnimEvent_t PlayerFireEvent => ref Schema.GetRef<PlayerAnimEvent_t>(this.Handle, "CCSWeaponBase", "m_ePlayerFireEvent");
|
||||
|
||||
// m_ePlayerFireEventAttackType
|
||||
[SchemaMember("CCSWeaponBase", "m_ePlayerFireEventAttackType")]
|
||||
public ref WeaponAttackType_t PlayerFireEventAttackType => ref Schema.GetRef<WeaponAttackType_t>(this.Handle, "CCSWeaponBase", "m_ePlayerFireEventAttackType");
|
||||
|
||||
// m_seqIdle
|
||||
[SchemaMember("CCSWeaponBase", "m_seqIdle")]
|
||||
public ref Int32 SeqIdle => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBase", "m_seqIdle");
|
||||
|
||||
// m_seqFirePrimary
|
||||
[SchemaMember("CCSWeaponBase", "m_seqFirePrimary")]
|
||||
public ref Int32 SeqFirePrimary => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBase", "m_seqFirePrimary");
|
||||
|
||||
// m_seqFireSecondary
|
||||
[SchemaMember("CCSWeaponBase", "m_seqFireSecondary")]
|
||||
public ref Int32 SeqFireSecondary => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBase", "m_seqFireSecondary");
|
||||
|
||||
// m_thirdPersonFireSequences
|
||||
[SchemaMember("CCSWeaponBase", "m_thirdPersonFireSequences")]
|
||||
public NetworkedVector<Int32> ThirdPersonFireSequences => Schema.GetDeclaredClass<NetworkedVector<Int32>>(this.Handle, "CCSWeaponBase", "m_thirdPersonFireSequences");
|
||||
|
||||
// m_hCurrentThirdPersonSequence
|
||||
[SchemaMember("CCSWeaponBase", "m_hCurrentThirdPersonSequence")]
|
||||
public ref Int32 CurrentThirdPersonSequence => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBase", "m_hCurrentThirdPersonSequence");
|
||||
|
||||
// m_nSilencerBoneIndex
|
||||
[SchemaMember("CCSWeaponBase", "m_nSilencerBoneIndex")]
|
||||
public ref Int32 SilencerBoneIndex => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBase", "m_nSilencerBoneIndex");
|
||||
|
||||
// m_thirdPersonSequences
|
||||
[SchemaMember("CCSWeaponBase", "m_thirdPersonSequences")]
|
||||
public Span<Int32> ThirdPersonSequences => Schema.GetFixedArray<Int32>(this.Handle, "CCSWeaponBase", "m_thirdPersonSequences", 7);
|
||||
|
||||
// m_bPlayerAmmoStockOnPickup
|
||||
[SchemaMember("CCSWeaponBase", "m_bPlayerAmmoStockOnPickup")]
|
||||
public ref bool PlayerAmmoStockOnPickup => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBase", "m_bPlayerAmmoStockOnPickup");
|
||||
@@ -78,34 +30,30 @@ public partial class CCSWeaponBase : CBasePlayerWeapon
|
||||
[SchemaMember("CCSWeaponBase", "m_bRequireUseToTouch")]
|
||||
public ref bool RequireUseToTouch => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBase", "m_bRequireUseToTouch");
|
||||
|
||||
// m_iState
|
||||
[SchemaMember("CCSWeaponBase", "m_iState")]
|
||||
public ref CSWeaponState_t State => ref Schema.GetRef<CSWeaponState_t>(this.Handle, "CCSWeaponBase", "m_iState");
|
||||
// m_iWeaponGameplayAnimState
|
||||
[SchemaMember("CCSWeaponBase", "m_iWeaponGameplayAnimState")]
|
||||
public ref WeaponGameplayAnimState WeaponGameplayAnimState => ref Schema.GetRef<WeaponGameplayAnimState>(this.Handle, "CCSWeaponBase", "m_iWeaponGameplayAnimState");
|
||||
|
||||
// m_flLastTimeInAir
|
||||
[SchemaMember("CCSWeaponBase", "m_flLastTimeInAir")]
|
||||
public ref float LastTimeInAir => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBase", "m_flLastTimeInAir");
|
||||
// m_flWeaponGameplayAnimStateTimestamp
|
||||
[SchemaMember("CCSWeaponBase", "m_flWeaponGameplayAnimStateTimestamp")]
|
||||
public ref float WeaponGameplayAnimStateTimestamp => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBase", "m_flWeaponGameplayAnimStateTimestamp");
|
||||
|
||||
// m_flLastDeployTime
|
||||
[SchemaMember("CCSWeaponBase", "m_flLastDeployTime")]
|
||||
public ref float LastDeployTime => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBase", "m_flLastDeployTime");
|
||||
// m_flInspectCancelCompleteTime
|
||||
[SchemaMember("CCSWeaponBase", "m_flInspectCancelCompleteTime")]
|
||||
public ref float InspectCancelCompleteTime => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBase", "m_flInspectCancelCompleteTime");
|
||||
|
||||
// m_bInspectPending
|
||||
[SchemaMember("CCSWeaponBase", "m_bInspectPending")]
|
||||
public ref bool InspectPending => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBase", "m_bInspectPending");
|
||||
|
||||
// m_bInspectShouldLoop
|
||||
[SchemaMember("CCSWeaponBase", "m_bInspectShouldLoop")]
|
||||
public ref bool InspectShouldLoop => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBase", "m_bInspectShouldLoop");
|
||||
|
||||
// m_nLastEmptySoundCmdNum
|
||||
[SchemaMember("CCSWeaponBase", "m_nLastEmptySoundCmdNum")]
|
||||
public ref Int32 LastEmptySoundCmdNum => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBase", "m_nLastEmptySoundCmdNum");
|
||||
|
||||
// m_nViewModelIndex
|
||||
[SchemaMember("CCSWeaponBase", "m_nViewModelIndex")]
|
||||
public ref UInt32 ViewModelIndex => ref Schema.GetRef<UInt32>(this.Handle, "CCSWeaponBase", "m_nViewModelIndex");
|
||||
|
||||
// m_bReloadsWithClips
|
||||
[SchemaMember("CCSWeaponBase", "m_bReloadsWithClips")]
|
||||
public ref bool ReloadsWithClips => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBase", "m_bReloadsWithClips");
|
||||
|
||||
// m_flTimeWeaponIdle
|
||||
[SchemaMember("CCSWeaponBase", "m_flTimeWeaponIdle")]
|
||||
public ref float TimeWeaponIdle => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBase", "m_flTimeWeaponIdle");
|
||||
|
||||
// m_bFireOnEmpty
|
||||
[SchemaMember("CCSWeaponBase", "m_bFireOnEmpty")]
|
||||
public ref bool FireOnEmpty => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBase", "m_bFireOnEmpty");
|
||||
@@ -142,10 +90,6 @@ public partial class CCSWeaponBase : CBasePlayerWeapon
|
||||
[SchemaMember("CCSWeaponBase", "m_fAccuracySmoothedForZoom")]
|
||||
public ref float AccuracySmoothedForZoom => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBase", "m_fAccuracySmoothedForZoom");
|
||||
|
||||
// m_fScopeZoomEndTime
|
||||
[SchemaMember("CCSWeaponBase", "m_fScopeZoomEndTime")]
|
||||
public ref float ScopeZoomEndTime => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBase", "m_fScopeZoomEndTime");
|
||||
|
||||
// m_iRecoilIndex
|
||||
[SchemaMember("CCSWeaponBase", "m_iRecoilIndex")]
|
||||
public ref Int32 IRecoilIndex => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBase", "m_iRecoilIndex");
|
||||
@@ -170,10 +114,6 @@ public partial class CCSWeaponBase : CBasePlayerWeapon
|
||||
[SchemaMember("CCSWeaponBase", "m_bInReload")]
|
||||
public ref bool InReload => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBase", "m_bInReload");
|
||||
|
||||
// m_bReloadVisuallyComplete
|
||||
[SchemaMember("CCSWeaponBase", "m_bReloadVisuallyComplete")]
|
||||
public ref bool ReloadVisuallyComplete => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBase", "m_bReloadVisuallyComplete");
|
||||
|
||||
// m_flDroppedAtTime
|
||||
[SchemaMember("CCSWeaponBase", "m_flDroppedAtTime")]
|
||||
public ref float DroppedAtTime => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBase", "m_flDroppedAtTime");
|
||||
@@ -222,10 +162,10 @@ public partial class CCSWeaponBase : CBasePlayerWeapon
|
||||
[SchemaMember("CCSWeaponBase", "m_nextPrevOwnerTouchTime")]
|
||||
public ref float NextPrevOwnerTouchTime => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBase", "m_nextPrevOwnerTouchTime");
|
||||
|
||||
// m_nextPrevOwnerUseTime
|
||||
[SchemaMember("CCSWeaponBase", "m_nextPrevOwnerUseTime")]
|
||||
public ref float NextPrevOwnerUseTime => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBase", "m_nextPrevOwnerUseTime");
|
||||
|
||||
// m_nextPrevOwnerUseTime
|
||||
[SchemaMember("CCSWeaponBase", "m_nextPrevOwnerUseTime")]
|
||||
public ref float NextPrevOwnerUseTime => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBase", "m_nextPrevOwnerUseTime");
|
||||
|
||||
// m_hPrevOwner
|
||||
[SchemaMember("CCSWeaponBase", "m_hPrevOwner")]
|
||||
public CHandle<CCSPlayerPawn> PrevOwner => Schema.GetDeclaredClass<CHandle<CCSPlayerPawn>>(this.Handle, "CCSWeaponBase", "m_hPrevOwner");
|
||||
@@ -234,6 +174,10 @@ public partial class CCSWeaponBase : CBasePlayerWeapon
|
||||
[SchemaMember("CCSWeaponBase", "m_nDropTick")]
|
||||
public ref Int32 DropTick => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBase", "m_nDropTick");
|
||||
|
||||
// m_bWasActiveWeaponWhenDropped
|
||||
[SchemaMember("CCSWeaponBase", "m_bWasActiveWeaponWhenDropped")]
|
||||
public ref bool WasActiveWeaponWhenDropped => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBase", "m_bWasActiveWeaponWhenDropped");
|
||||
|
||||
// m_donated
|
||||
[SchemaMember("CCSWeaponBase", "m_donated")]
|
||||
public ref bool Donated => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBase", "m_donated");
|
||||
@@ -250,10 +194,6 @@ public partial class CCSWeaponBase : CBasePlayerWeapon
|
||||
[SchemaMember("CCSWeaponBase", "m_bWasOwnedByTerrorist")]
|
||||
public ref bool WasOwnedByTerrorist => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBase", "m_bWasOwnedByTerrorist");
|
||||
|
||||
// m_bFiredOutOfAmmoEvent
|
||||
[SchemaMember("CCSWeaponBase", "m_bFiredOutOfAmmoEvent")]
|
||||
public ref bool FiredOutOfAmmoEvent => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBase", "m_bFiredOutOfAmmoEvent");
|
||||
|
||||
// m_numRemoveUnownedWeaponThink
|
||||
[SchemaMember("CCSWeaponBase", "m_numRemoveUnownedWeaponThink")]
|
||||
public ref Int32 NumRemoveUnownedWeaponThink => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBase", "m_numRemoveUnownedWeaponThink");
|
||||
@@ -270,12 +210,12 @@ public partial class CCSWeaponBase : CBasePlayerWeapon
|
||||
[SchemaMember("CCSWeaponBase", "m_flLastLOSTraceFailureTime")]
|
||||
public ref float LastLOSTraceFailureTime => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBase", "m_flLastLOSTraceFailureTime");
|
||||
|
||||
// m_iNumEmptyAttacks
|
||||
[SchemaMember("CCSWeaponBase", "m_iNumEmptyAttacks")]
|
||||
public ref Int32 NumEmptyAttacks => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBase", "m_iNumEmptyAttacks");
|
||||
|
||||
// m_flWatTickOffset
|
||||
[SchemaMember("CCSWeaponBase", "m_flWatTickOffset")]
|
||||
public ref float WatTickOffset => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBase", "m_flWatTickOffset");
|
||||
|
||||
// m_flLastShakeTime
|
||||
[SchemaMember("CCSWeaponBase", "m_flLastShakeTime")]
|
||||
public ref float LastShakeTime => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBase", "m_flLastShakeTime");
|
||||
|
||||
}
|
||||
|
||||
@@ -38,6 +38,10 @@ public partial class CCSWeaponBaseGun : CCSWeaponBase
|
||||
[SchemaMember("CCSWeaponBaseGun", "m_bNeedsBoltAction")]
|
||||
public ref bool NeedsBoltAction => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBaseGun", "m_bNeedsBoltAction");
|
||||
|
||||
// m_nRevolverCylinderIdx
|
||||
[SchemaMember("CCSWeaponBaseGun", "m_nRevolverCylinderIdx")]
|
||||
public ref Int32 RevolverCylinderIdx => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBaseGun", "m_nRevolverCylinderIdx");
|
||||
|
||||
// m_bSkillReloadAvailable
|
||||
[SchemaMember("CCSWeaponBaseGun", "m_bSkillReloadAvailable")]
|
||||
public ref bool SkillReloadAvailable => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBaseGun", "m_bSkillReloadAvailable");
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CTablet : CCSWeaponBase
|
||||
{
|
||||
public CTablet (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
}
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CCSWeaponBaseShotgun : CCSWeaponBase
|
||||
{
|
||||
public CCSWeaponBaseShotgun (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
}
|
||||
@@ -26,6 +26,14 @@ public partial class CCSWeaponBaseVData : CBasePlayerWeaponVData
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_WeaponCategory")]
|
||||
public ref CSWeaponCategory WeaponCategory => ref Schema.GetRef<CSWeaponCategory>(this.Handle, "CCSWeaponBaseVData", "m_WeaponCategory");
|
||||
|
||||
// m_vecMuzzlePos0
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_vecMuzzlePos0")]
|
||||
public Vector MuzzlePos0 => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSWeaponBaseVData", "m_vecMuzzlePos0");
|
||||
|
||||
// m_vecMuzzlePos1
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_vecMuzzlePos1")]
|
||||
public Vector MuzzlePos1 => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSWeaponBaseVData", "m_vecMuzzlePos1");
|
||||
|
||||
// m_GearSlot
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_GearSlot")]
|
||||
public ref gear_slot_t GearSlot => ref Schema.GetRef<gear_slot_t>(this.Handle, "CCSWeaponBaseVData", "m_GearSlot");
|
||||
@@ -38,14 +46,6 @@ public partial class CCSWeaponBaseVData : CBasePlayerWeaponVData
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_DefaultLoadoutSlot")]
|
||||
public ref loadout_slot_t DefaultLoadoutSlot => ref Schema.GetRef<loadout_slot_t>(this.Handle, "CCSWeaponBaseVData", "m_DefaultLoadoutSlot");
|
||||
|
||||
// m_sWrongTeamMsg
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_sWrongTeamMsg")]
|
||||
public string WrongTeamMsg
|
||||
{
|
||||
get { return Schema.GetUtf8String(this.Handle, "CCSWeaponBaseVData", "m_sWrongTeamMsg"); }
|
||||
set { Schema.SetString(this.Handle, "CCSWeaponBaseVData", "m_sWrongTeamMsg", value); }
|
||||
}
|
||||
|
||||
// m_nPrice
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_nPrice")]
|
||||
public ref Int32 Price => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBaseVData", "m_nPrice");
|
||||
@@ -86,14 +86,6 @@ public partial class CCSWeaponBaseVData : CBasePlayerWeaponVData
|
||||
set { Schema.SetString(this.Handle, "CCSWeaponBaseVData", "m_szName", value); }
|
||||
}
|
||||
|
||||
// m_szAnimExtension
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_szAnimExtension")]
|
||||
public string AnimExtension
|
||||
{
|
||||
get { return Schema.GetUtf8String(this.Handle, "CCSWeaponBaseVData", "m_szAnimExtension"); }
|
||||
set { Schema.SetString(this.Handle, "CCSWeaponBaseVData", "m_szAnimExtension", value); }
|
||||
}
|
||||
|
||||
// m_eSilencerType
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_eSilencerType")]
|
||||
public ref CSWeaponSilencerType SilencerType => ref Schema.GetRef<CSWeaponSilencerType>(this.Handle, "CCSWeaponBaseVData", "m_eSilencerType");
|
||||
@@ -114,6 +106,10 @@ public partial class CCSWeaponBaseVData : CBasePlayerWeaponVData
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_nNumBullets")]
|
||||
public ref Int32 NumBullets => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBaseVData", "m_nNumBullets");
|
||||
|
||||
// m_bReloadsSingleShells
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_bReloadsSingleShells")]
|
||||
public ref bool ReloadsSingleShells => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBaseVData", "m_bReloadsSingleShells");
|
||||
|
||||
// m_flCycleTime
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_flCycleTime")]
|
||||
public CFiringModeFloat CycleTime => Schema.GetDeclaredClass<CFiringModeFloat>(this.Handle, "CCSWeaponBaseVData", "m_flCycleTime");
|
||||
@@ -186,6 +182,22 @@ public partial class CCSWeaponBaseVData : CBasePlayerWeaponVData
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_flInaccuracyReload")]
|
||||
public ref float InaccuracyReload => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBaseVData", "m_flInaccuracyReload");
|
||||
|
||||
// m_flDeployDuration
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_flDeployDuration")]
|
||||
public ref float DeployDuration => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBaseVData", "m_flDeployDuration");
|
||||
|
||||
// m_flDisallowAttackAfterReloadStartDuration
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_flDisallowAttackAfterReloadStartDuration")]
|
||||
public ref float DisallowAttackAfterReloadStartDuration => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBaseVData", "m_flDisallowAttackAfterReloadStartDuration");
|
||||
|
||||
// m_nBurstShotCount
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_nBurstShotCount")]
|
||||
public ref Int32 BurstShotCount => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBaseVData", "m_nBurstShotCount");
|
||||
|
||||
// m_bAllowBurstHolster
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_bAllowBurstHolster")]
|
||||
public ref bool AllowBurstHolster => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBaseVData", "m_bAllowBurstHolster");
|
||||
|
||||
// m_nRecoilSeed
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_nRecoilSeed")]
|
||||
public ref Int32 RecoilSeed => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBaseVData", "m_nRecoilSeed");
|
||||
@@ -194,22 +206,10 @@ public partial class CCSWeaponBaseVData : CBasePlayerWeaponVData
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_nSpreadSeed")]
|
||||
public ref Int32 SpreadSeed => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBaseVData", "m_nSpreadSeed");
|
||||
|
||||
// m_flTimeToIdleAfterFire
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_flTimeToIdleAfterFire")]
|
||||
public ref float TimeToIdleAfterFire => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBaseVData", "m_flTimeToIdleAfterFire");
|
||||
|
||||
// m_flIdleInterval
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_flIdleInterval")]
|
||||
public ref float IdleInterval => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBaseVData", "m_flIdleInterval");
|
||||
|
||||
// m_flAttackMovespeedFactor
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_flAttackMovespeedFactor")]
|
||||
public ref float AttackMovespeedFactor => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBaseVData", "m_flAttackMovespeedFactor");
|
||||
|
||||
// m_flHeatPerShot
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_flHeatPerShot")]
|
||||
public ref float HeatPerShot => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBaseVData", "m_flHeatPerShot");
|
||||
|
||||
// m_flInaccuracyPitchShift
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_flInaccuracyPitchShift")]
|
||||
public ref float InaccuracyPitchShift => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBaseVData", "m_flInaccuracyPitchShift");
|
||||
@@ -218,10 +218,6 @@ public partial class CCSWeaponBaseVData : CBasePlayerWeaponVData
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_flInaccuracyAltSoundThreshold")]
|
||||
public ref float InaccuracyAltSoundThreshold => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBaseVData", "m_flInaccuracyAltSoundThreshold");
|
||||
|
||||
// m_flBotAudibleRange
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_flBotAudibleRange")]
|
||||
public ref float BotAudibleRange => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBaseVData", "m_flBotAudibleRange");
|
||||
|
||||
// m_szUseRadioSubtitle
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_szUseRadioSubtitle")]
|
||||
public string UseRadioSubtitle
|
||||
@@ -282,14 +278,6 @@ public partial class CCSWeaponBaseVData : CBasePlayerWeaponVData
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_flIronSightLooseness")]
|
||||
public ref float IronSightLooseness => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBaseVData", "m_flIronSightLooseness");
|
||||
|
||||
// m_angPivotAngle
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_angPivotAngle")]
|
||||
public QAngle PivotAngle => Schema.GetDeclaredClass<QAngle>(this.Handle, "CCSWeaponBaseVData", "m_angPivotAngle");
|
||||
|
||||
// m_vecIronSightEyePos
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_vecIronSightEyePos")]
|
||||
public Vector IronSightEyePos => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSWeaponBaseVData", "m_vecIronSightEyePos");
|
||||
|
||||
// m_nDamage
|
||||
[SchemaMember("CCSWeaponBaseVData", "m_nDamage")]
|
||||
public ref Int32 Damage => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBaseVData", "m_nDamage");
|
||||
|
||||
@@ -18,10 +18,6 @@ public partial class CColorCorrectionVolume : CBaseTrigger
|
||||
{
|
||||
public CColorCorrectionVolume (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_bEnabled
|
||||
[SchemaMember("CColorCorrectionVolume", "m_bEnabled")]
|
||||
public ref bool Enabled => ref Schema.GetRef<bool>(this.Handle, "CColorCorrectionVolume", "m_bEnabled");
|
||||
|
||||
// m_MaxWeight
|
||||
[SchemaMember("CColorCorrectionVolume", "m_MaxWeight")]
|
||||
public ref float MaxWeight => ref Schema.GetRef<float>(this.Handle, "CColorCorrectionVolume", "m_MaxWeight");
|
||||
@@ -30,10 +26,6 @@ public partial class CColorCorrectionVolume : CBaseTrigger
|
||||
[SchemaMember("CColorCorrectionVolume", "m_FadeDuration")]
|
||||
public ref float FadeDuration => ref Schema.GetRef<float>(this.Handle, "CColorCorrectionVolume", "m_FadeDuration");
|
||||
|
||||
// m_bStartDisabled
|
||||
[SchemaMember("CColorCorrectionVolume", "m_bStartDisabled")]
|
||||
public ref bool StartDisabled => ref Schema.GetRef<bool>(this.Handle, "CColorCorrectionVolume", "m_bStartDisabled");
|
||||
|
||||
// m_Weight
|
||||
[SchemaMember("CColorCorrectionVolume", "m_Weight")]
|
||||
public ref float Weight => ref Schema.GetRef<float>(this.Handle, "CColorCorrectionVolume", "m_Weight");
|
||||
|
||||
@@ -58,17 +58,17 @@ public partial class CDamageRecord : NativeObject
|
||||
[SchemaMember("CDamageRecord", "m_RecipientXuid")]
|
||||
public ref UInt64 RecipientXuid => ref Schema.GetRef<UInt64>(this.Handle, "CDamageRecord", "m_RecipientXuid");
|
||||
|
||||
// m_iBulletsDamage
|
||||
[SchemaMember("CDamageRecord", "m_iBulletsDamage")]
|
||||
public ref Int32 BulletsDamage => ref Schema.GetRef<Int32>(this.Handle, "CDamageRecord", "m_iBulletsDamage");
|
||||
|
||||
// m_iDamage
|
||||
[SchemaMember("CDamageRecord", "m_iDamage")]
|
||||
public ref Int32 Damage => ref Schema.GetRef<Int32>(this.Handle, "CDamageRecord", "m_iDamage");
|
||||
// m_flBulletsDamage
|
||||
[SchemaMember("CDamageRecord", "m_flBulletsDamage")]
|
||||
public ref float BulletsDamage => ref Schema.GetRef<float>(this.Handle, "CDamageRecord", "m_flBulletsDamage");
|
||||
|
||||
// m_iActualHealthRemoved
|
||||
[SchemaMember("CDamageRecord", "m_iActualHealthRemoved")]
|
||||
public ref Int32 ActualHealthRemoved => ref Schema.GetRef<Int32>(this.Handle, "CDamageRecord", "m_iActualHealthRemoved");
|
||||
// m_flDamage
|
||||
[SchemaMember("CDamageRecord", "m_flDamage")]
|
||||
public ref float Damage => ref Schema.GetRef<float>(this.Handle, "CDamageRecord", "m_flDamage");
|
||||
|
||||
// m_flActualHealthRemoved
|
||||
[SchemaMember("CDamageRecord", "m_flActualHealthRemoved")]
|
||||
public ref float ActualHealthRemoved => ref Schema.GetRef<float>(this.Handle, "CDamageRecord", "m_flActualHealthRemoved");
|
||||
|
||||
// m_iNumHits
|
||||
[SchemaMember("CDamageRecord", "m_iNumHits")]
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CDecalGroupVData : NativeObject
|
||||
{
|
||||
public CDecalGroupVData (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_vecOptions
|
||||
[SchemaMember("CDecalGroupVData", "m_vecOptions")]
|
||||
public NetworkedVector<DecalGroupOption_t> Options => Schema.GetDeclaredClass<NetworkedVector<DecalGroupOption_t>>(this.Handle, "CDecalGroupVData", "m_vecOptions");
|
||||
|
||||
// m_flTotalProbability
|
||||
[SchemaMember("CDecalGroupVData", "m_flTotalProbability")]
|
||||
public ref float TotalProbability => ref Schema.GetRef<float>(this.Handle, "CDecalGroupVData", "m_flTotalProbability");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CDestructiblePartsComponent : NativeObject
|
||||
{
|
||||
public CDestructiblePartsComponent (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// __m_pChainEntity
|
||||
[SchemaMember("CDestructiblePartsComponent", "__m_pChainEntity")]
|
||||
public CNetworkVarChainer __m_pChainEntity => Schema.GetDeclaredClass<CNetworkVarChainer>(this.Handle, "CDestructiblePartsComponent", "__m_pChainEntity");
|
||||
|
||||
// m_vecDamageTakenByHitGroup
|
||||
[SchemaMember("CDestructiblePartsComponent", "m_vecDamageTakenByHitGroup")]
|
||||
public NetworkedVector<UInt16> DamageTakenByHitGroup => Schema.GetDeclaredClass<NetworkedVector<UInt16>>(this.Handle, "CDestructiblePartsComponent", "m_vecDamageTakenByHitGroup");
|
||||
|
||||
// m_hOwner
|
||||
[SchemaMember("CDestructiblePartsComponent", "m_hOwner")]
|
||||
public CHandle<CBaseModelEntity> Owner => Schema.GetDeclaredClass<CHandle<CBaseModelEntity>>(this.Handle, "CDestructiblePartsComponent", "m_hOwner");
|
||||
|
||||
// m_nLastHitDamageLevel
|
||||
[SchemaMember("CDestructiblePartsComponent", "m_nLastHitDamageLevel")]
|
||||
public ref Int32 LastHitDamageLevel => ref Schema.GetRef<Int32>(this.Handle, "CDestructiblePartsComponent", "m_nLastHitDamageLevel");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CDynamicNavConnectionsVolume : CTriggerMultiple
|
||||
{
|
||||
public CDynamicNavConnectionsVolume (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_iszConnectionTarget
|
||||
[SchemaMember("CDynamicNavConnectionsVolume", "m_iszConnectionTarget")]
|
||||
public string ConnectionTarget
|
||||
{
|
||||
get { return Schema.GetUtf8String(this.Handle, "CDynamicNavConnectionsVolume", "m_iszConnectionTarget"); }
|
||||
set { Schema.SetString(this.Handle, "CDynamicNavConnectionsVolume", "m_iszConnectionTarget", value); }
|
||||
}
|
||||
|
||||
// m_vecConnections
|
||||
[SchemaMember("CDynamicNavConnectionsVolume", "m_vecConnections")]
|
||||
public NetworkedVector<DynamicVolumeDef_t> Connections => Schema.GetDeclaredClass<NetworkedVector<DynamicVolumeDef_t>>(this.Handle, "CDynamicNavConnectionsVolume", "m_vecConnections");
|
||||
|
||||
// m_sTransitionType
|
||||
[SchemaMember("CDynamicNavConnectionsVolume", "m_sTransitionType")]
|
||||
public string TransitionType
|
||||
{
|
||||
get { return Schema.GetUtf8String(this.Handle, "CDynamicNavConnectionsVolume", "m_sTransitionType"); }
|
||||
set { Schema.SetString(this.Handle, "CDynamicNavConnectionsVolume", "m_sTransitionType", value); }
|
||||
}
|
||||
|
||||
// m_bConnectionsEnabled
|
||||
[SchemaMember("CDynamicNavConnectionsVolume", "m_bConnectionsEnabled")]
|
||||
public ref bool ConnectionsEnabled => ref Schema.GetRef<bool>(this.Handle, "CDynamicNavConnectionsVolume", "m_bConnectionsEnabled");
|
||||
|
||||
// m_flTargetAreaSearchRadius
|
||||
[SchemaMember("CDynamicNavConnectionsVolume", "m_flTargetAreaSearchRadius")]
|
||||
public ref float TargetAreaSearchRadius => ref Schema.GetRef<float>(this.Handle, "CDynamicNavConnectionsVolume", "m_flTargetAreaSearchRadius");
|
||||
|
||||
// m_flUpdateDistance
|
||||
[SchemaMember("CDynamicNavConnectionsVolume", "m_flUpdateDistance")]
|
||||
public ref float UpdateDistance => ref Schema.GetRef<float>(this.Handle, "CDynamicNavConnectionsVolume", "m_flUpdateDistance");
|
||||
|
||||
// m_flMaxConnectionDistance
|
||||
[SchemaMember("CDynamicNavConnectionsVolume", "m_flMaxConnectionDistance")]
|
||||
public ref float MaxConnectionDistance => ref Schema.GetRef<float>(this.Handle, "CDynamicNavConnectionsVolume", "m_flMaxConnectionDistance");
|
||||
|
||||
}
|
||||
@@ -50,10 +50,6 @@ public partial class CEntityFlame : CBaseEntity
|
||||
[SchemaMember("CEntityFlame", "m_hAttacker")]
|
||||
public CHandle<CBaseEntity> Attacker => Schema.GetDeclaredClass<CHandle<CBaseEntity>>(this.Handle, "CEntityFlame", "m_hAttacker");
|
||||
|
||||
// m_iDangerSound
|
||||
[SchemaMember("CEntityFlame", "m_iDangerSound")]
|
||||
public ref Int32 DangerSound => ref Schema.GetRef<Int32>(this.Handle, "CEntityFlame", "m_iDangerSound");
|
||||
|
||||
// m_flDirectDamagePerSecond
|
||||
[SchemaMember("CEntityFlame", "m_flDirectDamagePerSecond")]
|
||||
public ref float DirectDamagePerSecond => ref Schema.GetRef<float>(this.Handle, "CEntityFlame", "m_flDirectDamagePerSecond");
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user