mirror of
https://github.com/roflmuffin/CounterStrikeSharp.git
synced 2025-12-06 08:03:12 -08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7cae4be96d | ||
|
|
83bc1a95fb | ||
|
|
71c694b52e | ||
|
|
a452d79ba3 | ||
|
|
dfc9859806 | ||
|
|
f99f58402a | ||
|
|
6317559bd2 | ||
|
|
ad6e1ca2e2 | ||
|
|
2564ef9f39 |
@@ -1,21 +1,72 @@
|
||||
BasedOnStyle: LLVM
|
||||
|
||||
# Spacing
|
||||
IndentWidth: 4
|
||||
ColumnLimit: 100
|
||||
UseTab: Never
|
||||
ColumnLimit: 140
|
||||
|
||||
# Line Endings
|
||||
LineEnding: LF
|
||||
InsertNewlineAtEOF: true
|
||||
DerivePointerAlignment: false
|
||||
PointerAlignment: Left
|
||||
|
||||
AlignAfterOpenBracket: Align
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
SortIncludes: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
AllowAllArgumentsOnNextLine: true
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
IndentCaseLabels: false
|
||||
IndentCaseLabels: true
|
||||
|
||||
# Line Breaks
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: true
|
||||
AfterClass: true
|
||||
AfterStruct: true
|
||||
AfterControlStatement: Always
|
||||
AfterEnum: true
|
||||
AfterUnion: true
|
||||
AfterNamespace: false
|
||||
AfterFunction: true
|
||||
AfterNamespace: false
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
AfterExternBlock: true
|
||||
BeforeCatch: true
|
||||
BeforeElse: true
|
||||
BeforeLambdaBody: false
|
||||
BeforeWhile: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
|
||||
PointerAlignment: Left
|
||||
SortIncludes: CaseSensitive
|
||||
IncludeBlocks: Regroup
|
||||
IncludeCategories:
|
||||
# External headers in <> with extension or /
|
||||
- Regex: '<[-\w\/-_]+[\.\/][-\w\/-_]+>'
|
||||
Priority: 2
|
||||
# Standard headers in <>
|
||||
- Regex: '<[-\w\/-_]+>'
|
||||
Priority: 3
|
||||
# Local headers in ""
|
||||
- Regex: '"[-\w\/-_]*"'
|
||||
Priority: 4
|
||||
|
||||
ReflowComments: true
|
||||
CompactNamespaces: false
|
||||
Cpp11BracedListStyle: false
|
||||
|
||||
AlignConsecutiveMacros:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
|
||||
AlignEscapedNewlines: Left
|
||||
AlignTrailingComments: Never
|
||||
|
||||
AllowShortBlocksOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: OnlyFirstIf
|
||||
AllowShortLambdasOnASingleLine: Empty
|
||||
BinPackArguments: true
|
||||
BinPackParameters: false
|
||||
|
||||
LambdaBodyIndentation: OuterScope
|
||||
|
||||
14
.editorconfig
Normal file
14
.editorconfig
Normal file
@@ -0,0 +1,14 @@
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
max_line_length = 140
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.json]
|
||||
indent_size = 2
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,7 +2,6 @@
|
||||
.cmake/
|
||||
cmake-build-*/
|
||||
.kdev4/
|
||||
.vscode/
|
||||
generated/
|
||||
|
||||
# configure_file auto generated.
|
||||
|
||||
4
.vscode/settings.json
vendored
Normal file
4
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"editor.defaultFormatter": null,
|
||||
"editor.formatOnSave": true
|
||||
}
|
||||
@@ -70,7 +70,6 @@ SET(SOURCE_FILES
|
||||
src/core/memory_module.h
|
||||
src/core/memory_module.cpp
|
||||
src/core/cs2_sdk/interfaces/cgameresourceserviceserver.h
|
||||
src/core/cs2_sdk/interfaces/cschemasystem.h
|
||||
src/core/cs2_sdk/interfaces/cs2_interfaces.h
|
||||
src/core/cs2_sdk/interfaces/cs2_interfaces.cpp
|
||||
src/core/cs2_sdk/schema.h
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
},
|
||||
"CCSPlayerController_Respawn": {
|
||||
"offsets": {
|
||||
"windows": 244,
|
||||
"linux": 246
|
||||
"windows": 244,
|
||||
"linux": 246
|
||||
}
|
||||
},
|
||||
"CBasePlayerController_SetPawn": {
|
||||
@@ -42,15 +42,15 @@
|
||||
"CCSPlayerPawnBase_PostThink": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x8B\\xC4\\x48\\x89\\x48\\x08\\x55\\x53\\x56\\x57\\x41\\x56\\x48\\x8D\\xA8\\xD8\\xFE\\xFF\\xFF",
|
||||
"linux": "\\x55\\x48\\x89\\xE5\\x41\\x57\\x41\\x56\\x41\\x55\\x41\\x54\\x53\\x48\\x89\\xFB\\x48\\x81\\xEC\\x2A\\x2A\\x2A\\x2A\\xE8\\x2A\\x2A\\x2A\\x2A\\x48\\x89\\xDF"
|
||||
"windows": "\\x48\\x2A\\x2A\\x55\\x53\\x56\\x57\\x41\\x2A\\x48\\x2A\\x2A\\x2A\\x48\\x2A\\x2A\\x2A\\x2A\\x2A\\x2A\\x4C\\x89\\x68",
|
||||
"linux": "\\x55\\x48\\x89\\xE5\\x41\\x56\\x41\\x55\\x41\\x54\\x53\\x48\\x89\\xFB\\x48\\x83\\xEC\\x30\\xE8\\x2A\\x2A\\x2A\\x2A"
|
||||
}
|
||||
},
|
||||
"GiveNamedItem": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x89\\x5C\\x24\\x18\\x48\\x89\\x74\\x24\\x20\\x55\\x57\\x41\\x54\\x41\\x56\\x41\\x57\\x48\\x8D\\x6C\\x24\\xD9",
|
||||
"linux": "\\x55\\x48\\x89\\xE5\\x41\\x57\\x41\\x56\\x49\\x89\\xCE\\x41\\x55\\x49\\x89\\xF5\\x41\\x54\\x49\\x89\\xD4"
|
||||
"windows": "\\x48\\x89\\x5C\\x24\\x2A\\x48\\x89\\x74\\x24\\x2A\\x55\\x57\\x41\\x2A\\x41\\x2A\\x41\\x2A\\x48\\x2A\\x2A\\x2A\\x2A\\x48\\x2A\\x2A\\x2A\\x2A\\x2A\\x2A\\x4D\\x2A\\x2A\\x48",
|
||||
"linux": "\\x55\\x48\\x89\\xE5\\x41\\x57\\x41\\x56\\x49\\x89\\x2A\\x41\\x55\\x49\\x89\\x2A\\x41\\x54\\x2A\\x2A\\x2A\\x2F\\xB6\\x77\\x00"
|
||||
}
|
||||
},
|
||||
"UTIL_Remove": {
|
||||
@@ -69,9 +69,9 @@
|
||||
},
|
||||
"CBaseModelEntity_SetModel": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x89\\x5C\\x24\\x2A\\x48\\x89\\x7C\\x24\\x2A\\x55\\x48\\x8B\\xEC\\x48\\x83\\xEC\\x50\\x48\\x8B\\xF9\\x4C\\x8B\\xC2",
|
||||
"linux": "\\x55\\x48\\x89\\xF2\\x48\\x89\\xE5\\x41\\x54\\x49\\x89\\xFC\\x48\\x8D\\x7D\\xE0\\x48\\x83\\xEC\\x2A\\x48\\x8D\\x05\\x2A\\x2A\\x2A\\x2A\\x48\\x8B\\x30\\x48\\x8B\\x06"
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x89\\x5C\\x24\\x2A\\x48\\x89\\x7C\\x24\\x2A\\x55\\x48\\x8B\\xEC\\x48\\x83\\xEC\\x50\\x48\\x8B\\xF9\\x4C\\x8B\\xC2",
|
||||
"linux": "\\x55\\x48\\x89\\xF2\\x48\\x89\\xE5\\x41\\x54\\x49\\x89\\xFC\\x48\\x8D\\x7D\\xE0\\x48\\x83\\xEC\\x2A\\x48\\x8D\\x05\\x2A\\x2A\\x2A\\x2A\\x48\\x8B\\x30\\x48\\x8B\\x06"
|
||||
}
|
||||
},
|
||||
"CCSPlayer_WeaponServices_CanUse": {
|
||||
@@ -83,42 +83,42 @@
|
||||
},
|
||||
"CCSPlayer_ItemServices_DropActivePlayerWeapon": {
|
||||
"offsets": {
|
||||
"windows": 18,
|
||||
"linux": 19
|
||||
"windows": 18,
|
||||
"linux": 19
|
||||
}
|
||||
},
|
||||
"CCSPlayer_ItemServices_RemoveWeapons": {
|
||||
"offsets": {
|
||||
"windows": 19,
|
||||
"linux": 20
|
||||
}
|
||||
"offsets": {
|
||||
"windows": 19,
|
||||
"linux": 20
|
||||
}
|
||||
},
|
||||
"CGameSceneNode_GetSkeletonInstance": {
|
||||
"offsets": {
|
||||
"windows": 8,
|
||||
"linux": 8
|
||||
"windows": 8,
|
||||
"linux": 8
|
||||
}
|
||||
},
|
||||
"CCSGameRules_TerminateRound": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x8B\\xC4\\x4C\\x89\\x48\\x20\\x55\\x57",
|
||||
"linux": "\\x55\\x48\\x89\\xE5\\x41\\x57\\x41\\x56\\x41\\x55\\x41\\x54\\x49\\x89\\xFC\\x53\\x48\\x81\\xEC\\xE8\\x01\\x00\\x00\\x48\\x8D\\x05\\x2A\\x2A\\x2A\\x2A"
|
||||
}
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x2A\\x2A\\x4C\\x89\\x48\\x2A\\x48\\x89\\x48\\x2A\\x55\\x41",
|
||||
"linux": "\\x55\\x48\\x89\\xE5\\x41\\x57\\x41\\x56\\x41\\x55\\x41\\x54\\x49\\x89\\xFC\\x53\\x48\\x81\\xEC\\xE8\\x01\\x00\\x00\\x48\\x8D\\x05\\x2A\\x2A\\x2A\\x2A"
|
||||
}
|
||||
},
|
||||
"UTIL_CreateEntityByName": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x83\\xEC\\x48\\xC6\\x44\\x24\\x30\\x00",
|
||||
"linux": "\\x48\\x8D\\x05\\x2A\\x2A\\x2A\\x2A\\x55\\x48\\x89\\xFA"
|
||||
}
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x83\\xEC\\x48\\xC6\\x44\\x24\\x30\\x00",
|
||||
"linux": "\\x48\\x8D\\x05\\x2A\\x2A\\x2A\\x2A\\x55\\x48\\x89\\xFA"
|
||||
}
|
||||
},
|
||||
"CBaseEntity_DispatchSpawn": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x89\\x5C\\x24\\x10\\x57\\x48\\x83\\xEC\\x30\\x48\\x8B\\xDA\\x48\\x8B\\xF9\\x48\\x85\\xC9",
|
||||
"linux": "\\x48\\x85\\xFF\\x74\\x2A\\x55\\x48\\x89\\xE5\\x41\\x56"
|
||||
}
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x89\\x5C\\x24\\x10\\x57\\x48\\x83\\xEC\\x30\\x48\\x8B\\xDA\\x48\\x8B\\xF9\\x48\\x85\\xC9",
|
||||
"linux": "\\x48\\x85\\xFF\\x74\\x2A\\x55\\x48\\x89\\xE5\\x41\\x56"
|
||||
}
|
||||
},
|
||||
"CEntityInstance_AcceptInput": {
|
||||
"signatures": {
|
||||
@@ -143,8 +143,8 @@
|
||||
"CBasePlayerPawn_RemovePlayerItem": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"linux": "\\x55\\x48\\x89\\x2A\\x41\\x2A\\x49\\x89\\x2A\\x41\\x2A\\x49\\x89\\x2A\\xE8\\x2A\\x2A\\x2A\\x2A\\x49\\x39",
|
||||
"windows": "\\x48\\x85\\xD2\\x0F\\x84\\x2A\\x2A\\x2A\\x2A\\x48\\x89\\x5C\\x24\\x08\\x57\\x48\\x83\\xEC\\x30\\x48\\x8B\\xDA"
|
||||
"windows": "\\x48\\x2A\\x2A\\x0F\\x84\\x2A\\x2A\\x2A\\x2A\\x48\\x89\\x5C\\x24\\x2A\\x57\\x48\\x2A\\x2A\\x2A\\x48\\x2A\\x2A\\x48\\x2A\\x2A\\xE8",
|
||||
"linux": "\\x55\\x48\\x89\\x2A\\x41\\x2A\\x49\\x89\\x2A\\x41\\x2A\\x49\\x89\\x2A\\xE8\\x2A\\x2A\\x2A\\x2A\\x49\\x39"
|
||||
}
|
||||
},
|
||||
"CBaseEntity_Teleport": {
|
||||
|
||||
37
eng/formatting/download-tools.ps1
Normal file
37
eng/formatting/download-tools.ps1
Normal file
@@ -0,0 +1,37 @@
|
||||
# Tool taken from dotnet/runtime
|
||||
# https://github.com/dotnet/runtime/blob/a8158c170b694f8c1dbae114c63c346b38244901/eng/formatting/download-tools.ps1
|
||||
|
||||
function DownloadClangTool {
|
||||
param (
|
||||
[string]
|
||||
$toolName,
|
||||
[string]
|
||||
$downloadOutputPath
|
||||
)
|
||||
|
||||
$clangVersion = "17.0.6"
|
||||
$clangToolsRootUrl = "https://clrjit2.blob.core.windows.net/clang-tools"
|
||||
$clangPlatform = "windows-x64"
|
||||
|
||||
$toolUrl = "$clangToolsRootUrl/$clangVersion/$clangPlatform/$toolName.exe"
|
||||
$targetPath = "$downloadOutputPath\$toolName.exe"
|
||||
|
||||
if (-not $(ls $downloadOutputPath | Where-Object { $_.Name -eq "$toolName.exe" })) {
|
||||
Write-Output "Downloading '$toolUrl' to '$targetPath'"
|
||||
# Pass -PassThru as otherwise Invoke-WebRequest leaves a corrupted file if the download fails. With -PassThru the download is buffered first.
|
||||
# -UseBasicParsing is necessary for older PowerShells when Internet Explorer might not be installed/configured
|
||||
$null = Invoke-WebRequest -Uri "$toolUrl" -OutFile $(Join-Path $downloadOutputPath -ChildPath "$toolName.exe") -PassThru -UseBasicParsing
|
||||
}
|
||||
else {
|
||||
Write-Output "Found '$targetPath'"
|
||||
}
|
||||
}
|
||||
|
||||
$downloadPathFolder = Split-Path $PSScriptRoot -Parent | Split-Path -Parent | Join-Path -ChildPath "artifacts" | Join-Path -ChildPath "tools"
|
||||
|
||||
mkdir $downloadPathFolder -ErrorAction SilentlyContinue
|
||||
|
||||
DownloadClangTool "clang-format" "$downloadPathFolder"
|
||||
|
||||
# Add to path to enable scripts to skip additional downloading steps since the tools will already be on the path.
|
||||
$env:PATH = "$downloadPathFolder;$env:PATH"
|
||||
60
eng/formatting/download-tools.sh
Normal file
60
eng/formatting/download-tools.sh
Normal file
@@ -0,0 +1,60 @@
|
||||
# Tool taken from dotnet/runtime
|
||||
# https://github.com/dotnet/runtime/blob/a8158c170b694f8c1dbae114c63c346b38244901/eng/formatting/download-tools.sh
|
||||
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ue
|
||||
|
||||
source="${BASH_SOURCE[0]}"
|
||||
|
||||
# resolve $source until the file is no longer a symlink
|
||||
while [[ -h "$source" ]]; do
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
source="$(readlink "$source")"
|
||||
# if $source was a relative symlink, we need to resolve it relative to the path where the
|
||||
# symlink file was located
|
||||
[[ $source != /* ]] && source="$scriptroot/$source"
|
||||
done
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
|
||||
function DownloadClangTool {
|
||||
|
||||
clangVersion="17.0.6"
|
||||
clangToolsRootUrl="https://clrjit2.blob.core.windows.net/clang-tools"
|
||||
|
||||
clangPlatform="$(dotnet --info | grep 'RID:')"
|
||||
clangPlatform="${clangPlatform##*RID:* }"
|
||||
echo "dotnet RID: ${clangPlatform}"
|
||||
|
||||
# override common RIDs with compatible version so we don't need to upload binaries for each RID
|
||||
case $clangPlatform in
|
||||
ubuntu.*-x64)
|
||||
clangPlatform=linux-x64
|
||||
;;
|
||||
esac
|
||||
|
||||
toolUrl="${clangToolsRootUrl}/${clangVersion}/${clangPlatform}/$1"
|
||||
toolOutput=$2/$1
|
||||
|
||||
echo "Downloading $1 from ${toolUrl} to ${toolOutput}"
|
||||
|
||||
if [[ ! -x "$toolOutput" ]]; then
|
||||
curl --silent --retry 5 --fail -o "${toolOutput}" "$toolUrl"
|
||||
chmod 751 $toolOutput
|
||||
fi
|
||||
|
||||
if [[ ! -x "$toolOutput" ]]; then
|
||||
echo "Failed to download $1"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
engFolder="$(cd -P "$( dirname "$scriptroot" )" && pwd )"
|
||||
downloadPathFolder="$(cd -P "$( dirname "$engFolder" )" && pwd )/artifacts/tools"
|
||||
|
||||
mkdir -p "$downloadPathFolder"
|
||||
|
||||
DownloadClangTool "clang-format" "$downloadPathFolder"
|
||||
|
||||
export PATH=$downloadPathFolder:$PATH
|
||||
29
eng/formatting/format.sh
Normal file
29
eng/formatting/format.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
# Tool taken from dotnet/runtime
|
||||
# https://github.com/dotnet/runtime/blob/a8158c170b694f8c1dbae114c63c346b38244901/eng/formatting/format.sh
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
LC_ALL=C
|
||||
# Select files to format
|
||||
NATIVE_FILES=$(git diff --cached --name-only --diff-filter=ACM "*.h" "*.hpp" "*.c" "*.cpp" "*.inl" | sed 's| |\\ |g')
|
||||
MANAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM "*.cs" "*.vb" | sed 's| |\\ |g')
|
||||
|
||||
exec 1>&2
|
||||
|
||||
if [ -n "$NATIVE_FILES" ]; then
|
||||
# Format all selected files
|
||||
echo "$NATIVE_FILES" | cat | xargs | sed -e 's/ /,/g' | xargs "./artifacts/tools/clang-format" -style=file -i
|
||||
|
||||
# Add back the modified files to staging
|
||||
echo "$NATIVE_FILES" | xargs git add
|
||||
fi
|
||||
|
||||
if [ -n "$MANAGED_FILES" ]; then
|
||||
# Format all selected files
|
||||
echo "$MANAGED_FILES" | cat | xargs | sed -e 's/ /,/g' | dotnet format whitespace --include - --folder
|
||||
|
||||
# Add back the modified files to staging
|
||||
echo "$MANAGED_FILES" | xargs git add
|
||||
fi
|
||||
|
||||
exit 0
|
||||
71
eng/install/install.ps1
Normal file
71
eng/install/install.ps1
Normal file
@@ -0,0 +1,71 @@
|
||||
# Install script that downloads Metamod:Source and Counter-Strike Sharp (with runtime)
|
||||
|
||||
$MM_DOWNLOAD_URL = "https://mms.alliedmods.net/mmsdrop/2.0/mmsource-2.0.0-git1286-windows.zip"
|
||||
$TARGET_DIR = "./game/csgo"
|
||||
$GAMEINFO_FILE = Join-Path $TARGET_DIR "gameinfo.gi"
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
|
||||
# Verification
|
||||
if (-not (Test-Path $GAMEINFO_FILE)) {
|
||||
Write-Error "Error: $GAMEINFO_FILE does not exist in the specified directory."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# GitHub API for Counter-Strike Sharp Releases
|
||||
$RELEASE_INFO = (Invoke-WebRequest -Uri "https://api.github.com/repos/roflmuffin/CounterStrikeSharp/releases/latest").Content | ConvertFrom-Json
|
||||
|
||||
# Filtering download URLs
|
||||
$CSSHARP_DOWNLOAD_URL = $RELEASE_INFO.assets |
|
||||
Where-Object { $_.browser_download_url -like '*windows*.zip*' -and $_.browser_download_url -notlike '*with-runtime*' } |
|
||||
Select-Object -First 1 -ExpandProperty browser_download_url
|
||||
|
||||
$CSSHARP_RUNTIME_DOWNLOAD_URL = $RELEASE_INFO.assets |
|
||||
Where-Object { $_.browser_download_url -like '*windows*.zip*' -and $_.browser_download_url -like '*with-runtime*' } |
|
||||
Select-Object -First 1 -ExpandProperty browser_download_url
|
||||
|
||||
### METAMOD:SOURCE ###
|
||||
Write-Output "Downloading Metamod:Source..."
|
||||
|
||||
Invoke-WebRequest -Uri $MM_DOWNLOAD_URL -OutFile metamod.zip
|
||||
Write-Output "Extracting Metamod:Source to $TARGET_DIR..."
|
||||
Expand-Archive -Force -Path metamod.zip -DestinationPath $TARGET_DIR
|
||||
Remove-Item metamod.zip
|
||||
|
||||
### GAMEINFO.GI UPDATE ###
|
||||
$NEW_ENTRY = " Game csgo/addons/metamod"
|
||||
$FILE_CONTENT = Get-Content $GAMEINFO_FILE
|
||||
|
||||
Write-Output "Updating $GAMEINFO_FILE..."
|
||||
if ($FILE_CONTENT -contains $NEW_ENTRY) {
|
||||
Write-Output "The entry '$NEW_ENTRY' already exists in $GAMEINFO_FILE. No changes were made."
|
||||
} else {
|
||||
$Pattern = "Game_LowViolence"
|
||||
$Modified = $false
|
||||
$NewContent = @()
|
||||
|
||||
foreach ($line in $FILE_CONTENT) {
|
||||
if ($line -match $Pattern -and -not $Modified) {
|
||||
$NewContent += $line
|
||||
$NewContent += $NEW_ENTRY
|
||||
$Modified = $true
|
||||
} else {
|
||||
$NewContent += $line
|
||||
}
|
||||
}
|
||||
|
||||
$NewContent | Set-Content $GAMEINFO_FILE
|
||||
Write-Host "The file $GAMEINFO_FILE has been modified successfully. '$NEW_ENTRY' has been added."
|
||||
}
|
||||
|
||||
### COUNTER-STRIKE SHARP ###
|
||||
Write-Output "Downloading Counter-Strike Sharp (with runtime)..."
|
||||
|
||||
# Determine if runtime needs to be downloaded
|
||||
if (-not (Test-Path "./game/csgo/addons/CounterStrikeSharp/dotnet/dotnet.exe")) {
|
||||
$CSSHARP_DOWNLOAD_URL = $CSSHARP_RUNTIME_DOWNLOAD_URL
|
||||
}
|
||||
|
||||
Invoke-WebRequest -Uri $CSSHARP_DOWNLOAD_URL -OutFile cssharp.zip
|
||||
Write-Output "Extracting Counter-Strike Sharp to $TARGET_DIR..."
|
||||
Expand-Archive -Force -Path cssharp.zip -DestinationPath $TARGET_DIR
|
||||
Remove-Item cssharp.zip
|
||||
72
eng/install/install.sh
Executable file
72
eng/install/install.sh
Executable file
@@ -0,0 +1,72 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Install script that downloads Metamod:Source and Counter-Strike Sharp (with runtime)
|
||||
|
||||
MM_DOWNLOAD_URL="https://mms.alliedmods.net/mmsdrop/2.0/mmsource-2.0.0-git1286-linux.tar.gz"
|
||||
TARGET_DIR="./game/csgo"
|
||||
GAMEINFO_FILE="${TARGET_DIR}/gameinfo.gi"
|
||||
|
||||
if [ ! -f "${GAMEINFO_FILE}" ]; then
|
||||
printf "Error: %s does not exist in the specified directory.\n" "$GAMEINFO_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
RELEASE_INFO=$(curl -s https://api.github.com/repos/roflmuffin/CounterStrikeSharp/releases/latest)
|
||||
|
||||
# Filter and store download URLs
|
||||
CSSHARP_DOWNLOAD_URL=$(echo "$RELEASE_INFO" | grep -o "browser_download_url.*linux.*\.zip" | cut -d '"' -f 3 | grep -v "with-runtime")
|
||||
CSSHARP_RUNTIME_DOWNLOAD_URL=$(echo "$RELEASE_INFO" | grep -o "browser_download_url.*linux.*\.zip" | cut -d '"' -f 3 | grep "with-runtime")
|
||||
|
||||
### METAMOD:SOURCE ###
|
||||
printf "Downloading Metamod:Source...\n"
|
||||
|
||||
curl -s -L -o metamod.tar.gz "$MM_DOWNLOAD_URL"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
printf "Extracting Metamod:Source to %s...\n" "$TARGET_DIR"
|
||||
tar -xzf metamod.tar.gz -C "$TARGET_DIR"
|
||||
|
||||
rm metamod.tar.gz
|
||||
else
|
||||
echo "Download failed. Please check the URL and your connection."
|
||||
fi
|
||||
|
||||
### GAMEINFO.GI UPDATE ###
|
||||
NEW_ENTRY=" Game csgo/addons/metamod"
|
||||
|
||||
printf "Updating %s...\n" "$GAMEINFO_FILE"
|
||||
if grep -Fxq "$NEW_ENTRY" "$GAMEINFO_FILE"; then
|
||||
echo "The entry '$(echo $NEW_ENTRY | xargs)' already exists in ${GAMEINFO_FILE}. No changes were made."
|
||||
else
|
||||
awk -v new_entry="$NEW_ENTRY" '
|
||||
BEGIN { found=0; }
|
||||
// {
|
||||
if (found) {
|
||||
print new_entry;
|
||||
found=0;
|
||||
}
|
||||
print;
|
||||
}
|
||||
/Game_LowViolence/ { found=1; }
|
||||
' "$GAMEINFO_FILE" > "$GAMEINFO_FILE.tmp" && mv "$GAMEINFO_FILE.tmp" "$GAMEINFO_FILE"
|
||||
|
||||
printf "The file %s has been modified successfully. '%s' has been added.\n" "$GAMEINFO_FILE" "$(echo $NEW_ENTRY | xargs)"
|
||||
fi
|
||||
|
||||
printf "Downloading Counter-Strike Sharp (with runtime)...\n"
|
||||
|
||||
# If ./game/csgo/addons/CounterStrikeSharp/dotnet/dotnet does not exist, use the runtime download url
|
||||
if [ ! -f "./game/csgo/addons/CounterStrikeSharp/dotnet/dotnet" ]; then
|
||||
CSSHARP_DOWNLOAD_URL="$CSSHARP_RUNTIME_DOWNLOAD_URL"
|
||||
fi
|
||||
|
||||
curl -s -L -o cssharp.zip "$CSSHARP_DOWNLOAD_URL"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
printf "Extracting Counter-Strike Sharp to %s...\n" "$TARGET_DIR"
|
||||
unzip -q -o cssharp.zip -d "$TARGET_DIR"
|
||||
|
||||
rm cssharp.zip
|
||||
else
|
||||
echo "Download failed. Please check the URL and your connection."
|
||||
fi
|
||||
Submodule libraries/hl2sdk-cs2 updated: 43bfe744a1...aaaaaf040b
@@ -12,7 +12,7 @@ set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING
|
||||
)
|
||||
|
||||
# TODO: Use C++20 instead.
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
if (LINUX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
@@ -55,6 +55,7 @@ include_directories(
|
||||
${SOURCESDK}/public/entity2
|
||||
${SOURCESDK}/public/game/server
|
||||
${SOURCESDK}/public/entity2
|
||||
${SOURCESDK}/public/schemasystem
|
||||
${METAMOD_DIR}/core
|
||||
${METAMOD_DIR}/core/sourcehook
|
||||
libraries/dyncall/dynload
|
||||
|
||||
@@ -1,22 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids -->
|
||||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<Suppression>
|
||||
<DiagnosticId>CP0002</DiagnosticId>
|
||||
<Target>F:CounterStrikeSharp.API.Core.BasePlugin.ConvarChangeHandlers</Target>
|
||||
<Left>.\ApiCompat\v202.dll</Left>
|
||||
<Right>obj\Debug\net8.0\CounterStrikeSharp.API.dll</Right>
|
||||
</Suppression>
|
||||
<Suppression>
|
||||
<DiagnosticId>CP0002</DiagnosticId>
|
||||
<Target>M:CounterStrikeSharp.API.Core.CC4.get_DroppedFromDeath</Target>
|
||||
<Left>.\ApiCompat\v202.dll</Left>
|
||||
<Right>obj\Debug\net8.0\CounterStrikeSharp.API.dll</Right>
|
||||
</Suppression>
|
||||
<Suppression>
|
||||
<DiagnosticId>CP0002</DiagnosticId>
|
||||
<Target>M:CounterStrikeSharp.API.Core.CCSGameRules.get_RoundStartTicks</Target>
|
||||
<Left>.\ApiCompat\v202.dll</Left>
|
||||
<Right>obj\Debug\net8.0\CounterStrikeSharp.API.dll</Right>
|
||||
</Suppression>
|
||||
<Suppression>
|
||||
<DiagnosticId>CP0002</DiagnosticId>
|
||||
<Target>M:CounterStrikeSharp.API.Core.CCSPlayerPawnBase.get_InvalidSteamLogonDelayed</Target>
|
||||
<Left>.\ApiCompat\v202.dll</Left>
|
||||
<Right>obj\Debug\net8.0\CounterStrikeSharp.API.dll</Right>
|
||||
</Suppression>
|
||||
<Suppression>
|
||||
<DiagnosticId>CP0002</DiagnosticId>
|
||||
<Target>M:CounterStrikeSharp.API.Core.CCSPlayerPawnBase.get_LastAction</Target>
|
||||
<Left>.\ApiCompat\v202.dll</Left>
|
||||
<Right>obj\Debug\net8.0\CounterStrikeSharp.API.dll</Right>
|
||||
</Suppression>
|
||||
<Suppression>
|
||||
<DiagnosticId>CP0002</DiagnosticId>
|
||||
<Target>M:CounterStrikeSharp.API.Core.CPlantedC4.get_PlantedAfterPickup</Target>
|
||||
<Left>.\ApiCompat\v202.dll</Left>
|
||||
<Right>obj\Debug\net8.0\CounterStrikeSharp.API.dll</Right>
|
||||
</Suppression>
|
||||
<Suppression>
|
||||
<DiagnosticId>CP0005</DiagnosticId>
|
||||
<Target>M:CounterStrikeSharp.API.Modules.Menu.BaseMenu.Open(CounterStrikeSharp.API.Core.CCSPlayerController)</Target>
|
||||
<Left>.\ApiCompat\v202.dll</Left>
|
||||
<Right>obj\Release\net8.0\CounterStrikeSharp.API.dll</Right>
|
||||
<Right>obj\Debug\net8.0\CounterStrikeSharp.API.dll</Right>
|
||||
</Suppression>
|
||||
<Suppression>
|
||||
<DiagnosticId>CP0006</DiagnosticId>
|
||||
<Target>M:CounterStrikeSharp.API.Modules.Menu.IMenu.Open(CounterStrikeSharp.API.Core.CCSPlayerController)</Target>
|
||||
<Left>.\ApiCompat\v202.dll</Left>
|
||||
<Right>obj\Release\net8.0\CounterStrikeSharp.API.dll</Right>
|
||||
<Right>obj\Debug\net8.0\CounterStrikeSharp.API.dll</Right>
|
||||
</Suppression>
|
||||
<Suppression>
|
||||
<DiagnosticId>CP0006</DiagnosticId>
|
||||
<Target>M:CounterStrikeSharp.API.Modules.Menu.IMenu.OpenToAll</Target>
|
||||
<Left>.\ApiCompat\v202.dll</Left>
|
||||
<Right>obj\Release\net8.0\CounterStrikeSharp.API.dll</Right>
|
||||
<Right>obj\Debug\net8.0\CounterStrikeSharp.API.dll</Right>
|
||||
</Suppression>
|
||||
<Suppression>
|
||||
<DiagnosticId>CP0011</DiagnosticId>
|
||||
<Target>F:CounterStrikeSharp.API.Core.PulseValueType_t.PVAL_COUNT</Target>
|
||||
<Left>.\ApiCompat\v202.dll</Left>
|
||||
<Right>obj\Debug\net8.0\CounterStrikeSharp.API.dll</Right>
|
||||
</Suppression>
|
||||
</Suppressions>
|
||||
@@ -4646,6 +4646,14 @@ namespace CounterStrikeSharp.API.Core
|
||||
get => Get<int>("hitgroup");
|
||||
set => Set<int>("hitgroup", value);
|
||||
}
|
||||
|
||||
|
||||
// attacker was in midair
|
||||
public bool Attackerinair
|
||||
{
|
||||
get => Get<bool>("attackerinair");
|
||||
set => Set<bool>("attackerinair", value);
|
||||
}
|
||||
}
|
||||
|
||||
[EventName("player_decal")]
|
||||
|
||||
@@ -36,7 +36,7 @@ public class PluginManager : IPluginManager
|
||||
config => { config.PreferSharedTypes = true; });
|
||||
var assembly = loader.LoadDefaultAssembly();
|
||||
|
||||
_sharedAssemblies[assembly.GetName().FullName] = assembly;
|
||||
_sharedAssemblies[assembly.GetName().Name] = assembly;
|
||||
}
|
||||
|
||||
private void LoadSharedLibraries()
|
||||
@@ -76,7 +76,7 @@ public class PluginManager : IPluginManager
|
||||
_loadedSharedLibs = true;
|
||||
}
|
||||
|
||||
if (!_sharedAssemblies.TryGetValue(name.FullName, out var assembly))
|
||||
if (!_sharedAssemblies.TryGetValue(name.Name, out var assembly))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -124,4 +124,4 @@ public class PluginManager : IPluginManager
|
||||
_loadedPluginContexts.Add(plugin);
|
||||
plugin.Load();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,10 @@ public partial class CBaseCSGrenade : CCSWeaponBase
|
||||
[SchemaMember("CBaseCSGrenade", "m_fDropTime")]
|
||||
public ref float DropTime => ref Schema.GetRef<float>(this.Handle, "CBaseCSGrenade", "m_fDropTime");
|
||||
|
||||
// m_fPinPullTime
|
||||
[SchemaMember("CBaseCSGrenade", "m_fPinPullTime")]
|
||||
public ref float PinPullTime => ref Schema.GetRef<float>(this.Handle, "CBaseCSGrenade", "m_fPinPullTime");
|
||||
|
||||
// m_bJustPulledPin
|
||||
[SchemaMember("CBaseCSGrenade", "m_bJustPulledPin")]
|
||||
public ref bool JustPulledPin => ref Schema.GetRef<bool>(this.Handle, "CBaseCSGrenade", "m_bJustPulledPin");
|
||||
|
||||
@@ -31,7 +31,7 @@ public partial class CBaseIssue : NativeObject
|
||||
public string DetailsString
|
||||
{
|
||||
get { return Schema.GetString(this.Handle, "CBaseIssue", "m_szDetailsString"); }
|
||||
set { Schema.SetStringBytes(this.Handle, "CBaseIssue", "m_szDetailsString", value, 260); }
|
||||
set { Schema.SetStringBytes(this.Handle, "CBaseIssue", "m_szDetailsString", value, 4096); }
|
||||
}
|
||||
|
||||
// m_iNumYesVotes
|
||||
|
||||
@@ -62,8 +62,4 @@ public partial class CC4 : CCSWeaponBase
|
||||
[SchemaMember("CC4", "m_bBombPlanted")]
|
||||
public ref bool BombPlanted => ref Schema.GetRef<bool>(this.Handle, "CC4", "m_bBombPlanted");
|
||||
|
||||
// m_bDroppedFromDeath
|
||||
[SchemaMember("CC4", "m_bDroppedFromDeath")]
|
||||
public ref bool DroppedFromDeath => ref Schema.GetRef<bool>(this.Handle, "CC4", "m_bDroppedFromDeath");
|
||||
|
||||
}
|
||||
|
||||
@@ -450,6 +450,10 @@ public partial class CCSGameRules : CTeamplayRules
|
||||
[SchemaMember("CCSGameRules", "m_arrSelectedHostageSpawnIndices")]
|
||||
public NetworkedVector<Int32> SelectedHostageSpawnIndices => Schema.GetDeclaredClass<NetworkedVector<Int32>>(this.Handle, "CCSGameRules", "m_arrSelectedHostageSpawnIndices");
|
||||
|
||||
// m_nSpawnPointsRandomSeed
|
||||
[SchemaMember("CCSGameRules", "m_nSpawnPointsRandomSeed")]
|
||||
public ref Int32 SpawnPointsRandomSeed => ref Schema.GetRef<Int32>(this.Handle, "CCSGameRules", "m_nSpawnPointsRandomSeed");
|
||||
|
||||
// m_bFirstConnected
|
||||
[SchemaMember("CCSGameRules", "m_bFirstConnected")]
|
||||
public ref bool FirstConnected => ref Schema.GetRef<bool>(this.Handle, "CCSGameRules", "m_bFirstConnected");
|
||||
@@ -482,6 +486,10 @@ public partial class CCSGameRules : CTeamplayRules
|
||||
[SchemaMember("CCSGameRules", "m_numQueuedMatchmakingAccounts")]
|
||||
public ref UInt32 NumQueuedMatchmakingAccounts => ref Schema.GetRef<UInt32>(this.Handle, "CCSGameRules", "m_numQueuedMatchmakingAccounts");
|
||||
|
||||
// m_fAvgPlayerRank
|
||||
[SchemaMember("CCSGameRules", "m_fAvgPlayerRank")]
|
||||
public ref float AvgPlayerRank => ref Schema.GetRef<float>(this.Handle, "CCSGameRules", "m_fAvgPlayerRank");
|
||||
|
||||
// m_pQueuedMatchmakingReservationString
|
||||
[SchemaMember("CCSGameRules", "m_pQueuedMatchmakingReservationString")]
|
||||
public string QueuedMatchmakingReservationString
|
||||
@@ -686,14 +694,26 @@ public partial class CCSGameRules : CTeamplayRules
|
||||
[SchemaMember("CCSGameRules", "m_TerroristSpawnPointsMasterList")]
|
||||
public NetworkedVector<SpawnPoint?> TerroristSpawnPointsMasterList => Schema.GetDeclaredClass<NetworkedVector<SpawnPoint?>>(this.Handle, "CCSGameRules", "m_TerroristSpawnPointsMasterList");
|
||||
|
||||
// m_bRespawningAllRespawnablePlayers
|
||||
[SchemaMember("CCSGameRules", "m_bRespawningAllRespawnablePlayers")]
|
||||
public ref bool RespawningAllRespawnablePlayers => ref Schema.GetRef<bool>(this.Handle, "CCSGameRules", "m_bRespawningAllRespawnablePlayers");
|
||||
|
||||
// m_iNextCTSpawnPoint
|
||||
[SchemaMember("CCSGameRules", "m_iNextCTSpawnPoint")]
|
||||
public ref Int32 NextCTSpawnPoint => ref Schema.GetRef<Int32>(this.Handle, "CCSGameRules", "m_iNextCTSpawnPoint");
|
||||
|
||||
// m_flCTSpawnPointUsedTime
|
||||
[SchemaMember("CCSGameRules", "m_flCTSpawnPointUsedTime")]
|
||||
public ref float CTSpawnPointUsedTime => ref Schema.GetRef<float>(this.Handle, "CCSGameRules", "m_flCTSpawnPointUsedTime");
|
||||
|
||||
// m_iNextTerroristSpawnPoint
|
||||
[SchemaMember("CCSGameRules", "m_iNextTerroristSpawnPoint")]
|
||||
public ref Int32 NextTerroristSpawnPoint => ref Schema.GetRef<Int32>(this.Handle, "CCSGameRules", "m_iNextTerroristSpawnPoint");
|
||||
|
||||
// m_flTerroristSpawnPointUsedTime
|
||||
[SchemaMember("CCSGameRules", "m_flTerroristSpawnPointUsedTime")]
|
||||
public ref float TerroristSpawnPointUsedTime => ref Schema.GetRef<float>(this.Handle, "CCSGameRules", "m_flTerroristSpawnPointUsedTime");
|
||||
|
||||
// m_CTSpawnPoints
|
||||
[SchemaMember("CCSGameRules", "m_CTSpawnPoints")]
|
||||
public NetworkedVector<SpawnPoint?> CTSpawnPoints => Schema.GetDeclaredClass<NetworkedVector<SpawnPoint?>>(this.Handle, "CCSGameRules", "m_CTSpawnPoints");
|
||||
@@ -878,10 +898,6 @@ public partial class CCSGameRules : CTeamplayRules
|
||||
[SchemaMember("CCSGameRules", "m_nRoundStartCount")]
|
||||
public ref byte RoundStartCount => ref Schema.GetRef<byte>(this.Handle, "CCSGameRules", "m_nRoundStartCount");
|
||||
|
||||
// m_nRoundStartTicks
|
||||
[SchemaMember("CCSGameRules", "m_nRoundStartTicks")]
|
||||
public NetworkedVector<Int32> RoundStartTicks => Schema.GetDeclaredClass<NetworkedVector<Int32>>(this.Handle, "CCSGameRules", "m_nRoundStartTicks");
|
||||
|
||||
// m_flLastPerfSampleTime
|
||||
[SchemaMember("CCSGameRules", "m_flLastPerfSampleTime")]
|
||||
public ref double LastPerfSampleTime => ref Schema.GetRef<double>(this.Handle, "CCSGameRules", "m_flLastPerfSampleTime");
|
||||
|
||||
@@ -294,6 +294,22 @@ public partial class CCSPlayerController : CBasePlayerController
|
||||
[SchemaMember("CCSPlayerController", "m_vecKills")]
|
||||
public NetworkedVector<EKillTypes_t> Kills => Schema.GetDeclaredClass<NetworkedVector<EKillTypes_t>>(this.Handle, "CCSPlayerController", "m_vecKills");
|
||||
|
||||
// m_bMvpNoMusic
|
||||
[SchemaMember("CCSPlayerController", "m_bMvpNoMusic")]
|
||||
public ref bool MvpNoMusic => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerController", "m_bMvpNoMusic");
|
||||
|
||||
// m_eMvpReason
|
||||
[SchemaMember("CCSPlayerController", "m_eMvpReason")]
|
||||
public ref Int32 MvpReason => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerController", "m_eMvpReason");
|
||||
|
||||
// m_iMusicKitID
|
||||
[SchemaMember("CCSPlayerController", "m_iMusicKitID")]
|
||||
public ref Int32 MusicKitID => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerController", "m_iMusicKitID");
|
||||
|
||||
// m_iMusicKitMVPs
|
||||
[SchemaMember("CCSPlayerController", "m_iMusicKitMVPs")]
|
||||
public ref Int32 MusicKitMVPs => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerController", "m_iMusicKitMVPs");
|
||||
|
||||
// m_iMVPs
|
||||
[SchemaMember("CCSPlayerController", "m_iMVPs")]
|
||||
public ref Int32 MVPs => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerController", "m_iMVPs");
|
||||
|
||||
@@ -22,9 +22,9 @@ public partial class CCSPlayerController_InGameMoneyServices : CPlayerController
|
||||
[SchemaMember("CCSPlayerController_InGameMoneyServices", "m_bReceivesMoneyNextRound")]
|
||||
public ref bool ReceivesMoneyNextRound => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerController_InGameMoneyServices", "m_bReceivesMoneyNextRound");
|
||||
|
||||
// m_iAccountMoneyEarnedForNextRound
|
||||
[SchemaMember("CCSPlayerController_InGameMoneyServices", "m_iAccountMoneyEarnedForNextRound")]
|
||||
public ref Int32 AccountMoneyEarnedForNextRound => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerController_InGameMoneyServices", "m_iAccountMoneyEarnedForNextRound");
|
||||
// m_iMoneyEarnedForNextRound
|
||||
[SchemaMember("CCSPlayerController_InGameMoneyServices", "m_iMoneyEarnedForNextRound")]
|
||||
public ref Int32 MoneyEarnedForNextRound => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerController_InGameMoneyServices", "m_iMoneyEarnedForNextRound");
|
||||
|
||||
// m_iAccount
|
||||
[SchemaMember("CCSPlayerController_InGameMoneyServices", "m_iAccount")]
|
||||
|
||||
@@ -46,10 +46,6 @@ public partial class CCSPlayerPawn : CCSPlayerPawnBase
|
||||
[SchemaMember("CCSPlayerPawn", "m_nCharacterDefIndex")]
|
||||
public ref UInt16 CharacterDefIndex => ref Schema.GetRef<UInt16>(this.Handle, "CCSPlayerPawn", "m_nCharacterDefIndex");
|
||||
|
||||
// m_hPreviousModel
|
||||
[SchemaMember("CCSPlayerPawn", "m_hPreviousModel")]
|
||||
public CStrongHandle<InfoForResourceTypeCModel> PreviousModel => Schema.GetDeclaredClass<CStrongHandle<InfoForResourceTypeCModel>>(this.Handle, "CCSPlayerPawn", "m_hPreviousModel");
|
||||
|
||||
// m_bHasFemaleVoice
|
||||
[SchemaMember("CCSPlayerPawn", "m_bHasFemaleVoice")]
|
||||
public ref bool HasFemaleVoice => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bHasFemaleVoice");
|
||||
@@ -78,6 +74,10 @@ public partial class CCSPlayerPawn : CCSPlayerPawnBase
|
||||
[SchemaMember("CCSPlayerPawn", "m_bInBuyZone")]
|
||||
public ref bool InBuyZone => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bInBuyZone");
|
||||
|
||||
// m_TouchingBuyZones
|
||||
[SchemaMember("CCSPlayerPawn", "m_TouchingBuyZones")]
|
||||
public NetworkedVector<CHandle<CBaseEntity>> TouchingBuyZones => Schema.GetDeclaredClass<NetworkedVector<CHandle<CBaseEntity>>>(this.Handle, "CCSPlayerPawn", "m_TouchingBuyZones");
|
||||
|
||||
// m_bWasInBuyZone
|
||||
[SchemaMember("CCSPlayerPawn", "m_bWasInBuyZone")]
|
||||
public ref bool WasInBuyZone => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bWasInBuyZone");
|
||||
@@ -122,9 +122,9 @@ public partial class CCSPlayerPawn : CCSPlayerPawnBase
|
||||
[SchemaMember("CCSPlayerPawn", "m_flHealthShotBoostExpirationTime")]
|
||||
public ref float HealthShotBoostExpirationTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flHealthShotBoostExpirationTime");
|
||||
|
||||
// m_flLandseconds
|
||||
[SchemaMember("CCSPlayerPawn", "m_flLandseconds")]
|
||||
public ref float Landseconds => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flLandseconds");
|
||||
// m_flLandingTimeSeconds
|
||||
[SchemaMember("CCSPlayerPawn", "m_flLandingTimeSeconds")]
|
||||
public ref float LandingTimeSeconds => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flLandingTimeSeconds");
|
||||
|
||||
// m_aimPunchAngle
|
||||
[SchemaMember("CCSPlayerPawn", "m_aimPunchAngle")]
|
||||
@@ -226,4 +226,284 @@ public partial class CCSPlayerPawn : CCSPlayerPawnBase
|
||||
[SchemaMember("CCSPlayerPawn", "m_bSkipOneHeadConstraintUpdate")]
|
||||
public ref bool SkipOneHeadConstraintUpdate => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bSkipOneHeadConstraintUpdate");
|
||||
|
||||
// m_bLeftHanded
|
||||
[SchemaMember("CCSPlayerPawn", "m_bLeftHanded")]
|
||||
public ref bool LeftHanded => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bLeftHanded");
|
||||
|
||||
// m_fSwitchedHandednessTime
|
||||
[SchemaMember("CCSPlayerPawn", "m_fSwitchedHandednessTime")]
|
||||
public ref float SwitchedHandednessTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_fSwitchedHandednessTime");
|
||||
|
||||
// m_flViewmodelOffsetX
|
||||
[SchemaMember("CCSPlayerPawn", "m_flViewmodelOffsetX")]
|
||||
public ref float ViewmodelOffsetX => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flViewmodelOffsetX");
|
||||
|
||||
// m_flViewmodelOffsetY
|
||||
[SchemaMember("CCSPlayerPawn", "m_flViewmodelOffsetY")]
|
||||
public ref float ViewmodelOffsetY => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flViewmodelOffsetY");
|
||||
|
||||
// m_flViewmodelOffsetZ
|
||||
[SchemaMember("CCSPlayerPawn", "m_flViewmodelOffsetZ")]
|
||||
public ref float ViewmodelOffsetZ => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flViewmodelOffsetZ");
|
||||
|
||||
// m_flViewmodelFOV
|
||||
[SchemaMember("CCSPlayerPawn", "m_flViewmodelFOV")]
|
||||
public ref float ViewmodelFOV => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flViewmodelFOV");
|
||||
|
||||
// m_bIsWalking
|
||||
[SchemaMember("CCSPlayerPawn", "m_bIsWalking")]
|
||||
public ref bool IsWalking => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bIsWalking");
|
||||
|
||||
// m_fLastGivenDefuserTime
|
||||
[SchemaMember("CCSPlayerPawn", "m_fLastGivenDefuserTime")]
|
||||
public ref float LastGivenDefuserTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_fLastGivenDefuserTime");
|
||||
|
||||
// m_fLastGivenBombTime
|
||||
[SchemaMember("CCSPlayerPawn", "m_fLastGivenBombTime")]
|
||||
public ref float LastGivenBombTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_fLastGivenBombTime");
|
||||
|
||||
// m_flDealtDamageToEnemyMostRecentTimestamp
|
||||
[SchemaMember("CCSPlayerPawn", "m_flDealtDamageToEnemyMostRecentTimestamp")]
|
||||
public ref float DealtDamageToEnemyMostRecentTimestamp => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flDealtDamageToEnemyMostRecentTimestamp");
|
||||
|
||||
// m_iDisplayHistoryBits
|
||||
[SchemaMember("CCSPlayerPawn", "m_iDisplayHistoryBits")]
|
||||
public ref UInt32 DisplayHistoryBits => ref Schema.GetRef<UInt32>(this.Handle, "CCSPlayerPawn", "m_iDisplayHistoryBits");
|
||||
|
||||
// m_flLastAttackedTeammate
|
||||
[SchemaMember("CCSPlayerPawn", "m_flLastAttackedTeammate")]
|
||||
public ref float LastAttackedTeammate => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flLastAttackedTeammate");
|
||||
|
||||
// m_allowAutoFollowTime
|
||||
[SchemaMember("CCSPlayerPawn", "m_allowAutoFollowTime")]
|
||||
public ref float AllowAutoFollowTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_allowAutoFollowTime");
|
||||
|
||||
// m_bResetArmorNextSpawn
|
||||
[SchemaMember("CCSPlayerPawn", "m_bResetArmorNextSpawn")]
|
||||
public ref bool ResetArmorNextSpawn => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bResetArmorNextSpawn");
|
||||
|
||||
// m_nLastKillerIndex
|
||||
[SchemaMember("CCSPlayerPawn", "m_nLastKillerIndex")]
|
||||
public CEntityIndex LastKillerIndex => Schema.GetDeclaredClass<CEntityIndex>(this.Handle, "CCSPlayerPawn", "m_nLastKillerIndex");
|
||||
|
||||
// m_entitySpottedState
|
||||
[SchemaMember("CCSPlayerPawn", "m_entitySpottedState")]
|
||||
public EntitySpottedState_t EntitySpottedState => Schema.GetDeclaredClass<EntitySpottedState_t>(this.Handle, "CCSPlayerPawn", "m_entitySpottedState");
|
||||
|
||||
// m_nSpotRules
|
||||
[SchemaMember("CCSPlayerPawn", "m_nSpotRules")]
|
||||
public ref Int32 SpotRules => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawn", "m_nSpotRules");
|
||||
|
||||
// m_bIsScoped
|
||||
[SchemaMember("CCSPlayerPawn", "m_bIsScoped")]
|
||||
public ref bool IsScoped => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bIsScoped");
|
||||
|
||||
// m_bResumeZoom
|
||||
[SchemaMember("CCSPlayerPawn", "m_bResumeZoom")]
|
||||
public ref bool ResumeZoom => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bResumeZoom");
|
||||
|
||||
// m_bIsDefusing
|
||||
[SchemaMember("CCSPlayerPawn", "m_bIsDefusing")]
|
||||
public ref bool IsDefusing => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bIsDefusing");
|
||||
|
||||
// m_bIsGrabbingHostage
|
||||
[SchemaMember("CCSPlayerPawn", "m_bIsGrabbingHostage")]
|
||||
public ref bool IsGrabbingHostage => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bIsGrabbingHostage");
|
||||
|
||||
// m_iBlockingUseActionInProgress
|
||||
[SchemaMember("CCSPlayerPawn", "m_iBlockingUseActionInProgress")]
|
||||
public ref CSPlayerBlockingUseAction_t BlockingUseActionInProgress => ref Schema.GetRef<CSPlayerBlockingUseAction_t>(this.Handle, "CCSPlayerPawn", "m_iBlockingUseActionInProgress");
|
||||
|
||||
// m_flEmitSoundTime
|
||||
[SchemaMember("CCSPlayerPawn", "m_flEmitSoundTime")]
|
||||
public ref float EmitSoundTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flEmitSoundTime");
|
||||
|
||||
// m_bInNoDefuseArea
|
||||
[SchemaMember("CCSPlayerPawn", "m_bInNoDefuseArea")]
|
||||
public ref bool InNoDefuseArea => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bInNoDefuseArea");
|
||||
|
||||
// m_iBombSiteIndex
|
||||
[SchemaMember("CCSPlayerPawn", "m_iBombSiteIndex")]
|
||||
public CEntityIndex BombSiteIndex => Schema.GetDeclaredClass<CEntityIndex>(this.Handle, "CCSPlayerPawn", "m_iBombSiteIndex");
|
||||
|
||||
// m_nWhichBombZone
|
||||
[SchemaMember("CCSPlayerPawn", "m_nWhichBombZone")]
|
||||
public ref Int32 WhichBombZone => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawn", "m_nWhichBombZone");
|
||||
|
||||
// m_bInBombZoneTrigger
|
||||
[SchemaMember("CCSPlayerPawn", "m_bInBombZoneTrigger")]
|
||||
public ref bool InBombZoneTrigger => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bInBombZoneTrigger");
|
||||
|
||||
// m_bWasInBombZoneTrigger
|
||||
[SchemaMember("CCSPlayerPawn", "m_bWasInBombZoneTrigger")]
|
||||
public ref bool WasInBombZoneTrigger => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bWasInBombZoneTrigger");
|
||||
|
||||
// m_iShotsFired
|
||||
[SchemaMember("CCSPlayerPawn", "m_iShotsFired")]
|
||||
public ref Int32 ShotsFired => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawn", "m_iShotsFired");
|
||||
|
||||
// m_flFlinchStack
|
||||
[SchemaMember("CCSPlayerPawn", "m_flFlinchStack")]
|
||||
public ref float FlinchStack => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flFlinchStack");
|
||||
|
||||
// m_flVelocityModifier
|
||||
[SchemaMember("CCSPlayerPawn", "m_flVelocityModifier")]
|
||||
public ref float VelocityModifier => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flVelocityModifier");
|
||||
|
||||
// m_flHitHeading
|
||||
[SchemaMember("CCSPlayerPawn", "m_flHitHeading")]
|
||||
public ref float HitHeading => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flHitHeading");
|
||||
|
||||
// m_nHitBodyPart
|
||||
[SchemaMember("CCSPlayerPawn", "m_nHitBodyPart")]
|
||||
public ref Int32 HitBodyPart => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawn", "m_nHitBodyPart");
|
||||
|
||||
// m_vecTotalBulletForce
|
||||
[SchemaMember("CCSPlayerPawn", "m_vecTotalBulletForce")]
|
||||
public Vector TotalBulletForce => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSPlayerPawn", "m_vecTotalBulletForce");
|
||||
|
||||
// m_bWaitForNoAttack
|
||||
[SchemaMember("CCSPlayerPawn", "m_bWaitForNoAttack")]
|
||||
public ref bool WaitForNoAttack => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bWaitForNoAttack");
|
||||
|
||||
// m_ignoreLadderJumpTime
|
||||
[SchemaMember("CCSPlayerPawn", "m_ignoreLadderJumpTime")]
|
||||
public ref float IgnoreLadderJumpTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_ignoreLadderJumpTime");
|
||||
|
||||
// m_NumEnemiesKilledThisRound
|
||||
[SchemaMember("CCSPlayerPawn", "m_NumEnemiesKilledThisRound")]
|
||||
public ref Int32 NumEnemiesKilledThisRound => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawn", "m_NumEnemiesKilledThisRound");
|
||||
|
||||
// m_bKilledByHeadshot
|
||||
[SchemaMember("CCSPlayerPawn", "m_bKilledByHeadshot")]
|
||||
public ref bool KilledByHeadshot => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bKilledByHeadshot");
|
||||
|
||||
// m_LastHitBox
|
||||
[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");
|
||||
|
||||
// m_bBotAllowActive
|
||||
[SchemaMember("CCSPlayerPawn", "m_bBotAllowActive")]
|
||||
public ref bool BotAllowActive => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bBotAllowActive");
|
||||
|
||||
// m_thirdPersonHeading
|
||||
[SchemaMember("CCSPlayerPawn", "m_thirdPersonHeading")]
|
||||
public QAngle ThirdPersonHeading => Schema.GetDeclaredClass<QAngle>(this.Handle, "CCSPlayerPawn", "m_thirdPersonHeading");
|
||||
|
||||
// m_flSlopeDropOffset
|
||||
[SchemaMember("CCSPlayerPawn", "m_flSlopeDropOffset")]
|
||||
public ref float SlopeDropOffset => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flSlopeDropOffset");
|
||||
|
||||
// m_flSlopeDropHeight
|
||||
[SchemaMember("CCSPlayerPawn", "m_flSlopeDropHeight")]
|
||||
public ref float SlopeDropHeight => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flSlopeDropHeight");
|
||||
|
||||
// m_vHeadConstraintOffset
|
||||
[SchemaMember("CCSPlayerPawn", "m_vHeadConstraintOffset")]
|
||||
public Vector HeadConstraintOffset => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSPlayerPawn", "m_vHeadConstraintOffset");
|
||||
|
||||
// m_nLastPickupPriority
|
||||
[SchemaMember("CCSPlayerPawn", "m_nLastPickupPriority")]
|
||||
public ref Int32 LastPickupPriority => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawn", "m_nLastPickupPriority");
|
||||
|
||||
// m_flLastPickupPriorityTime
|
||||
[SchemaMember("CCSPlayerPawn", "m_flLastPickupPriorityTime")]
|
||||
public ref float LastPickupPriorityTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flLastPickupPriorityTime");
|
||||
|
||||
// m_ArmorValue
|
||||
[SchemaMember("CCSPlayerPawn", "m_ArmorValue")]
|
||||
public ref Int32 ArmorValue => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawn", "m_ArmorValue");
|
||||
|
||||
// m_unCurrentEquipmentValue
|
||||
[SchemaMember("CCSPlayerPawn", "m_unCurrentEquipmentValue")]
|
||||
public ref UInt16 CurrentEquipmentValue => ref Schema.GetRef<UInt16>(this.Handle, "CCSPlayerPawn", "m_unCurrentEquipmentValue");
|
||||
|
||||
// m_unRoundStartEquipmentValue
|
||||
[SchemaMember("CCSPlayerPawn", "m_unRoundStartEquipmentValue")]
|
||||
public ref UInt16 RoundStartEquipmentValue => ref Schema.GetRef<UInt16>(this.Handle, "CCSPlayerPawn", "m_unRoundStartEquipmentValue");
|
||||
|
||||
// m_unFreezetimeEndEquipmentValue
|
||||
[SchemaMember("CCSPlayerPawn", "m_unFreezetimeEndEquipmentValue")]
|
||||
public ref UInt16 FreezetimeEndEquipmentValue => ref Schema.GetRef<UInt16>(this.Handle, "CCSPlayerPawn", "m_unFreezetimeEndEquipmentValue");
|
||||
|
||||
// m_iLastWeaponFireUsercmd
|
||||
[SchemaMember("CCSPlayerPawn", "m_iLastWeaponFireUsercmd")]
|
||||
public ref Int32 LastWeaponFireUsercmd => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawn", "m_iLastWeaponFireUsercmd");
|
||||
|
||||
// m_flLastFriendlyFireDamageReductionRatio
|
||||
[SchemaMember("CCSPlayerPawn", "m_flLastFriendlyFireDamageReductionRatio")]
|
||||
public ref float LastFriendlyFireDamageReductionRatio => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flLastFriendlyFireDamageReductionRatio");
|
||||
|
||||
// m_bIsSpawning
|
||||
[SchemaMember("CCSPlayerPawn", "m_bIsSpawning")]
|
||||
public ref bool IsSpawning => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bIsSpawning");
|
||||
|
||||
// m_iDeathFlags
|
||||
[SchemaMember("CCSPlayerPawn", "m_iDeathFlags")]
|
||||
public ref Int32 DeathFlags => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawn", "m_iDeathFlags");
|
||||
|
||||
// m_bHasDeathInfo
|
||||
[SchemaMember("CCSPlayerPawn", "m_bHasDeathInfo")]
|
||||
public ref bool HasDeathInfo => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bHasDeathInfo");
|
||||
|
||||
// m_flDeathInfoTime
|
||||
[SchemaMember("CCSPlayerPawn", "m_flDeathInfoTime")]
|
||||
public ref float DeathInfoTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_flDeathInfoTime");
|
||||
|
||||
// m_vecDeathInfoOrigin
|
||||
[SchemaMember("CCSPlayerPawn", "m_vecDeathInfoOrigin")]
|
||||
public Vector DeathInfoOrigin => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSPlayerPawn", "m_vecDeathInfoOrigin");
|
||||
|
||||
// m_vecPlayerPatchEconIndices
|
||||
[SchemaMember("CCSPlayerPawn", "m_vecPlayerPatchEconIndices")]
|
||||
public Span<UInt32> PlayerPatchEconIndices => Schema.GetFixedArray<UInt32>(this.Handle, "CCSPlayerPawn", "m_vecPlayerPatchEconIndices", 5);
|
||||
|
||||
// m_GunGameImmunityColor
|
||||
[SchemaMember("CCSPlayerPawn", "m_GunGameImmunityColor")]
|
||||
public Color GunGameImmunityColor
|
||||
{
|
||||
get { return Schema.GetCustomMarshalledType<Color>(this.Handle, "CCSPlayerPawn", "m_GunGameImmunityColor"); }
|
||||
set { Schema.SetCustomMarshalledType<Color>(this.Handle, "CCSPlayerPawn", "m_GunGameImmunityColor", value); }
|
||||
}
|
||||
|
||||
// m_grenadeParameterStashTime
|
||||
[SchemaMember("CCSPlayerPawn", "m_grenadeParameterStashTime")]
|
||||
public ref float GrenadeParameterStashTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_grenadeParameterStashTime");
|
||||
|
||||
// m_bGrenadeParametersStashed
|
||||
[SchemaMember("CCSPlayerPawn", "m_bGrenadeParametersStashed")]
|
||||
public ref bool GrenadeParametersStashed => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bGrenadeParametersStashed");
|
||||
|
||||
// m_angStashedShootAngles
|
||||
[SchemaMember("CCSPlayerPawn", "m_angStashedShootAngles")]
|
||||
public QAngle StashedShootAngles => Schema.GetDeclaredClass<QAngle>(this.Handle, "CCSPlayerPawn", "m_angStashedShootAngles");
|
||||
|
||||
// m_vecStashedGrenadeThrowPosition
|
||||
[SchemaMember("CCSPlayerPawn", "m_vecStashedGrenadeThrowPosition")]
|
||||
public Vector StashedGrenadeThrowPosition => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSPlayerPawn", "m_vecStashedGrenadeThrowPosition");
|
||||
|
||||
// m_vecStashedVelocity
|
||||
[SchemaMember("CCSPlayerPawn", "m_vecStashedVelocity")]
|
||||
public Vector StashedVelocity => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSPlayerPawn", "m_vecStashedVelocity");
|
||||
|
||||
// m_angShootAngleHistory
|
||||
[SchemaMember("CCSPlayerPawn", "m_angShootAngleHistory")]
|
||||
public Span<QAngle> ShootAngleHistory => Schema.GetFixedArray<QAngle>(this.Handle, "CCSPlayerPawn", "m_angShootAngleHistory", 2);
|
||||
|
||||
// m_vecThrowPositionHistory
|
||||
[SchemaMember("CCSPlayerPawn", "m_vecThrowPositionHistory")]
|
||||
public Span<Vector> ThrowPositionHistory => Schema.GetFixedArray<Vector>(this.Handle, "CCSPlayerPawn", "m_vecThrowPositionHistory", 2);
|
||||
|
||||
// m_vecVelocityHistory
|
||||
[SchemaMember("CCSPlayerPawn", "m_vecVelocityHistory")]
|
||||
public Span<Vector> VelocityHistory => Schema.GetFixedArray<Vector>(this.Handle, "CCSPlayerPawn", "m_vecVelocityHistory", 2);
|
||||
|
||||
}
|
||||
|
||||
@@ -30,18 +30,6 @@ public partial class CCSPlayerPawnBase : CBasePlayerPawn
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_pViewModelServices")]
|
||||
public CPlayer_ViewModelServices? ViewModelServices => Schema.GetPointer<CPlayer_ViewModelServices>(this.Handle, "CCSPlayerPawnBase", "m_pViewModelServices");
|
||||
|
||||
// m_iDisplayHistoryBits
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iDisplayHistoryBits")]
|
||||
public ref UInt32 DisplayHistoryBits => ref Schema.GetRef<UInt32>(this.Handle, "CCSPlayerPawnBase", "m_iDisplayHistoryBits");
|
||||
|
||||
// m_flLastAttackedTeammate
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flLastAttackedTeammate")]
|
||||
public ref float LastAttackedTeammate => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flLastAttackedTeammate");
|
||||
|
||||
// m_hOriginalController
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_hOriginalController")]
|
||||
public CHandle<CCSPlayerController> OriginalController => Schema.GetDeclaredClass<CHandle<CCSPlayerController>>(this.Handle, "CCSPlayerPawnBase", "m_hOriginalController");
|
||||
|
||||
// m_blindUntilTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_blindUntilTime")]
|
||||
public ref float BlindUntilTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_blindUntilTime");
|
||||
@@ -50,82 +38,14 @@ public partial class CCSPlayerPawnBase : CBasePlayerPawn
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_blindStartTime")]
|
||||
public ref float BlindStartTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_blindStartTime");
|
||||
|
||||
// m_allowAutoFollowTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_allowAutoFollowTime")]
|
||||
public ref float AllowAutoFollowTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_allowAutoFollowTime");
|
||||
|
||||
// m_entitySpottedState
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_entitySpottedState")]
|
||||
public EntitySpottedState_t EntitySpottedState => Schema.GetDeclaredClass<EntitySpottedState_t>(this.Handle, "CCSPlayerPawnBase", "m_entitySpottedState");
|
||||
|
||||
// m_nSpotRules
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_nSpotRules")]
|
||||
public ref Int32 SpotRules => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_nSpotRules");
|
||||
|
||||
// m_iPlayerState
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iPlayerState")]
|
||||
public ref CSPlayerState PlayerState => ref Schema.GetRef<CSPlayerState>(this.Handle, "CCSPlayerPawnBase", "m_iPlayerState");
|
||||
|
||||
// m_chickenIdleSoundTimer
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_chickenIdleSoundTimer")]
|
||||
public CountdownTimer ChickenIdleSoundTimer => Schema.GetDeclaredClass<CountdownTimer>(this.Handle, "CCSPlayerPawnBase", "m_chickenIdleSoundTimer");
|
||||
|
||||
// m_chickenJumpSoundTimer
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_chickenJumpSoundTimer")]
|
||||
public CountdownTimer ChickenJumpSoundTimer => Schema.GetDeclaredClass<CountdownTimer>(this.Handle, "CCSPlayerPawnBase", "m_chickenJumpSoundTimer");
|
||||
|
||||
// m_vecLastBookmarkedPosition
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_vecLastBookmarkedPosition")]
|
||||
public Vector LastBookmarkedPosition => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSPlayerPawnBase", "m_vecLastBookmarkedPosition");
|
||||
|
||||
// m_flLastDistanceTraveledNotice
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flLastDistanceTraveledNotice")]
|
||||
public ref float LastDistanceTraveledNotice => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flLastDistanceTraveledNotice");
|
||||
|
||||
// m_flAccumulatedDistanceTraveled
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flAccumulatedDistanceTraveled")]
|
||||
public ref float AccumulatedDistanceTraveled => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flAccumulatedDistanceTraveled");
|
||||
|
||||
// m_flLastFriendlyFireDamageReductionRatio
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flLastFriendlyFireDamageReductionRatio")]
|
||||
public ref float LastFriendlyFireDamageReductionRatio => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flLastFriendlyFireDamageReductionRatio");
|
||||
|
||||
// m_bRespawning
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bRespawning")]
|
||||
public ref bool Respawning => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bRespawning");
|
||||
|
||||
// m_nLastPickupPriority
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_nLastPickupPriority")]
|
||||
public ref Int32 LastPickupPriority => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_nLastPickupPriority");
|
||||
|
||||
// m_flLastPickupPriorityTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flLastPickupPriorityTime")]
|
||||
public ref float LastPickupPriorityTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flLastPickupPriorityTime");
|
||||
|
||||
// m_bIsScoped
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bIsScoped")]
|
||||
public ref bool IsScoped => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bIsScoped");
|
||||
|
||||
// m_bIsWalking
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bIsWalking")]
|
||||
public ref bool IsWalking => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bIsWalking");
|
||||
|
||||
// m_bResumeZoom
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bResumeZoom")]
|
||||
public ref bool ResumeZoom => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bResumeZoom");
|
||||
|
||||
// m_bIsDefusing
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bIsDefusing")]
|
||||
public ref bool IsDefusing => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bIsDefusing");
|
||||
|
||||
// m_bIsGrabbingHostage
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bIsGrabbingHostage")]
|
||||
public ref bool IsGrabbingHostage => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bIsGrabbingHostage");
|
||||
|
||||
// m_iBlockingUseActionInProgress
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iBlockingUseActionInProgress")]
|
||||
public ref CSPlayerBlockingUseAction_t BlockingUseActionInProgress => ref Schema.GetRef<CSPlayerBlockingUseAction_t>(this.Handle, "CCSPlayerPawnBase", "m_iBlockingUseActionInProgress");
|
||||
|
||||
// m_fImmuneToGunGameDamageTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_fImmuneToGunGameDamageTime")]
|
||||
public ref float ImmuneToGunGameDamageTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_fImmuneToGunGameDamageTime");
|
||||
@@ -134,14 +54,6 @@ public partial class CCSPlayerPawnBase : CBasePlayerPawn
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bGunGameImmunity")]
|
||||
public ref bool GunGameImmunity => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bGunGameImmunity");
|
||||
|
||||
// m_GunGameImmunityColor
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_GunGameImmunityColor")]
|
||||
public Color GunGameImmunityColor
|
||||
{
|
||||
get { return Schema.GetCustomMarshalledType<Color>(this.Handle, "CCSPlayerPawnBase", "m_GunGameImmunityColor"); }
|
||||
set { Schema.SetCustomMarshalledType<Color>(this.Handle, "CCSPlayerPawnBase", "m_GunGameImmunityColor", value); }
|
||||
}
|
||||
|
||||
// m_fMolotovDamageTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_fMolotovDamageTime")]
|
||||
public ref float MolotovDamageTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_fMolotovDamageTime");
|
||||
@@ -150,210 +62,18 @@ public partial class CCSPlayerPawnBase : CBasePlayerPawn
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bHasMovedSinceSpawn")]
|
||||
public ref bool HasMovedSinceSpawn => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bHasMovedSinceSpawn");
|
||||
|
||||
// m_bCanMoveDuringFreezePeriod
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bCanMoveDuringFreezePeriod")]
|
||||
public ref bool CanMoveDuringFreezePeriod => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bCanMoveDuringFreezePeriod");
|
||||
|
||||
// m_flGuardianTooFarDistFrac
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flGuardianTooFarDistFrac")]
|
||||
public ref float GuardianTooFarDistFrac => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flGuardianTooFarDistFrac");
|
||||
|
||||
// m_flNextGuardianTooFarHurtTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flNextGuardianTooFarHurtTime")]
|
||||
public ref float NextGuardianTooFarHurtTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flNextGuardianTooFarHurtTime");
|
||||
|
||||
// m_flDetectedByEnemySensorTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flDetectedByEnemySensorTime")]
|
||||
public ref float DetectedByEnemySensorTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flDetectedByEnemySensorTime");
|
||||
|
||||
// m_flDealtDamageToEnemyMostRecentTimestamp
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flDealtDamageToEnemyMostRecentTimestamp")]
|
||||
public ref float DealtDamageToEnemyMostRecentTimestamp => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flDealtDamageToEnemyMostRecentTimestamp");
|
||||
|
||||
// m_flLastEquippedHelmetTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flLastEquippedHelmetTime")]
|
||||
public ref float LastEquippedHelmetTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flLastEquippedHelmetTime");
|
||||
|
||||
// m_flLastEquippedArmorTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flLastEquippedArmorTime")]
|
||||
public ref float LastEquippedArmorTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flLastEquippedArmorTime");
|
||||
|
||||
// m_nHeavyAssaultSuitCooldownRemaining
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_nHeavyAssaultSuitCooldownRemaining")]
|
||||
public ref Int32 HeavyAssaultSuitCooldownRemaining => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_nHeavyAssaultSuitCooldownRemaining");
|
||||
|
||||
// m_bResetArmorNextSpawn
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bResetArmorNextSpawn")]
|
||||
public ref bool ResetArmorNextSpawn => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bResetArmorNextSpawn");
|
||||
|
||||
// m_flLastBumpMineBumpTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flLastBumpMineBumpTime")]
|
||||
public ref float LastBumpMineBumpTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flLastBumpMineBumpTime");
|
||||
|
||||
// m_flEmitSoundTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flEmitSoundTime")]
|
||||
public ref float EmitSoundTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flEmitSoundTime");
|
||||
|
||||
// m_iNumSpawns
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iNumSpawns")]
|
||||
public ref Int32 NumSpawns => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_iNumSpawns");
|
||||
|
||||
// m_iShouldHaveCash
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iShouldHaveCash")]
|
||||
public ref Int32 ShouldHaveCash => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_iShouldHaveCash");
|
||||
|
||||
// m_bInvalidSteamLogonDelayed
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bInvalidSteamLogonDelayed")]
|
||||
public ref bool InvalidSteamLogonDelayed => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bInvalidSteamLogonDelayed");
|
||||
|
||||
// m_flLastAction
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flLastAction")]
|
||||
public ref float LastAction => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flLastAction");
|
||||
|
||||
// m_flNameChangeHistory
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flNameChangeHistory")]
|
||||
public Span<float> NameChangeHistory => Schema.GetFixedArray<float>(this.Handle, "CCSPlayerPawnBase", "m_flNameChangeHistory", 5);
|
||||
|
||||
// m_fLastGivenDefuserTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_fLastGivenDefuserTime")]
|
||||
public ref float LastGivenDefuserTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_fLastGivenDefuserTime");
|
||||
|
||||
// m_fLastGivenBombTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_fLastGivenBombTime")]
|
||||
public ref float LastGivenBombTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_fLastGivenBombTime");
|
||||
|
||||
// m_bHasNightVision
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bHasNightVision")]
|
||||
public ref bool HasNightVision => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bHasNightVision");
|
||||
|
||||
// m_bNightVisionOn
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bNightVisionOn")]
|
||||
public ref bool NightVisionOn => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bNightVisionOn");
|
||||
// m_flIdleTimeSinceLastAction
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flIdleTimeSinceLastAction")]
|
||||
public ref float IdleTimeSinceLastAction => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flIdleTimeSinceLastAction");
|
||||
|
||||
// m_fNextRadarUpdateTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_fNextRadarUpdateTime")]
|
||||
public ref float NextRadarUpdateTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_fNextRadarUpdateTime");
|
||||
|
||||
// m_flLastMoneyUpdateTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flLastMoneyUpdateTime")]
|
||||
public ref float LastMoneyUpdateTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flLastMoneyUpdateTime");
|
||||
|
||||
// m_MenuStringBuffer
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_MenuStringBuffer")]
|
||||
public string MenuStringBuffer
|
||||
{
|
||||
get { return Schema.GetString(this.Handle, "CCSPlayerPawnBase", "m_MenuStringBuffer"); }
|
||||
set { Schema.SetStringBytes(this.Handle, "CCSPlayerPawnBase", "m_MenuStringBuffer", value, 1024); }
|
||||
}
|
||||
|
||||
// m_fIntroCamTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_fIntroCamTime")]
|
||||
public ref float IntroCamTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_fIntroCamTime");
|
||||
|
||||
// m_nMyCollisionGroup
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_nMyCollisionGroup")]
|
||||
public ref Int32 MyCollisionGroup => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_nMyCollisionGroup");
|
||||
|
||||
// m_bInNoDefuseArea
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bInNoDefuseArea")]
|
||||
public ref bool InNoDefuseArea => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bInNoDefuseArea");
|
||||
|
||||
// m_bKilledByTaser
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bKilledByTaser")]
|
||||
public ref bool KilledByTaser => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bKilledByTaser");
|
||||
|
||||
// m_iMoveState
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iMoveState")]
|
||||
public ref Int32 MoveState => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_iMoveState");
|
||||
|
||||
// m_grenadeParameterStashTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_grenadeParameterStashTime")]
|
||||
public ref float GrenadeParameterStashTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_grenadeParameterStashTime");
|
||||
|
||||
// m_bGrenadeParametersStashed
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bGrenadeParametersStashed")]
|
||||
public ref bool GrenadeParametersStashed => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bGrenadeParametersStashed");
|
||||
|
||||
// m_angStashedShootAngles
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_angStashedShootAngles")]
|
||||
public QAngle StashedShootAngles => Schema.GetDeclaredClass<QAngle>(this.Handle, "CCSPlayerPawnBase", "m_angStashedShootAngles");
|
||||
|
||||
// m_vecStashedGrenadeThrowPosition
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_vecStashedGrenadeThrowPosition")]
|
||||
public Vector StashedGrenadeThrowPosition => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSPlayerPawnBase", "m_vecStashedGrenadeThrowPosition");
|
||||
|
||||
// m_vecStashedVelocity
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_vecStashedVelocity")]
|
||||
public Vector StashedVelocity => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSPlayerPawnBase", "m_vecStashedVelocity");
|
||||
|
||||
// m_angShootAngleHistory
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_angShootAngleHistory")]
|
||||
public Span<QAngle> ShootAngleHistory => Schema.GetFixedArray<QAngle>(this.Handle, "CCSPlayerPawnBase", "m_angShootAngleHistory", 2);
|
||||
|
||||
// m_vecThrowPositionHistory
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_vecThrowPositionHistory")]
|
||||
public Span<Vector> ThrowPositionHistory => Schema.GetFixedArray<Vector>(this.Handle, "CCSPlayerPawnBase", "m_vecThrowPositionHistory", 2);
|
||||
|
||||
// m_vecVelocityHistory
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_vecVelocityHistory")]
|
||||
public Span<Vector> VelocityHistory => Schema.GetFixedArray<Vector>(this.Handle, "CCSPlayerPawnBase", "m_vecVelocityHistory", 2);
|
||||
|
||||
// m_bDiedAirborne
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bDiedAirborne")]
|
||||
public ref bool DiedAirborne => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bDiedAirborne");
|
||||
|
||||
// m_iBombSiteIndex
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iBombSiteIndex")]
|
||||
public CEntityIndex BombSiteIndex => Schema.GetDeclaredClass<CEntityIndex>(this.Handle, "CCSPlayerPawnBase", "m_iBombSiteIndex");
|
||||
|
||||
// m_nWhichBombZone
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_nWhichBombZone")]
|
||||
public ref Int32 WhichBombZone => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_nWhichBombZone");
|
||||
|
||||
// m_bInBombZoneTrigger
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bInBombZoneTrigger")]
|
||||
public ref bool InBombZoneTrigger => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bInBombZoneTrigger");
|
||||
|
||||
// m_bWasInBombZoneTrigger
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bWasInBombZoneTrigger")]
|
||||
public ref bool WasInBombZoneTrigger => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bWasInBombZoneTrigger");
|
||||
|
||||
// m_iDirection
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iDirection")]
|
||||
public ref Int32 Direction => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_iDirection");
|
||||
|
||||
// m_iShotsFired
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iShotsFired")]
|
||||
public ref Int32 ShotsFired => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_iShotsFired");
|
||||
|
||||
// m_ArmorValue
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_ArmorValue")]
|
||||
public ref Int32 ArmorValue => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_ArmorValue");
|
||||
|
||||
// m_flFlinchStack
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flFlinchStack")]
|
||||
public ref float FlinchStack => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flFlinchStack");
|
||||
|
||||
// m_flVelocityModifier
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flVelocityModifier")]
|
||||
public ref float VelocityModifier => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flVelocityModifier");
|
||||
|
||||
// m_flHitHeading
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flHitHeading")]
|
||||
public ref float HitHeading => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flHitHeading");
|
||||
|
||||
// m_nHitBodyPart
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_nHitBodyPart")]
|
||||
public ref Int32 HitBodyPart => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_nHitBodyPart");
|
||||
|
||||
// m_iHostagesKilled
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iHostagesKilled")]
|
||||
public ref Int32 HostagesKilled => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_iHostagesKilled");
|
||||
|
||||
// m_vecTotalBulletForce
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_vecTotalBulletForce")]
|
||||
public Vector TotalBulletForce => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSPlayerPawnBase", "m_vecTotalBulletForce");
|
||||
|
||||
// m_flFlashDuration
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flFlashDuration")]
|
||||
public ref float FlashDuration => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flFlashDuration");
|
||||
@@ -370,86 +90,10 @@ public partial class CCSPlayerPawnBase : CBasePlayerPawn
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iProgressBarDuration")]
|
||||
public ref Int32 ProgressBarDuration => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_iProgressBarDuration");
|
||||
|
||||
// m_bWaitForNoAttack
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bWaitForNoAttack")]
|
||||
public ref bool WaitForNoAttack => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bWaitForNoAttack");
|
||||
|
||||
// m_flLowerBodyYawTarget
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flLowerBodyYawTarget")]
|
||||
public ref float LowerBodyYawTarget => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flLowerBodyYawTarget");
|
||||
|
||||
// m_bStrafing
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bStrafing")]
|
||||
public ref bool Strafing => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bStrafing");
|
||||
|
||||
// m_lastStandingPos
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_lastStandingPos")]
|
||||
public Vector LastStandingPos => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSPlayerPawnBase", "m_lastStandingPos");
|
||||
|
||||
// m_ignoreLadderJumpTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_ignoreLadderJumpTime")]
|
||||
public ref float IgnoreLadderJumpTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_ignoreLadderJumpTime");
|
||||
|
||||
// m_ladderSurpressionTimer
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_ladderSurpressionTimer")]
|
||||
public CountdownTimer LadderSurpressionTimer => Schema.GetDeclaredClass<CountdownTimer>(this.Handle, "CCSPlayerPawnBase", "m_ladderSurpressionTimer");
|
||||
|
||||
// m_lastLadderNormal
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_lastLadderNormal")]
|
||||
public Vector LastLadderNormal => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSPlayerPawnBase", "m_lastLadderNormal");
|
||||
|
||||
// m_lastLadderPos
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_lastLadderPos")]
|
||||
public Vector LastLadderPos => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSPlayerPawnBase", "m_lastLadderPos");
|
||||
|
||||
// m_thirdPersonHeading
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_thirdPersonHeading")]
|
||||
public QAngle ThirdPersonHeading => Schema.GetDeclaredClass<QAngle>(this.Handle, "CCSPlayerPawnBase", "m_thirdPersonHeading");
|
||||
|
||||
// m_flSlopeDropOffset
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flSlopeDropOffset")]
|
||||
public ref float SlopeDropOffset => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flSlopeDropOffset");
|
||||
|
||||
// m_flSlopeDropHeight
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flSlopeDropHeight")]
|
||||
public ref float SlopeDropHeight => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flSlopeDropHeight");
|
||||
|
||||
// m_vHeadConstraintOffset
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_vHeadConstraintOffset")]
|
||||
public Vector HeadConstraintOffset => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSPlayerPawnBase", "m_vHeadConstraintOffset");
|
||||
|
||||
// m_iLastWeaponFireUsercmd
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iLastWeaponFireUsercmd")]
|
||||
public ref Int32 LastWeaponFireUsercmd => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_iLastWeaponFireUsercmd");
|
||||
|
||||
// m_angEyeAngles
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_angEyeAngles")]
|
||||
public QAngle EyeAngles => Schema.GetDeclaredClass<QAngle>(this.Handle, "CCSPlayerPawnBase", "m_angEyeAngles");
|
||||
|
||||
// m_bVCollisionInitted
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bVCollisionInitted")]
|
||||
public ref bool VCollisionInitted => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bVCollisionInitted");
|
||||
|
||||
// m_storedSpawnPosition
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_storedSpawnPosition")]
|
||||
public Vector StoredSpawnPosition => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSPlayerPawnBase", "m_storedSpawnPosition");
|
||||
|
||||
// m_storedSpawnAngle
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_storedSpawnAngle")]
|
||||
public QAngle StoredSpawnAngle => Schema.GetDeclaredClass<QAngle>(this.Handle, "CCSPlayerPawnBase", "m_storedSpawnAngle");
|
||||
|
||||
// m_bIsSpawning
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bIsSpawning")]
|
||||
public ref bool IsSpawning => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bIsSpawning");
|
||||
|
||||
// m_bHideTargetID
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bHideTargetID")]
|
||||
public ref bool HideTargetID => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bHideTargetID");
|
||||
|
||||
// m_nNumDangerZoneDamageHits
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_nNumDangerZoneDamageHits")]
|
||||
public ref Int32 NumDangerZoneDamageHits => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_nNumDangerZoneDamageHits");
|
||||
|
||||
// m_bHud_MiniScoreHidden
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bHud_MiniScoreHidden")]
|
||||
public ref bool Hud_MiniScoreHidden => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bHud_MiniScoreHidden");
|
||||
@@ -458,42 +102,6 @@ public partial class CCSPlayerPawnBase : CBasePlayerPawn
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bHud_RadarHidden")]
|
||||
public ref bool Hud_RadarHidden => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bHud_RadarHidden");
|
||||
|
||||
// m_nLastKillerIndex
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_nLastKillerIndex")]
|
||||
public CEntityIndex LastKillerIndex => Schema.GetDeclaredClass<CEntityIndex>(this.Handle, "CCSPlayerPawnBase", "m_nLastKillerIndex");
|
||||
|
||||
// m_nLastConcurrentKilled
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_nLastConcurrentKilled")]
|
||||
public ref Int32 LastConcurrentKilled => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_nLastConcurrentKilled");
|
||||
|
||||
// m_nDeathCamMusic
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_nDeathCamMusic")]
|
||||
public ref Int32 DeathCamMusic => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_nDeathCamMusic");
|
||||
|
||||
// m_iAddonBits
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iAddonBits")]
|
||||
public ref Int32 AddonBits => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_iAddonBits");
|
||||
|
||||
// m_iPrimaryAddon
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iPrimaryAddon")]
|
||||
public ref Int32 PrimaryAddon => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_iPrimaryAddon");
|
||||
|
||||
// m_iSecondaryAddon
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iSecondaryAddon")]
|
||||
public ref Int32 SecondaryAddon => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_iSecondaryAddon");
|
||||
|
||||
// m_currentDeafnessFilter
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_currentDeafnessFilter")]
|
||||
public CUtlStringToken CurrentDeafnessFilter => Schema.GetDeclaredClass<CUtlStringToken>(this.Handle, "CCSPlayerPawnBase", "m_currentDeafnessFilter");
|
||||
|
||||
// m_NumEnemiesKilledThisSpawn
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_NumEnemiesKilledThisSpawn")]
|
||||
public ref Int32 NumEnemiesKilledThisSpawn => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_NumEnemiesKilledThisSpawn");
|
||||
|
||||
// m_NumEnemiesKilledThisRound
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_NumEnemiesKilledThisRound")]
|
||||
public ref Int32 NumEnemiesKilledThisRound => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_NumEnemiesKilledThisRound");
|
||||
|
||||
// m_NumEnemiesAtRoundStart
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_NumEnemiesAtRoundStart")]
|
||||
public ref Int32 NumEnemiesAtRoundStart => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_NumEnemiesAtRoundStart");
|
||||
@@ -502,76 +110,16 @@ public partial class CCSPlayerPawnBase : CBasePlayerPawn
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_wasNotKilledNaturally")]
|
||||
public ref bool WasNotKilledNaturally => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_wasNotKilledNaturally");
|
||||
|
||||
// m_vecPlayerPatchEconIndices
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_vecPlayerPatchEconIndices")]
|
||||
public Span<UInt32> PlayerPatchEconIndices => Schema.GetFixedArray<UInt32>(this.Handle, "CCSPlayerPawnBase", "m_vecPlayerPatchEconIndices", 5);
|
||||
|
||||
// m_iDeathFlags
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_iDeathFlags")]
|
||||
public ref Int32 DeathFlags => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_iDeathFlags");
|
||||
|
||||
// m_hPet
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_hPet")]
|
||||
public CHandle<CChicken> Pet => Schema.GetDeclaredClass<CHandle<CChicken>>(this.Handle, "CCSPlayerPawnBase", "m_hPet");
|
||||
|
||||
// m_unCurrentEquipmentValue
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_unCurrentEquipmentValue")]
|
||||
public ref UInt16 CurrentEquipmentValue => ref Schema.GetRef<UInt16>(this.Handle, "CCSPlayerPawnBase", "m_unCurrentEquipmentValue");
|
||||
|
||||
// m_unRoundStartEquipmentValue
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_unRoundStartEquipmentValue")]
|
||||
public ref UInt16 RoundStartEquipmentValue => ref Schema.GetRef<UInt16>(this.Handle, "CCSPlayerPawnBase", "m_unRoundStartEquipmentValue");
|
||||
|
||||
// m_unFreezetimeEndEquipmentValue
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_unFreezetimeEndEquipmentValue")]
|
||||
public ref UInt16 FreezetimeEndEquipmentValue => ref Schema.GetRef<UInt16>(this.Handle, "CCSPlayerPawnBase", "m_unFreezetimeEndEquipmentValue");
|
||||
|
||||
// m_nSurvivalTeamNumber
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_nSurvivalTeamNumber")]
|
||||
public ref Int32 SurvivalTeamNumber => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_nSurvivalTeamNumber");
|
||||
|
||||
// m_bHasDeathInfo
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bHasDeathInfo")]
|
||||
public ref bool HasDeathInfo => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bHasDeathInfo");
|
||||
|
||||
// m_flDeathInfoTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flDeathInfoTime")]
|
||||
public ref float DeathInfoTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flDeathInfoTime");
|
||||
|
||||
// m_vecDeathInfoOrigin
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_vecDeathInfoOrigin")]
|
||||
public Vector DeathInfoOrigin => Schema.GetDeclaredClass<Vector>(this.Handle, "CCSPlayerPawnBase", "m_vecDeathInfoOrigin");
|
||||
|
||||
// m_bKilledByHeadshot
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bKilledByHeadshot")]
|
||||
public ref bool KilledByHeadshot => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bKilledByHeadshot");
|
||||
|
||||
// m_LastHitBox
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_LastHitBox")]
|
||||
public ref Int32 LastHitBox => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_LastHitBox");
|
||||
|
||||
// m_LastHealth
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_LastHealth")]
|
||||
public ref Int32 LastHealth => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_LastHealth");
|
||||
|
||||
// m_flLastCollisionCeiling
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flLastCollisionCeiling")]
|
||||
public ref float LastCollisionCeiling => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flLastCollisionCeiling");
|
||||
|
||||
// m_flLastCollisionCeilingChangeTime
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_flLastCollisionCeilingChangeTime")]
|
||||
public ref float LastCollisionCeilingChangeTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawnBase", "m_flLastCollisionCeilingChangeTime");
|
||||
|
||||
// m_pBot
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_pBot")]
|
||||
public CCSBot? Bot => Schema.GetPointer<CCSBot>(this.Handle, "CCSPlayerPawnBase", "m_pBot");
|
||||
|
||||
// m_bBotAllowActive
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_bBotAllowActive")]
|
||||
public ref bool BotAllowActive => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_bBotAllowActive");
|
||||
|
||||
// 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,10 +26,6 @@ public partial class CCSPlayer_UseServices : CPlayer_UseServices
|
||||
[SchemaMember("CCSPlayer_UseServices", "m_flLastUseTimeStamp")]
|
||||
public ref float LastUseTimeStamp => ref Schema.GetRef<float>(this.Handle, "CCSPlayer_UseServices", "m_flLastUseTimeStamp");
|
||||
|
||||
// m_flTimeStartedHoldingUse
|
||||
[SchemaMember("CCSPlayer_UseServices", "m_flTimeStartedHoldingUse")]
|
||||
public ref float TimeStartedHoldingUse => ref Schema.GetRef<float>(this.Handle, "CCSPlayer_UseServices", "m_flTimeStartedHoldingUse");
|
||||
|
||||
// m_flTimeLastUsedWindow
|
||||
[SchemaMember("CCSPlayer_UseServices", "m_flTimeLastUsedWindow")]
|
||||
public ref float TimeLastUsedWindow => ref Schema.GetRef<float>(this.Handle, "CCSPlayer_UseServices", "m_flTimeLastUsedWindow");
|
||||
|
||||
@@ -66,6 +66,10 @@ public partial class CCSPlayer_WeaponServices : CPlayer_WeaponServices
|
||||
[SchemaMember("CCSPlayer_WeaponServices", "m_bDisableAutoDeploy")]
|
||||
public ref bool DisableAutoDeploy => ref Schema.GetRef<bool>(this.Handle, "CCSPlayer_WeaponServices", "m_bDisableAutoDeploy");
|
||||
|
||||
// m_bIsPickingUpGroundWeapon
|
||||
[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");
|
||||
|
||||
@@ -194,6 +194,14 @@ public partial class CCSWeaponBase : CBasePlayerWeapon
|
||||
[SchemaMember("CCSWeaponBase", "m_iOriginalTeamNumber")]
|
||||
public ref Int32 OriginalTeamNumber => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBase", "m_iOriginalTeamNumber");
|
||||
|
||||
// m_iMostRecentTeamNumber
|
||||
[SchemaMember("CCSWeaponBase", "m_iMostRecentTeamNumber")]
|
||||
public ref Int32 MostRecentTeamNumber => ref Schema.GetRef<Int32>(this.Handle, "CCSWeaponBase", "m_iMostRecentTeamNumber");
|
||||
|
||||
// m_bDroppedNearBuyZone
|
||||
[SchemaMember("CCSWeaponBase", "m_bDroppedNearBuyZone")]
|
||||
public ref bool DroppedNearBuyZone => ref Schema.GetRef<bool>(this.Handle, "CCSWeaponBase", "m_bDroppedNearBuyZone");
|
||||
|
||||
// m_flNextAttackRenderTimeOffset
|
||||
[SchemaMember("CCSWeaponBase", "m_flNextAttackRenderTimeOffset")]
|
||||
public ref float NextAttackRenderTimeOffset => ref Schema.GetRef<float>(this.Handle, "CCSWeaponBase", "m_flNextAttackRenderTimeOffset");
|
||||
|
||||
@@ -20,11 +20,11 @@ public partial class CDamageRecord : NativeObject
|
||||
|
||||
// m_PlayerDamager
|
||||
[SchemaMember("CDamageRecord", "m_PlayerDamager")]
|
||||
public CHandle<CCSPlayerPawnBase> PlayerDamager => Schema.GetDeclaredClass<CHandle<CCSPlayerPawnBase>>(this.Handle, "CDamageRecord", "m_PlayerDamager");
|
||||
public CHandle<CCSPlayerPawn> PlayerDamager => Schema.GetDeclaredClass<CHandle<CCSPlayerPawn>>(this.Handle, "CDamageRecord", "m_PlayerDamager");
|
||||
|
||||
// m_PlayerRecipient
|
||||
[SchemaMember("CDamageRecord", "m_PlayerRecipient")]
|
||||
public CHandle<CCSPlayerPawnBase> PlayerRecipient => Schema.GetDeclaredClass<CHandle<CCSPlayerPawnBase>>(this.Handle, "CDamageRecord", "m_PlayerRecipient");
|
||||
public CHandle<CCSPlayerPawn> PlayerRecipient => Schema.GetDeclaredClass<CHandle<CCSPlayerPawn>>(this.Handle, "CDamageRecord", "m_PlayerRecipient");
|
||||
|
||||
// m_hPlayerControllerDamager
|
||||
[SchemaMember("CDamageRecord", "m_hPlayerControllerDamager")]
|
||||
|
||||
@@ -114,10 +114,6 @@ public partial class CPlantedC4 : CBaseAnimGraph
|
||||
[SchemaMember("CPlantedC4", "m_flNextBotBeepTime")]
|
||||
public ref float NextBotBeepTime => ref Schema.GetRef<float>(this.Handle, "CPlantedC4", "m_flNextBotBeepTime");
|
||||
|
||||
// m_bPlantedAfterPickup
|
||||
[SchemaMember("CPlantedC4", "m_bPlantedAfterPickup")]
|
||||
public ref bool PlantedAfterPickup => ref Schema.GetRef<bool>(this.Handle, "CPlantedC4", "m_bPlantedAfterPickup");
|
||||
|
||||
// m_angCatchUpToPlayerEye
|
||||
[SchemaMember("CPlantedC4", "m_angCatchUpToPlayerEye")]
|
||||
public QAngle CatchUpToPlayerEye => Schema.GetDeclaredClass<QAngle>(this.Handle, "CPlantedC4", "m_angCatchUpToPlayerEye");
|
||||
|
||||
@@ -22,4 +22,8 @@ public partial class CWeaponTaser : CCSWeaponBaseGun
|
||||
[SchemaMember("CWeaponTaser", "m_fFireTime")]
|
||||
public ref float FireTime => ref Schema.GetRef<float>(this.Handle, "CWeaponTaser", "m_fFireTime");
|
||||
|
||||
// m_nLastAttackTick
|
||||
[SchemaMember("CWeaponTaser", "m_nLastAttackTick")]
|
||||
public ref Int32 LastAttackTick => ref Schema.GetRef<Int32>(this.Handle, "CWeaponTaser", "m_nLastAttackTick");
|
||||
|
||||
}
|
||||
|
||||
@@ -25,5 +25,6 @@ public enum PulseValueType_t : uint
|
||||
PVAL_CURSOR_FLOW = 0xD,
|
||||
PVAL_ANY = 0xE,
|
||||
PVAL_SCHEMA_ENUM = 0xF,
|
||||
PVAL_COUNT = 0x10,
|
||||
PVAL_PANORAMA_PANEL_HANDLE = 0x10,
|
||||
PVAL_COUNT = 0x11,
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public enum SoundFlags_t : uint
|
||||
SOUND_CONTEXT_DANGER_APPROACH = 0x2000000,
|
||||
SOUND_CONTEXT_ALLIES_ONLY = 0x4000000,
|
||||
SOUND_CONTEXT_PANIC_NPCS = 0x8000000,
|
||||
ALL_CONTEXTS = 0xFFFFFFFF,
|
||||
ALL_CONTEXTS = 0xFFF00000,
|
||||
ALL_SCENTS = 0x0,
|
||||
ALL_SOUNDS = 0xFFFFF,
|
||||
}
|
||||
|
||||
@@ -11,4 +11,5 @@ public enum WeaponSwitchReason_t : uint
|
||||
eDrawn = 0x0,
|
||||
eEquipped = 0x1,
|
||||
eUserInitiatedSwitchToLast = 0x2,
|
||||
eUserInitiatedSwitchHands = 0x3,
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public static class VirtualFunctions
|
||||
new(GameData.GetSignature("StateChanged"));
|
||||
public static Action<IntPtr, IntPtr, int, short, short> StateChanged = StateChangedFunc.Invoke;
|
||||
|
||||
public static MemoryFunctionVoid<IntPtr, int, long> NetworkStateChangedFunc = new("NetworkStateChanged");
|
||||
public static MemoryFunctionVoid<IntPtr, int, long> NetworkStateChangedFunc = new(GameData.GetSignature("NetworkStateChanged"));
|
||||
public static Action<IntPtr, int, long> NetworkStateChanged = NetworkStateChangedFunc.Invoke;
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,130 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
using UtlTsHashHandleT = std::uint64_t;
|
||||
|
||||
class CUtlMemoryPool {
|
||||
public:
|
||||
// returns number of allocated blocks
|
||||
int BlockSize() const {
|
||||
return m_blocks_per_blob_;
|
||||
}
|
||||
int Count() const {
|
||||
return m_block_allocated_size_;
|
||||
}
|
||||
int PeakCount() const {
|
||||
return m_peak_alloc_;
|
||||
}
|
||||
private:
|
||||
std::int32_t m_block_size_ = 0; // 0x0558
|
||||
std::int32_t m_blocks_per_blob_ = 0; // 0x055C
|
||||
std::int32_t m_grow_mode_ = 0; // 0x0560
|
||||
std::int32_t m_blocks_allocated_ = 0; // 0x0564
|
||||
std::int32_t m_block_allocated_size_ = 0; // 0x0568
|
||||
std::int32_t m_peak_alloc_ = 0; // 0x056C
|
||||
};
|
||||
|
||||
template <class T, class Keytype = std::uint64_t>
|
||||
class CUtlTSHash {
|
||||
public:
|
||||
// Invalid handle.
|
||||
static UtlTsHashHandleT InvalidHandle(void) {
|
||||
return static_cast<UtlTsHashHandleT>(0);
|
||||
}
|
||||
|
||||
// Returns the number of elements in the hash table
|
||||
[[nodiscard]] int BlockSize() const {
|
||||
return m_entry_memory_.BlockSize();
|
||||
}
|
||||
[[nodiscard]] int Count() const {
|
||||
return m_entry_memory_.Count();
|
||||
}
|
||||
|
||||
// Returns elements in the table
|
||||
std::vector<T> GetElements(void);
|
||||
public:
|
||||
// Templatized for memory tracking purposes
|
||||
template <typename DataT>
|
||||
struct HashFixedDataInternalT {
|
||||
Keytype m_ui_key;
|
||||
HashFixedDataInternalT<DataT>* m_next;
|
||||
DataT m_data;
|
||||
};
|
||||
|
||||
using HashFixedDataT = HashFixedDataInternalT<T>;
|
||||
|
||||
// Templatized for memory tracking purposes
|
||||
template <typename DataT>
|
||||
struct HashFixedStructDataInternalT {
|
||||
DataT m_data;
|
||||
Keytype m_ui_key;
|
||||
char pad_0x0020[0x8];
|
||||
};
|
||||
|
||||
using HashFixedStructDataT = HashFixedStructDataInternalT<T>;
|
||||
|
||||
struct HashStructDataT {
|
||||
char pad_0x0000[0x10]; // 0x0000
|
||||
std::array<HashFixedStructDataT, 256> m_list;
|
||||
};
|
||||
|
||||
struct HashAllocatedDataT {
|
||||
public:
|
||||
auto GetList() {
|
||||
return m_list_;
|
||||
}
|
||||
private:
|
||||
char pad_0x0000[0x18]; // 0x0000
|
||||
std::array<HashFixedDataT, 128> m_list_;
|
||||
};
|
||||
|
||||
// Templatized for memory tracking purposes
|
||||
template <typename DataT>
|
||||
struct HashBucketDataInternalT {
|
||||
DataT m_data;
|
||||
HashFixedDataInternalT<DataT>* m_next;
|
||||
Keytype m_ui_key;
|
||||
};
|
||||
|
||||
using HashBucketDataT = HashBucketDataInternalT<T>;
|
||||
|
||||
struct HashUnallocatedDataT {
|
||||
HashUnallocatedDataT* m_next_ = nullptr; // 0x0000
|
||||
Keytype m_6114; // 0x0008
|
||||
Keytype m_ui_key; // 0x0010
|
||||
Keytype m_i_unk_1; // 0x0018
|
||||
std::array<HashBucketDataT, 256> m_current_block_list; // 0x0020
|
||||
};
|
||||
|
||||
struct HashBucketT {
|
||||
HashStructDataT* m_struct_data = nullptr;
|
||||
void* m_mutex_list = nullptr;
|
||||
HashAllocatedDataT* m_allocated_data = nullptr;
|
||||
HashUnallocatedDataT* m_unallocated_data = nullptr;
|
||||
};
|
||||
|
||||
CUtlMemoryPool m_entry_memory_;
|
||||
HashBucketT m_buckets_;
|
||||
bool m_needs_commit_ = false;
|
||||
};
|
||||
|
||||
template <class T, class Keytype>
|
||||
std::vector<T> CUtlTSHash<T, Keytype>::GetElements(void) {
|
||||
std::vector<T> list;
|
||||
|
||||
const int n_count = Count();
|
||||
auto n_index = 0;
|
||||
auto& unallocated_data = m_buckets_.m_unallocated_data;
|
||||
for (auto element = unallocated_data; element; element = element->m_next_) {
|
||||
for (auto i = 0; i < BlockSize() && i != n_count; i++) {
|
||||
list.emplace_back(element->m_current_block_list.at(i).m_data);
|
||||
n_index++;
|
||||
|
||||
if (n_index >= n_count)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
@@ -32,7 +32,5 @@ void interfaces::Initialize() {
|
||||
g_pCVar = (ICvar*)modules::tier0->FindInterface(CVAR_INTERFACE_VERSION);
|
||||
g_pSource2GameEntities = (ISource2GameEntities*)modules::server->FindInterface(
|
||||
SOURCE2GAMEENTITIES_INTERFACE_VERSION);
|
||||
pSchemaSystem =
|
||||
(CSchemaSystem*)modules::schemasystem->FindInterface(SCHEMASYSTEM_INTERFACE_VERSION);
|
||||
}
|
||||
} // namespace counterstrikesharp
|
||||
|
||||
@@ -20,13 +20,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "cgameresourceserviceserver.h"
|
||||
#include "cschemasystem.h"
|
||||
|
||||
namespace counterstrikesharp {
|
||||
namespace interfaces {
|
||||
void Initialize();
|
||||
|
||||
inline CGameResourceService *pGameResourceServiceServer = nullptr;
|
||||
inline CSchemaSystem *pSchemaSystem = nullptr;
|
||||
} // namespace interfaces
|
||||
} // namespace counterstrikesharp
|
||||
@@ -1,418 +0,0 @@
|
||||
// Copyright (C) 2023 neverlosecc
|
||||
// See end of file for extended copyright information.
|
||||
/**
|
||||
* =============================================================================
|
||||
* Source2Gen
|
||||
* Copyright (C) 2023 neverlose (https://github.com/neverlosecc/source2gen)
|
||||
* =============================================================================
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <utils/virtual.h>
|
||||
#include <string_view>
|
||||
#include <array>
|
||||
#include "core/cs2_sdk/interfaces/CUtlTSHash.h"
|
||||
#define CS2
|
||||
|
||||
#define CSCHEMATYPE_GETSIZES_INDEX 3
|
||||
#define SCHEMASYSTEM_TYPE_SCOPES_OFFSET 0x190
|
||||
#define SCHEMASYSTEMTYPESCOPE_OFF1 0x47E
|
||||
#define SCHEMASYSTEMTYPESCOPE_OFF2 0x2808
|
||||
#define SCHEMASYSTEM_FIND_DECLARED_CLASS_TYPE 2
|
||||
|
||||
class CSchemaClassInfo;
|
||||
class CSchemaSystemTypeScope;
|
||||
class CSchemaType;
|
||||
|
||||
struct SchemaMetadataEntryData_t;
|
||||
struct SchemaMetadataSetData_t;
|
||||
struct SchemaClassInfoData_t;
|
||||
|
||||
using SchemaString_t = const char*;
|
||||
|
||||
template <typename T> struct SchemaArray
|
||||
{
|
||||
public:
|
||||
T* begin() const { return m_data; }
|
||||
|
||||
T* end() const { return m_data + m_size; }
|
||||
|
||||
T* m_data;
|
||||
unsigned int m_size;
|
||||
};
|
||||
|
||||
struct CSchemaNetworkValue
|
||||
{
|
||||
union
|
||||
{
|
||||
const char* m_sz_value;
|
||||
int m_n_value;
|
||||
float m_f_value;
|
||||
std::uintptr_t m_p_value;
|
||||
};
|
||||
};
|
||||
|
||||
struct CSchemaClassBinding
|
||||
{
|
||||
CSchemaClassBinding* parent;
|
||||
const char* m_binary_name; // ex: C_World
|
||||
const char* m_module_name; // ex: libclient.so
|
||||
const char* m_class_name; // ex: client
|
||||
void* m_class_info_old_synthesized;
|
||||
void* m_class_info;
|
||||
void* m_this_module_binding_pointer;
|
||||
CSchemaType* m_schema_type;
|
||||
};
|
||||
|
||||
struct SchemaEnumeratorInfoData_t
|
||||
{
|
||||
SchemaString_t m_name;
|
||||
|
||||
union
|
||||
{
|
||||
unsigned char m_value_char;
|
||||
unsigned short m_value_short;
|
||||
unsigned int m_value_int;
|
||||
unsigned long long m_value;
|
||||
};
|
||||
|
||||
char pad_0x0010[0x10]; // 0x0010
|
||||
};
|
||||
|
||||
class CSchemaEnumInfo
|
||||
{
|
||||
public:
|
||||
SchemaEnumeratorInfoData_t m_field_;
|
||||
};
|
||||
|
||||
class CSchemaEnumBinding
|
||||
{
|
||||
public:
|
||||
virtual const char* GetBindingName() = 0;
|
||||
virtual CSchemaClassBinding* AsClassBinding() = 0;
|
||||
virtual CSchemaEnumBinding* AsEnumBinding() = 0;
|
||||
virtual const char* GetBinaryName() = 0;
|
||||
virtual const char* GetProjectName() = 0;
|
||||
|
||||
public:
|
||||
char* m_binding_name_; // 0x0008
|
||||
char* m_dll_name_; // 0x0010
|
||||
std::int8_t m_align_; // 0x0018
|
||||
char pad_0x0019[0x3]; // 0x0019
|
||||
std::int16_t m_size_; // 0x001C
|
||||
std::int16_t m_flags_; // 0x001E
|
||||
SchemaEnumeratorInfoData_t* m_enum_info_;
|
||||
char pad_0x0028[0x8]; // 0x0028
|
||||
CSchemaSystemTypeScope* m_type_scope_; // 0x0030
|
||||
char pad_0x0038[0x8]; // 0x0038
|
||||
std::int32_t m_i_unk1_; // 0x0040
|
||||
};
|
||||
|
||||
enum SchemaClassFlags_t
|
||||
{
|
||||
SCHEMA_CLASS_HAS_VIRTUAL_MEMBERS = 1,
|
||||
SCHEMA_CLASS_IS_ABSTRACT = 2,
|
||||
SCHEMA_CLASS_HAS_TRIVIAL_CONSTRUCTOR = 4,
|
||||
SCHEMA_CLASS_HAS_TRIVIAL_DESTRUCTOR = 8,
|
||||
SCHEMA_CLASS_TEMP_HACK_HAS_NOSCHEMA_MEMBERS = 16,
|
||||
SCHEMA_CLASS_TEMP_HACK_HAS_CONSTRUCTOR_LIKE_METHODS = 32,
|
||||
SCHEMA_CLASS_TEMP_HACK_HAS_DESTRUCTOR_LIKE_METHODS = 64,
|
||||
SCHEMA_CLASS_IS_NOSCHEMA_CLASS = 128,
|
||||
};
|
||||
|
||||
enum ETypeCategory
|
||||
{
|
||||
Schema_Builtin = 0,
|
||||
Schema_Ptr = 1,
|
||||
Schema_Bitfield = 2,
|
||||
Schema_FixedArray = 3,
|
||||
Schema_Atomic = 4,
|
||||
Schema_DeclaredClass = 5,
|
||||
Schema_DeclaredEnum = 6,
|
||||
Schema_None = 7
|
||||
};
|
||||
|
||||
enum EAtomicCategory
|
||||
{
|
||||
Atomic_Basic,
|
||||
Atomic_T,
|
||||
Atomic_CollectionOfT,
|
||||
Atomic_TT,
|
||||
Atomic_I,
|
||||
Atomic_None
|
||||
};
|
||||
|
||||
#define __thiscall
|
||||
|
||||
class CSchemaType
|
||||
{
|
||||
public:
|
||||
bool GetSizes(int* out_size1, uint8_t* unk_probably_not_size)
|
||||
{
|
||||
return reinterpret_cast<int(__thiscall*)(void*, int*, uint8_t*)>(
|
||||
_vtable[CSCHEMATYPE_GETSIZES_INDEX])(this, out_size1, unk_probably_not_size);
|
||||
}
|
||||
|
||||
public:
|
||||
bool GetSize(int* out_size)
|
||||
{
|
||||
uint8_t smh = 0;
|
||||
return GetSizes(out_size, &smh);
|
||||
}
|
||||
|
||||
public:
|
||||
uintptr_t* _vtable; // 0x0000
|
||||
const char* m_name_; // 0x0008
|
||||
|
||||
CSchemaSystemTypeScope* m_type_scope_; // 0x0010
|
||||
uint8_t type_category; // ETypeCategory 0x0018
|
||||
uint8_t atomic_category; // EAtomicCategory 0x0019
|
||||
|
||||
// find out to what class pointer points.
|
||||
CSchemaType* GetRefClass()
|
||||
{
|
||||
if (type_category != Schema_Ptr)
|
||||
return nullptr;
|
||||
|
||||
auto ptr = m_schema_type_;
|
||||
while (ptr && ptr->type_category == ETypeCategory::Schema_Ptr)
|
||||
ptr = ptr->m_schema_type_;
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
struct array_t
|
||||
{
|
||||
uint32_t array_size;
|
||||
uint32_t unknown;
|
||||
CSchemaType* element_type_;
|
||||
};
|
||||
|
||||
struct generic_type_t
|
||||
{
|
||||
uint64_t unknown;
|
||||
const char* m_name_; // 0x0008
|
||||
};
|
||||
|
||||
struct atomic_t
|
||||
{ // same goes for CollectionOfT
|
||||
generic_type_t* generic_type;
|
||||
uint64_t unknown;
|
||||
CSchemaType* template_typename;
|
||||
};
|
||||
|
||||
struct atomic_tt
|
||||
{
|
||||
uint64_t gap[2];
|
||||
CSchemaType* templates[2];
|
||||
};
|
||||
|
||||
struct atomic_i
|
||||
{
|
||||
uint64_t gap[2];
|
||||
uint64_t integer;
|
||||
};
|
||||
|
||||
// this union depends on CSchema implementation, all members above
|
||||
// is from base class ( CSchemaType )
|
||||
union // 0x020
|
||||
{
|
||||
CSchemaType* m_schema_type_;
|
||||
CSchemaClassInfo* m_class_info;
|
||||
CSchemaEnumBinding* m_enum_binding_;
|
||||
array_t m_array_;
|
||||
atomic_t m_atomic_t_;
|
||||
atomic_tt m_atomic_tt_;
|
||||
atomic_i m_atomic_i_;
|
||||
};
|
||||
};
|
||||
static_assert(offsetof(CSchemaType, m_schema_type_) == 0x20);
|
||||
|
||||
struct SchemaMetadataEntryData_t
|
||||
{
|
||||
SchemaString_t m_name;
|
||||
CSchemaNetworkValue* m_value;
|
||||
// CSchemaType* m_pDataType;
|
||||
// void* unaccounted;
|
||||
};
|
||||
|
||||
struct SchemaMetadataSetData_t
|
||||
{
|
||||
SchemaMetadataEntryData_t m_static_entries;
|
||||
};
|
||||
|
||||
struct SchemaClassFieldData_t
|
||||
{
|
||||
SchemaString_t m_name; // 0x0000
|
||||
CSchemaType* m_type; // 0x0008
|
||||
std::int32_t m_single_inheritance_offset; // 0x0010
|
||||
std::int32_t m_metadata_size; // 0x0014
|
||||
SchemaMetadataEntryData_t* m_metadata; // 0x0018
|
||||
};
|
||||
|
||||
struct SchemaStaticFieldData_t
|
||||
{
|
||||
const char* name; // 0x0000
|
||||
CSchemaType* m_type; // 0x0008
|
||||
void* m_instance; // 0x0010
|
||||
char pad_0x0018[0x10]; // 0x0018
|
||||
};
|
||||
|
||||
struct SchemaBaseClassInfoData_t
|
||||
{
|
||||
unsigned int m_offset;
|
||||
CSchemaClassInfo* m_class;
|
||||
};
|
||||
|
||||
// Classes
|
||||
struct SchemaClassInfoData_t
|
||||
{
|
||||
char pad_0x0000[0x8]; // 0x0000
|
||||
|
||||
const char* m_name; // 0x0008
|
||||
char* m_module; // 0x0010
|
||||
|
||||
int m_size; // 0x0018
|
||||
std::int16_t m_align; // 0x001C
|
||||
|
||||
std::int16_t m_static_size; // 0x001E
|
||||
std::int16_t m_metadata_size; // 0x0020
|
||||
std::int16_t m_i_unk1; // 0x0022
|
||||
std::int16_t m_i_unk2; // 0x0024
|
||||
std::int16_t m_i_unk3; // 0x0026
|
||||
|
||||
SchemaClassFieldData_t* m_fields; // 0x0028
|
||||
|
||||
SchemaStaticFieldData_t* m_static_fields; // 0x0030
|
||||
SchemaBaseClassInfoData_t* m_schema_parent; // 0x0038
|
||||
|
||||
char pad_0x0038[0x10]; // 0x0038
|
||||
|
||||
SchemaMetadataSetData_t* m_metadata; // 0x0048
|
||||
CSchemaSystemTypeScope* m_type_scope; // 0x0050
|
||||
CSchemaType* m_shema_type; // 0x0058
|
||||
SchemaClassFlags_t m_class_flags : 8; // 0x0060
|
||||
};
|
||||
|
||||
class CSchemaClassInfo : public SchemaClassInfoData_t
|
||||
{
|
||||
public:
|
||||
bool GetMetaStrings(const char* metaName, std::vector<const char**>& strings);
|
||||
|
||||
unsigned int CalculateInheritanceDataSize(bool ignoreVirtuals = false);
|
||||
|
||||
bool DependsOn(CSchemaClassInfo* other);
|
||||
bool InheritsFrom(CSchemaClassInfo* other);
|
||||
bool UsesClass(CSchemaClassInfo* other);
|
||||
bool InheritsVirtuals();
|
||||
|
||||
void FillClassFieldsList(std::vector<SchemaClassFieldData_t*>& fields);
|
||||
void FillInheritanceList(std::vector<const char*>& inheritance);
|
||||
CSchemaClassInfo* GetParent()
|
||||
{
|
||||
if (!m_schema_parent)
|
||||
return nullptr;
|
||||
|
||||
return m_schema_parent->m_class;
|
||||
}
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
class CSchemaSystemTypeScope
|
||||
{
|
||||
public:
|
||||
CSchemaClassInfo* FindDeclaredClass(const char* class_name)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
CSchemaClassInfo* rv = nullptr;
|
||||
CALL_VIRTUAL(void, 2, this, &rv, class_name);
|
||||
return rv;
|
||||
#else
|
||||
return CALL_VIRTUAL(CSchemaClassInfo*, 2, this, class_name);
|
||||
#endif
|
||||
}
|
||||
|
||||
CSchemaEnumBinding* FindDeclaredEnum(const char* name)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
CSchemaEnumBinding* rv = nullptr;
|
||||
CALL_VIRTUAL(void, 3, this, &rv, name);
|
||||
return rv;
|
||||
#else
|
||||
return CALL_VIRTUAL(CSchemaEnumBinding*, 3, this, name);
|
||||
#endif
|
||||
}
|
||||
|
||||
CSchemaType* FindSchemaTypeByName(const char* name, std::uintptr_t* pSchema)
|
||||
{
|
||||
return CALL_VIRTUAL(CSchemaType*, 4, this, name, pSchema);
|
||||
}
|
||||
|
||||
CSchemaType* FindTypeDeclaredClass(const char* name)
|
||||
{
|
||||
return CALL_VIRTUAL(CSchemaType*, 5, this, name);
|
||||
}
|
||||
|
||||
CSchemaType* FindTypeDeclaredEnum(const char* name)
|
||||
{
|
||||
return CALL_VIRTUAL(CSchemaType*, 6, this, name);
|
||||
}
|
||||
|
||||
CSchemaClassBinding* FindRawClassBinding(const char* name)
|
||||
{
|
||||
return CALL_VIRTUAL(CSchemaClassBinding*, 7, this, name);
|
||||
}
|
||||
|
||||
CSchemaEnumBinding* FindRawEnumBinding(const char* name)
|
||||
{
|
||||
return CALL_VIRTUAL(CSchemaEnumBinding*, 8, this, name);
|
||||
}
|
||||
|
||||
std::string_view GetScopeName() { return {m_name_.data()}; }
|
||||
|
||||
[[nodiscard]] CUtlTSHash<CSchemaClassBinding*> GetClasses() const { return m_classes_; }
|
||||
|
||||
[[nodiscard]] CUtlTSHash<CSchemaEnumBinding*> GetEnums() const { return m_enumes_; }
|
||||
|
||||
private:
|
||||
char pad_0x0000[0x8]; // 0x0000
|
||||
std::array<char, 256> m_name_ = {};
|
||||
char pad_0x0108[SCHEMASYSTEMTYPESCOPE_OFF1]; // 0x0108
|
||||
CUtlTSHash<CSchemaClassBinding*> m_classes_; // 0x0588
|
||||
char pad_0x0594[SCHEMASYSTEMTYPESCOPE_OFF2]; // 0x05C8
|
||||
CUtlTSHash<CSchemaEnumBinding*> m_enumes_; // 0x2DD0
|
||||
private:
|
||||
static constexpr unsigned int s_class_list = 0x580;
|
||||
};
|
||||
|
||||
class CSchemaSystem
|
||||
{
|
||||
public:
|
||||
CSchemaSystemTypeScope* GlobalTypeScope(void)
|
||||
{
|
||||
return CALL_VIRTUAL(CSchemaSystemTypeScope*, 11, this);
|
||||
}
|
||||
|
||||
CSchemaSystemTypeScope* FindTypeScopeForModule(const char* m_module_name)
|
||||
{
|
||||
return CALL_VIRTUAL(CSchemaSystemTypeScope*, 13, this, m_module_name, nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
// source2gen - Source2 games SDK generator
|
||||
// Copyright 2023 neverlosecc
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "core/log.h"
|
||||
|
||||
#include "tier1/utlmap.h"
|
||||
#include <schemasystem.h>
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
@@ -33,9 +34,9 @@ using SchemaKeyValueMap_t = CUtlMap<uint32_t, SchemaKey>;
|
||||
using SchemaTableMap_t = CUtlMap<uint32_t, SchemaKeyValueMap_t*>;
|
||||
|
||||
bool IsFieldNetworked(SchemaClassFieldData_t& field) {
|
||||
for (int i = 0; i < field.m_metadata_size; i++) {
|
||||
for (int i = 0; i < field.m_nStaticMetadataCount; i++) {
|
||||
static auto networkEnabled = hash_32_fnv1a_const("MNetworkEnable");
|
||||
if (networkEnabled == hash_32_fnv1a_const(field.m_metadata[i].m_name)) return true;
|
||||
if (networkEnabled == hash_32_fnv1a_const(field.m_pStaticMetadata[i].m_pszName)) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -44,12 +45,11 @@ bool IsFieldNetworked(SchemaClassFieldData_t& field) {
|
||||
static bool InitSchemaFieldsForClass(SchemaTableMap_t* tableMap,
|
||||
const char* className,
|
||||
uint32_t classKey) {
|
||||
CSchemaSystemTypeScope* pType =
|
||||
counterstrikesharp::interfaces::pSchemaSystem->FindTypeScopeForModule(MODULE_PREFIX "server" MODULE_EXT);
|
||||
CSchemaSystemTypeScope* pType = counterstrikesharp::globals::schemaSystem->FindTypeScopeForModule(MODULE_PREFIX "server" MODULE_EXT);
|
||||
|
||||
if (!pType) return false;
|
||||
|
||||
SchemaClassInfoData_t* pClassInfo = pType->FindDeclaredClass(className);
|
||||
SchemaClassInfoData_t* pClassInfo = pType->FindDeclaredClass(className).Get();
|
||||
|
||||
if (!pClassInfo) {
|
||||
SchemaKeyValueMap_t* map = new SchemaKeyValueMap_t(0, 0, DefLessFunc(uint32_t));
|
||||
@@ -59,8 +59,8 @@ static bool InitSchemaFieldsForClass(SchemaTableMap_t* tableMap,
|
||||
return false;
|
||||
}
|
||||
|
||||
short fieldsSize = pClassInfo->m_align;
|
||||
SchemaClassFieldData_t* pFields = pClassInfo->m_fields;
|
||||
short fieldsSize = pClassInfo->m_nFieldCount;
|
||||
SchemaClassFieldData_t* pFields = pClassInfo->m_pFields;
|
||||
|
||||
SchemaKeyValueMap_t* keyValueMap = new SchemaKeyValueMap_t(0, 0, DefLessFunc(uint32_t));
|
||||
keyValueMap->EnsureCapacity(fieldsSize);
|
||||
@@ -69,8 +69,8 @@ static bool InitSchemaFieldsForClass(SchemaTableMap_t* tableMap,
|
||||
for (int i = 0; i < fieldsSize; ++i) {
|
||||
SchemaClassFieldData_t& field = pFields[i];
|
||||
|
||||
keyValueMap->Insert(hash_32_fnv1a_const(field.m_name),
|
||||
{field.m_single_inheritance_offset, IsFieldNetworked(field)});
|
||||
keyValueMap->Insert(hash_32_fnv1a_const(field.m_pszName),
|
||||
{field.m_nSingleInheritanceOffset, IsFieldNetworked(field)});
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -78,23 +78,23 @@ static bool InitSchemaFieldsForClass(SchemaTableMap_t* tableMap,
|
||||
|
||||
int16_t schema::FindChainOffset(const char* className) {
|
||||
CSchemaSystemTypeScope* pType =
|
||||
counterstrikesharp::interfaces::pSchemaSystem->FindTypeScopeForModule(MODULE_PREFIX "server" MODULE_EXT);
|
||||
counterstrikesharp::globals::schemaSystem->FindTypeScopeForModule(MODULE_PREFIX "server" MODULE_EXT);
|
||||
|
||||
if (!pType) return false;
|
||||
|
||||
auto* pClassInfo = pType->FindDeclaredClass(className);
|
||||
auto* pClassInfo = pType->FindDeclaredClass(className).Get();
|
||||
|
||||
do {
|
||||
SchemaClassFieldData_t* pFields = pClassInfo->m_fields;
|
||||
short fieldsSize = pClassInfo->m_align;
|
||||
SchemaClassFieldData_t* pFields = pClassInfo->m_pFields;
|
||||
short fieldsSize = pClassInfo->m_nFieldCount;
|
||||
for (int i = 0; i < fieldsSize; ++i) {
|
||||
SchemaClassFieldData_t& field = pFields[i];
|
||||
|
||||
if (V_strcmp(field.m_name, "__m_pChainEntity") == 0) {
|
||||
return field.m_single_inheritance_offset;
|
||||
if (V_strcmp(field.m_pszName, "__m_pChainEntity") == 0) {
|
||||
return field.m_nSingleInheritanceOffset;
|
||||
}
|
||||
}
|
||||
} while ((pClassInfo = pClassInfo->GetParent()) != nullptr);
|
||||
} while ((pClassInfo = pClassInfo->m_pBaseClasses->m_pClass) != nullptr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -165,11 +165,11 @@ void* CGameConfig::ResolveSignature(const char* name)
|
||||
return nullptr;
|
||||
}
|
||||
size_t iLength = 0;
|
||||
byte* pSignature = HexToByte(signature, iLength);
|
||||
if (!pSignature) {
|
||||
auto pSignature = HexToByte(signature);
|
||||
if (pSignature.empty()) {
|
||||
return nullptr;
|
||||
}
|
||||
address = (*module)->FindSignature(pSignature, iLength);
|
||||
address = (*module)->FindSignature(pSignature);
|
||||
}
|
||||
|
||||
if (!address) {
|
||||
@@ -190,47 +190,63 @@ std::string CGameConfig::GetDirectoryName(const std::string& directoryPathInput)
|
||||
return "";
|
||||
}
|
||||
|
||||
int CGameConfig::HexStringToUint8Array(const char* hexString, uint8_t* byteArray, size_t maxBytes)
|
||||
std::vector<int16_t> CGameConfig::HexToByte(std::string_view src)
|
||||
{
|
||||
if (!hexString) {
|
||||
printf("Invalid hex string.\n");
|
||||
if (src.empty()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
auto hex_char_to_byte = [](char c) -> int16_t {
|
||||
if (c >= '0' && c <= '9')
|
||||
return c - '0';
|
||||
if (c >= 'A' && c <= 'F')
|
||||
return c - 'A' + 10;
|
||||
if (c >= 'a' && c <= 'f')
|
||||
return c - 'a' + 10;
|
||||
|
||||
// a valid hex char can never go up to 0xFF
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
|
||||
size_t hexStringLength = strlen(hexString);
|
||||
size_t byteCount = hexStringLength / 4; // Each "\\x" represents one byte.
|
||||
std::vector<int16_t> result{};
|
||||
|
||||
if (hexStringLength % 4 != 0 || byteCount == 0 || byteCount > maxBytes) {
|
||||
printf("Invalid hex string format or byte count.\n");
|
||||
return -1; // Return an error code.
|
||||
}
|
||||
const bool is_code_style = src[0] == '\\';
|
||||
|
||||
for (size_t i = 0; i < hexStringLength; i += 4) {
|
||||
if (sscanf(hexString + i, "\\x%2hhX", &byteArray[i / 4]) != 1) {
|
||||
printf("Failed to parse hex string at position %zu.\n", i);
|
||||
return -1; // Return an error code.
|
||||
const std::string_view pattern = is_code_style ? R"(\x)" : " ";
|
||||
const std::string_view wildcard = is_code_style ? "2A" : "?";
|
||||
|
||||
auto split = std::views::split(src, pattern);
|
||||
|
||||
for (auto&& str : split) {
|
||||
if (str.empty()) [[unlikely]] {
|
||||
continue;
|
||||
}
|
||||
|
||||
// std::string_view(std::subrange) constructor only exists in C++23 or above
|
||||
// use this when compiler is GCC >= 12.1 or Clang >= 16
|
||||
// const std::string_view byte(str.begin(), str.end());
|
||||
|
||||
// a workaround for GCC < 12.1, it doesn't work with Clang < 16
|
||||
// https://stackoverflow.com/a/48403210
|
||||
std::string_view byte (&*str.begin(), std::ranges::distance(str));
|
||||
|
||||
if (byte.starts_with(wildcard)) {
|
||||
result.emplace_back(-1);
|
||||
continue;
|
||||
}
|
||||
|
||||
const auto high = hex_char_to_byte(byte[0]);
|
||||
const auto low = hex_char_to_byte(byte[1]);
|
||||
|
||||
// if then is malformed, return nothing
|
||||
// maybe print error message here?
|
||||
if (high == 0xFF || low == 0xFF) [[unlikely]] {
|
||||
return {};
|
||||
}
|
||||
|
||||
result.emplace_back((high << 4) | low);
|
||||
}
|
||||
|
||||
byteArray[byteCount] = '\0'; // Add a null-terminating character.
|
||||
|
||||
return byteCount; // Return the number of bytes successfully converted.
|
||||
return result;
|
||||
}
|
||||
|
||||
byte* CGameConfig::HexToByte(const char* src, size_t& length)
|
||||
{
|
||||
if (!src || strlen(src) <= 0) {
|
||||
CSSHARP_CORE_INFO("Invalid hex string\n");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
length = strlen(src) / 4;
|
||||
uint8_t* dest = new uint8_t[length];
|
||||
int byteCount = HexStringToUint8Array(src, dest, length);
|
||||
if (byteCount <= 0) {
|
||||
CSSHARP_CORE_INFO("Invalid hex format %s\n", src);
|
||||
return nullptr;
|
||||
}
|
||||
return dest;
|
||||
}
|
||||
} // namespace counterstrikesharp
|
||||
} // namespace counterstrikesharp
|
||||
|
||||
@@ -33,8 +33,7 @@ class CGameConfig
|
||||
void* ResolveSignature(const char* name);
|
||||
|
||||
static std::string GetDirectoryName(const std::string& directoryPathInput);
|
||||
static int HexStringToUint8Array(const char* hexString, uint8_t* byteArray, size_t maxBytes);
|
||||
static byte* HexToByte(const char* src, size_t& length);
|
||||
static std::vector<int16_t> HexToByte(std::string_view src);
|
||||
|
||||
private:
|
||||
std::string m_sPath;
|
||||
|
||||
@@ -52,6 +52,7 @@ IFileSystem* fileSystem = nullptr;
|
||||
IServerGameDLL* serverGameDll = nullptr;
|
||||
IServerGameClients* serverGameClients = nullptr;
|
||||
INetworkServerService* networkServerService = nullptr;
|
||||
CSchemaSystem* schemaSystem = nullptr;
|
||||
IServerTools* serverTools = nullptr;
|
||||
IPhysics* physics = nullptr;
|
||||
IPhysicsCollision* physicsCollision = nullptr;
|
||||
|
||||
@@ -37,6 +37,7 @@ class IGameEventSystem;
|
||||
class CounterStrikeSharpMMPlugin;
|
||||
class CGameEntitySystem;
|
||||
class IGameEventListener2;
|
||||
class CSchemaSystem;
|
||||
|
||||
namespace counterstrikesharp {
|
||||
class EntityListener;
|
||||
@@ -75,6 +76,7 @@ extern IFileSystem *fileSystem;
|
||||
extern IServerGameDLL *serverGameDll;
|
||||
extern IServerGameClients *serverGameClients;
|
||||
extern INetworkServerService *networkServerService;
|
||||
extern CSchemaSystem *schemaSystem;
|
||||
extern IServerTools *serverTools;
|
||||
extern IPhysics *physics;
|
||||
extern IPhysicsCollision *physicsCollision;
|
||||
|
||||
@@ -38,11 +38,12 @@
|
||||
|
||||
#include "scripting/callback_manager.h"
|
||||
#include "core/log.h"
|
||||
#include "core/cs2_sdk/interfaces/cschemasystem.h"
|
||||
#include "core/utils.h"
|
||||
#include "core/memory.h"
|
||||
#include "interfaces/cs2_interfaces.h"
|
||||
#include <schematypes.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <schemasystem.h>
|
||||
|
||||
#include "metamod_oslink.h"
|
||||
using json = nlohmann::json;
|
||||
@@ -51,26 +52,35 @@ namespace counterstrikesharp {
|
||||
|
||||
json WriteTypeJson(json obj, CSchemaType* current_type)
|
||||
{
|
||||
obj["name"] = current_type->m_name_;
|
||||
obj["category"] = current_type->type_category;
|
||||
obj["name"] = current_type->m_sTypeName.Get();
|
||||
obj["category"] = current_type->m_eTypeCategory;
|
||||
|
||||
if (current_type->type_category == Schema_Atomic) {
|
||||
obj["atomic"] = current_type->atomic_category;
|
||||
if (current_type->m_eTypeCategory == SCHEMA_TYPE_ATOMIC) {
|
||||
obj["atomic"] = current_type->m_eAtomicCategory;
|
||||
|
||||
if (current_type->atomic_category == Atomic_T &&
|
||||
current_type->m_atomic_t_.generic_type != nullptr) {
|
||||
obj["outer"] = current_type->m_atomic_t_.generic_type->m_name_;
|
||||
if (current_type->m_eAtomicCategory == SCHEMA_ATOMIC_T) {
|
||||
auto atomicTType = static_cast<CSchemaType_Atomic_T*>(current_type);
|
||||
|
||||
if (atomicTType->m_pAtomicInfo != nullptr) {
|
||||
obj["outer"] = atomicTType->m_pAtomicInfo->m_pszName1;
|
||||
}
|
||||
}
|
||||
|
||||
if (current_type->atomic_category == Atomic_T ||
|
||||
current_type->atomic_category == Atomic_CollectionOfT) {
|
||||
obj["inner"] =
|
||||
WriteTypeJson(json::object(), current_type->m_atomic_t_.template_typename);
|
||||
if (current_type->m_eAtomicCategory == SCHEMA_ATOMIC_T ||
|
||||
current_type->m_eAtomicCategory == SCHEMA_ATOMIC_COLLECTION_OF_T) {
|
||||
|
||||
auto atomicType = static_cast<CSchemaType_Atomic_T*>(current_type);
|
||||
|
||||
if (atomicType->GetInnerType().Get() != nullptr) {
|
||||
obj["inner"] = WriteTypeJson(json::object(), atomicType->GetInnerType().Get());
|
||||
}
|
||||
}
|
||||
} else if (current_type->type_category == Schema_FixedArray) {
|
||||
obj["inner"] = WriteTypeJson(json::object(), current_type->m_array_.element_type_);
|
||||
} else if (current_type->type_category == Schema_Ptr) {
|
||||
obj["inner"] = WriteTypeJson(json::object(), current_type->m_schema_type_);
|
||||
} else if (current_type->m_eTypeCategory == SCHEMA_TYPE_FIXED_ARRAY) {
|
||||
auto fixedArrayType = static_cast<CSchemaType_FixedArray*>(current_type);
|
||||
obj["inner"] = WriteTypeJson(json::object(), fixedArrayType->m_pElementType);
|
||||
} else if (current_type->m_eTypeCategory == SCHEMA_TYPE_PTR) {
|
||||
auto ptrType = static_cast<CSchemaType_Ptr*>(current_type);
|
||||
obj["inner"] = WriteTypeJson(json::object(), ptrType->m_pObjectType);
|
||||
}
|
||||
|
||||
return obj;
|
||||
@@ -102,53 +112,53 @@ CON_COMMAND(dump_schema, "dump schema symbols")
|
||||
}
|
||||
|
||||
CSchemaSystemTypeScope* pType =
|
||||
interfaces::pSchemaSystem->FindTypeScopeForModule(MODULE_PREFIX "server" MODULE_EXT);
|
||||
globals::schemaSystem->FindTypeScopeForModule(MODULE_PREFIX "server" MODULE_EXT);
|
||||
|
||||
json j;
|
||||
j["classes"] = json::object();
|
||||
j["enums"] = json::object();
|
||||
|
||||
for (const auto& line : classNames) {
|
||||
SchemaClassInfoData_t* pClassInfo = pType->FindDeclaredClass(line.c_str());
|
||||
auto* pClassInfo = pType->FindDeclaredClass(line.c_str()).Get();
|
||||
if (!pClassInfo)
|
||||
continue;
|
||||
|
||||
short fieldsSize = pClassInfo->m_align;
|
||||
SchemaClassFieldData_t* pFields = pClassInfo->m_fields;
|
||||
short fieldsSize = pClassInfo->m_nFieldCount;
|
||||
SchemaClassFieldData_t* pFields = pClassInfo->m_pFields;
|
||||
|
||||
j["classes"][pClassInfo->m_name] = json::object();
|
||||
if (pClassInfo->m_schema_parent) {
|
||||
j["classes"][pClassInfo->m_name]["parent"] =
|
||||
pClassInfo->m_schema_parent->m_class->m_name;
|
||||
j["classes"][pClassInfo->m_pszName] = json::object();
|
||||
if (pClassInfo->m_pBaseClasses) {
|
||||
j["classes"][pClassInfo->m_pszName]["parent"] =
|
||||
pClassInfo->m_pBaseClasses->m_pClass->m_pszName;
|
||||
}
|
||||
|
||||
j["classes"][pClassInfo->m_name]["fields"] = json::array();
|
||||
j["classes"][pClassInfo->m_pszName]["fields"] = json::array();
|
||||
|
||||
for (int i = 0; i < fieldsSize; ++i) {
|
||||
SchemaClassFieldData_t& field = pFields[i];
|
||||
|
||||
j["classes"][pClassInfo->m_name]["fields"].push_back({
|
||||
{"name", field.m_name},
|
||||
{"type", WriteTypeJson(json::object(), field.m_type)},
|
||||
j["classes"][pClassInfo->m_pszName]["fields"].push_back({
|
||||
{"name", field.m_pszName},
|
||||
{"type", WriteTypeJson(json::object(), field.m_pType)},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& line : enumNames) {
|
||||
auto* pEnumInfo = pType->FindDeclaredEnum(line.c_str());
|
||||
auto* pEnumInfo = pType->FindDeclaredEnum(line.c_str()).Get();
|
||||
if (!pEnumInfo)
|
||||
continue;
|
||||
|
||||
j["enums"][pEnumInfo->m_binding_name_] = json::object();
|
||||
j["enums"][pEnumInfo->m_binding_name_]["align"] = pEnumInfo->m_align_;
|
||||
j["enums"][pEnumInfo->m_binding_name_]["items"] = json::array();
|
||||
j["enums"][pEnumInfo->m_pszName] = json::object();
|
||||
j["enums"][pEnumInfo->m_pszName]["align"] = pEnumInfo->m_nSize;
|
||||
j["enums"][pEnumInfo->m_pszName]["items"] = json::array();
|
||||
|
||||
for (int i = 0; i < pEnumInfo->m_size_; ++i) {
|
||||
auto& field = pEnumInfo->m_enum_info_[i];
|
||||
for (int i = 0; i < pEnumInfo->m_nEnumeratorCount; ++i) {
|
||||
auto& field = pEnumInfo->m_pEnumerators[i];
|
||||
|
||||
j["enums"][pEnumInfo->m_binding_name_]["items"].push_back({
|
||||
{"name", field.m_name},
|
||||
{"value", field.m_value},
|
||||
j["enums"][pEnumInfo->m_pszName]["items"].push_back({
|
||||
{"name", field.m_pszName},
|
||||
{"value", field.m_nValue},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -549,11 +549,6 @@ float CPlayer::GetTimeConnected() const
|
||||
return GetNetInfo()->GetTimeConnected();
|
||||
}
|
||||
|
||||
float CPlayer::GetLatency() const
|
||||
{
|
||||
return GetNetInfo()->GetLatency(FLOW_INCOMING) + GetNetInfo()->GetLatency(FLOW_OUTGOING);
|
||||
}
|
||||
|
||||
void CPlayer::SetListen(CPlayerSlot slot, ListenOverride listen)
|
||||
{
|
||||
m_listenMap[slot.Get()] = listen;
|
||||
|
||||
@@ -111,7 +111,6 @@ class CPlayer
|
||||
const char* GetModelName() const;
|
||||
int GetUserId() const;
|
||||
float GetTimeConnected() const;
|
||||
float GetLatency() const;
|
||||
void SetListen(CPlayerSlot slot, ListenOverride listen);
|
||||
void SetVoiceFlags(VoiceFlag_t flags);
|
||||
VoiceFlag_t GetVoiceFlags();
|
||||
|
||||
@@ -30,12 +30,15 @@
|
||||
#include <Psapi.h>
|
||||
#endif
|
||||
|
||||
#include <cstdio>
|
||||
#include "gameconfig.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include "memory_module.h"
|
||||
#include "metamod_oslink.h"
|
||||
#include "wchartypes.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#if __linux__
|
||||
struct ModuleInfo {
|
||||
const char *path; // in
|
||||
@@ -118,29 +121,13 @@ int GetModuleInformation(void *hModule, void **base, size_t *length) {
|
||||
}
|
||||
#endif
|
||||
|
||||
byte *ConvertToByteArray(const char *str, size_t *outLength) {
|
||||
size_t len = strlen(str) / 4; // Every byte is represented as \xHH
|
||||
byte *result = (byte *)malloc(len);
|
||||
|
||||
for (size_t i = 0, j = 0; i < len; ++i, j += 4) {
|
||||
sscanf(str + j, "\\x%2hhx", &result[i]);
|
||||
}
|
||||
|
||||
*outLength = len;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
void* FindSignature(const char* moduleName, const char* bytesStr) {
|
||||
size_t iSigLength;
|
||||
auto sigBytes = ConvertToByteArray(bytesStr, &iSigLength);
|
||||
|
||||
auto module = dlmount(moduleName);
|
||||
if (module == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void *moduleBase;
|
||||
void* moduleBase;
|
||||
size_t moduleSize;
|
||||
#if __linux__
|
||||
if (GetModuleInformation(module, &moduleBase, &moduleSize) != 0) {
|
||||
@@ -154,18 +141,30 @@ void* FindSignature(const char* moduleName, const char* bytesStr) {
|
||||
moduleSize = m_hModuleInfo.SizeOfImage;
|
||||
#endif
|
||||
|
||||
unsigned char *pMemory;
|
||||
void *returnAddr = nullptr;
|
||||
auto sigBytes = counterstrikesharp::CGameConfig::HexToByte(bytesStr);
|
||||
|
||||
pMemory = (byte *)moduleBase;
|
||||
if (sigBytes.empty()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < moduleSize; i++) {
|
||||
size_t matches = 0;
|
||||
while (*(pMemory + i + matches) == sigBytes[matches] || sigBytes[matches] == '\x2A') {
|
||||
matches++;
|
||||
if (matches == iSigLength) {
|
||||
returnAddr = (void *)(pMemory + i);
|
||||
}
|
||||
void* returnAddr = nullptr;
|
||||
|
||||
const auto first_byte = sigBytes[0];
|
||||
|
||||
auto pMemory = (byte*)moduleBase;
|
||||
std::uint8_t* end = pMemory + moduleSize - sigBytes.size();
|
||||
|
||||
for (std::uint8_t* current = pMemory; current <= end; ++current) {
|
||||
if (first_byte != -1)
|
||||
current = std::find(current, end, first_byte);
|
||||
|
||||
if (current == end) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (std::equal(sigBytes.begin() + 1, sigBytes.end(), current + 1,
|
||||
[](auto opt, auto byte) { return opt == -1 || opt == byte; })) {
|
||||
return current;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,4 +173,4 @@ void* FindSignature(const char* moduleName, const char* bytesStr) {
|
||||
}
|
||||
|
||||
return returnAddr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,29 +41,35 @@ void* CModule::FindSignature(const char* signature)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
size_t iSigLength = 0;
|
||||
byte* pData = CGameConfig::HexToByte(signature, iSigLength);
|
||||
auto pData = CGameConfig::HexToByte(signature);
|
||||
if (pData.empty()) [[unlikely]]
|
||||
return nullptr;
|
||||
|
||||
return this->FindSignature(pData, iSigLength);
|
||||
return this->FindSignature(pData);
|
||||
}
|
||||
|
||||
void* CModule::FindSignature(const byte* pData, size_t iSigLength)
|
||||
void* CModule::FindSignature(const std::vector<int16_t>& sigBytes)
|
||||
{
|
||||
unsigned char* pMemory;
|
||||
void* return_addr = nullptr;
|
||||
const auto first_byte = sigBytes[0];
|
||||
|
||||
pMemory = (byte*)m_base;
|
||||
auto pMemory = (std::uint8_t*)m_base;
|
||||
std::uint8_t* end = pMemory + m_size - sigBytes.size();
|
||||
|
||||
for (size_t i = 0; i < m_size; i++) {
|
||||
size_t Matches = 0;
|
||||
while (*(pMemory + i + Matches) == pData[Matches] || pData[Matches] == '\x2A') {
|
||||
Matches++;
|
||||
if (Matches == iSigLength)
|
||||
return_addr = (void*)(pMemory + i);
|
||||
for (std::uint8_t* current = pMemory; current <= end; ++current) {
|
||||
if (first_byte != -1)
|
||||
current = std::find(current, end, first_byte);
|
||||
|
||||
if (current == end) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (std::equal(sigBytes.begin() + 1, sigBytes.end(), current + 1,
|
||||
[](auto opt, auto byte) { return opt == -1 || opt == byte; })) {
|
||||
return current;
|
||||
}
|
||||
}
|
||||
|
||||
return return_addr;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void* CModule::FindInterface(const char* name)
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include "interface.h"
|
||||
#include "strtools.h"
|
||||
#include "metamod_oslink.h"
|
||||
|
||||
#include <vector>
|
||||
#undef snprintf
|
||||
|
||||
namespace counterstrikesharp::modules {
|
||||
@@ -34,7 +36,7 @@ class CModule
|
||||
|
||||
void* FindSignature(const char* signature);
|
||||
|
||||
void* FindSignature(const byte* pData, size_t iSigLength);
|
||||
void* FindSignature(const std::vector<int16_t>& sigBytes);
|
||||
|
||||
void* FindInterface(const char* name);
|
||||
|
||||
|
||||
@@ -105,6 +105,7 @@ bool CounterStrikeSharpMMPlugin::Load(PluginId id, ISmmAPI* ismm, char* error, s
|
||||
INTERFACEVERSION_SERVERGAMECLIENTS);
|
||||
GET_V_IFACE_ANY(GetEngineFactory, globals::networkServerService, INetworkServerService,
|
||||
NETWORKSERVERSERVICE_INTERFACE_VERSION);
|
||||
GET_V_IFACE_ANY(GetEngineFactory, globals::schemaSystem, CSchemaSystem, SCHEMASYSTEM_INTERFACE_VERSION);
|
||||
GET_V_IFACE_ANY(GetEngineFactory, globals::gameEventSystem, IGameEventSystem,
|
||||
GAMEEVENTSYSTEM_INTERFACE_VERSION);
|
||||
GET_V_IFACE_ANY(GetEngineFactory, globals::engineServiceManager, IEngineServiceMgr,
|
||||
@@ -173,7 +174,7 @@ void CounterStrikeSharpMMPlugin::Hook_StartupServer(const GameSessionConfigurati
|
||||
globals::timerSystem.OnStartupServer();
|
||||
|
||||
on_activate_callback->ScriptContext().Reset();
|
||||
on_activate_callback->ScriptContext().Push(globals::getGlobalVars()->mapname);
|
||||
on_activate_callback->ScriptContext().Push(globals::getGlobalVars()->mapname.ToCStr());
|
||||
on_activate_callback->Execute();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,19 +26,6 @@
|
||||
namespace counterstrikesharp {
|
||||
std::vector<ValveFunction*> m_managed_ptrs;
|
||||
|
||||
byte* ConvertToByteArray(const char* str, size_t* outLength)
|
||||
{
|
||||
size_t len = strlen(str) / 4; // Every byte is represented as \xHH
|
||||
byte* result = (byte*)malloc(len);
|
||||
|
||||
for (size_t i = 0, j = 0; i < len; ++i, j += 4) {
|
||||
sscanf(str + j, "\\x%2hhx", &result[i]);
|
||||
}
|
||||
|
||||
*outLength = len;
|
||||
return result;
|
||||
}
|
||||
|
||||
void* FindSignatureNative(ScriptContext& scriptContext)
|
||||
{
|
||||
auto moduleName = scriptContext.GetArgument<const char*>(0);
|
||||
|
||||
@@ -24,9 +24,8 @@
|
||||
#include "schema.h"
|
||||
#include "core/function.h"
|
||||
#include "core/coreconfig.h"
|
||||
#include "interfaces/cschemasystem.h"
|
||||
#include "core/cs2_sdk/interfaces/cschemasystem.h"
|
||||
#include "interfaces/cs2_interfaces.h"
|
||||
#include <schemasystem.h>
|
||||
|
||||
namespace counterstrikesharp {
|
||||
|
||||
@@ -59,13 +58,13 @@ int GetSchemaClassSize(ScriptContext& script_context)
|
||||
auto className = script_context.GetArgument<const char*>(0);
|
||||
|
||||
CSchemaSystemTypeScope* pType =
|
||||
interfaces::pSchemaSystem->FindTypeScopeForModule(MODULE_PREFIX "server" MODULE_EXT);
|
||||
globals::schemaSystem->FindTypeScopeForModule(MODULE_PREFIX "server" MODULE_EXT);
|
||||
|
||||
SchemaClassInfoData_t* pClassInfo = pType->FindDeclaredClass(className);
|
||||
SchemaClassInfoData_t* pClassInfo = pType->FindDeclaredClass(className).Get();
|
||||
if (!pClassInfo)
|
||||
return -1;
|
||||
|
||||
return pClassInfo->m_size;
|
||||
return pClassInfo->m_nSize;
|
||||
}
|
||||
|
||||
void GetSchemaValueByName(ScriptContext& script_context)
|
||||
|
||||
Reference in New Issue
Block a user