Skip to content

Commit

Permalink
Remove CS:GO support
Browse files Browse the repository at this point in the history
  • Loading branch information
FortyTwoFortyTwo committed Sep 27, 2023
1 parent 081928f commit 8dcd857
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 72 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# VScript

SourceMod plugin that exposes many VScript features to make use of it. Currently supports CS:GO, L4D2, and TF2.
SourceMod plugin that exposes many VScript features to make use of it. Currently supports L4D2 and TF2.

## Builds
All builds can be found [here](https://github.com/FortyTwoFortyTwo/VScript/actions/workflows/package.yml?query=branch%3Amain). To download latest build version, select latest package then "Artifacts" section underneath.
Expand Down
100 changes: 29 additions & 71 deletions gamedata/vscript.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@

"ScriptVariant_t::m_type"
{
"linux" "4"
"windows" "4"
"linux" "8"
"windows" "8"
}

"sizeof(ScriptVariant_t)"
{
"linux" "8"
"windows" "8"
"linux" "12"
"windows" "16"
}

"sizeof(ScriptFunctionBindingStorageType_t)"
Expand Down Expand Up @@ -187,144 +187,105 @@

"IScriptVM::ReleaseScope"
{
"linux" "14"
"windows" "14"
"linux" "15"
"windows" "15"
}

"IScriptVM::ExecuteFunction"
{
"linux" "17"
"windows" "17"
}

"IScriptVM::RegisterFunction"
{
"linux" "18"
"windows" "18"
}

"IScriptVM::RegisterClass"
"IScriptVM::RegisterFunction"
{
"linux" "19"
"windows" "19"
}

"IScriptVM::RegisterInstance"
"IScriptVM::RegisterClass"
{
"linux" "20"
"windows" "20"
}

"IScriptVM::SetInstanceUniqeId"
"IScriptVM::RegisterInstance"
{
"linux" "21"
"windows" "21"
}

"IScriptVM::GetInstanceValue"
"IScriptVM::SetInstanceUniqeId"
{
"linux" "23"
"windows" "23"
"linux" "22"
"windows" "22"
}

"IScriptVM::GenerateUniqueKey"
"IScriptVM::GetInstanceValue"
{
"linux" "24"
"windows" "24"
}

"IScriptVM::SetValue"
"IScriptVM::GenerateUniqueKey"
{
"linux" "27"
"windows" "26"
"linux" "25"
"windows" "25"
}

"IScriptVM::CreateTable"
"IScriptVM::SetValue"
{
"linux" "28"
"windows" "28"
"windows" "27"
}

"IScriptVM::GetKeyValue"
"IScriptVM::CreateTable"
{
"linux" "30"
"windows" "30"
"linux" "29"
"windows" "29"
}

"IScriptVM::GetValue"
"IScriptVM::GetKeyValue"
{
"linux" "31"
"windows" "31"
}

"IScriptVM::ReleaseValue"
"IScriptVM::GetValue"
{
"linux" "32"
"windows" "32"
}

"IScriptVM::ClearValue"
"IScriptVM::ReleaseValue"
{
"linux" "33"
"windows" "33"
}
}
}

"#default"
{
"#supported"
{
"game" "left4dead2"
"game" "tf"
}

// L4D2 and TF2 have an extra +4 bytes at offset 4, and windows have another at 12

"Offsets"
{
"ScriptVariant_t::m_type"
{
"linux" "8"
"windows" "8"
}

"sizeof(ScriptVariant_t)"
"IScriptVM::ClearValue"
{
"linux" "12"
"windows" "16"
"linux" "34"
"windows" "34"
}
}
}

"csgo"
{
"Keys"
{
"FIELD_TYPEUNKNOWN" "31" // +2
"FIELD_CSTRING" "32" // +2
"FIELD_HSCRIPT" "33" // +2
"FIELD_VARIANT" "0"
"FIELD_QANGLE" "0"
}
}

"left4dead2"
{
"Keys"
{
// 6 - IScriptVM::GetInternalVM
// 8 - IScriptVM::ForwardConsoleCommand
// 16 - IScriptVM::ReferenceScope
//31/29- IScriptVM::SetValue (integer version)
// 33 - IScriptVM::IsTable
//37/36- IScriptVM::GetValue (integer version)
// 38 - IScriptVM::GetScalarValue
// There are more after 41, but none of our offsets go beyond that yet
"IScriptVM::ExtraOffsets"
{
"linux" "6 8 16 31 33 37 38"
"windows" "6 8 16 29 33 36 38"
"linux" "6 8 31 33 37 38"
"windows" "6 8 29 33 36 38"
}

// resetting g_pScriptVM in linux causes crash
Expand All @@ -348,9 +309,6 @@
{
// 6 - IGameSystem::LevelShutdownPreClearSteamAPIContext
"IGameSystem::ExtraOffsets" "6"

// 14 - IScriptVM::ReferenceScope
"IScriptVM::ExtraOffsets" "14"
}

"Offsets"
Expand Down

0 comments on commit 8dcd857

Please sign in to comment.