Skip to content

Commit

Permalink
Testing Phase
Browse files Browse the repository at this point in the history
  • Loading branch information
Batfoxkid committed Feb 15, 2023
1 parent f0f9a22 commit 059b216
Show file tree
Hide file tree
Showing 5 changed files with 1,257 additions and 42 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Compile

on:
pull_request:
branches: main

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
sm-version: [ '1.11.x', '1.12.x']

steps:
- name: Install Checkout
uses: actions/checkout@v1

- name: Install Setup SP ${{ matrix.sm-version }}
uses: rumblefrog/setup-sp@master
with:
version: ${{ matrix.sm-version }}

- name: Setup Workflow
run: |
echo "PLUGIN_VERSION<<EOF" >> $GITHUB_ENV
git rev-list --count HEAD >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
echo "SCRIPTS_PATH=scripting" >> $GITHUB_ENV
- name: Compile ${{ matrix.sm-version }}
run: |
spcomp -E -O2 -v2 filenetwork.sp
working-directory: ${{ env.SCRIPTS_PATH }}
44 changes: 44 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Package

permissions:
contents: write

on:
push:
branches: main

jobs:
release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '*')"

steps:
- name: Install Checkout
uses: actions/checkout@v1

- name: Install Setup SP
uses: rumblefrog/setup-sp@master
with:
version: '1.11.x'

- name: Setup Workflow
run: |
echo "PLUGIN_VERSION<<EOF" >> $GITHUB_ENV
git rev-list --count HEAD >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
echo "SCRIPTS_PATH=scripting" >> $GITHUB_ENV
cd scripting
sed -i -e 's/#define PLUGIN_VERSION.*".*"/#define PLUGIN_VERSION "'$PLUGIN_VERSION'"/g' filenetwork.sp
- name: Compile
run: |
spcomp -E -O2 -v2 -o "filenetwork" filenetwork.sp
working-directory: ${{ env.SCRIPTS_PATH }}

- name: Release
uses: softprops/action-gh-release@master
with:
tag_name: v${{env.PLUGIN_VERSION}}
files: |
scripting/filenetwork.smx
gamedata/filenetwork.txt
50 changes: 26 additions & 24 deletions gamedata/filenetwork.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
"Games"
{
"tf"
"#default"
{
"Keys"
{
"EngineInterface" "VEngineServer021"
}
"Signatures"
{
"CVEngineServer::GetPlayerNetInfo"
"CreateInterface"
{
"library" "engine"
"linux" "@_ZN14CVEngineServer16GetPlayerNetInfoEi"
"windows" "\x55\x8B\xEC\x8B\x4D\x08\x83\xF9\x01\x7C\x2A\x3B\x0D\x2A\x2A\x2A\x2A\x7F\x2A\xA1\x2A\x2A\x2A\x2A\x8B\x44\x88\xFC"
// CVEngineServer::EmitAmbientSound -> Function Listing for CVEngineServer
// (To Confirm No Changes) 8 Up Function List -> CVEngineServer::IndexOfEdict -> EDICT_NUM
// Below CVEngineServer::IndexOfEdict is said function list
"windows" "@CreateInterface"
"linux" "@CreateInterface"
}
}
"Offsets"
{
"GetPlayerNetInfo"
{
"windows" "20"
"linux" "20"
}
}
}
"tf"
{
"Keys"
{
"EngineInterface" "VEngineServer023"
}
"Signatures"
{
"CNetChan::SendFile"
{
"library" "engine"
Expand All @@ -29,22 +48,5 @@
// Top Call -> CNetChan::IsFileInWaitingList
}
}
"Functions"
{
"CNetChan::IsFileInWaitingList"
{
"signature" "CNetChan::IsFileInWaitingList"
"callconv" "thiscall"
"return" "bool"
"this" "ignore"
"arguments"
{
"filename"
{
"type" "stringptr"
}
}
}
}
}
}
Loading

0 comments on commit 059b216

Please sign in to comment.