diff --git a/.github/workflows/compile-plugin-on-push.yml b/.github/workflows/compile-plugin-on-push.yml new file mode 100644 index 0000000..cbc0db8 --- /dev/null +++ b/.github/workflows/compile-plugin-on-push.yml @@ -0,0 +1,44 @@ +name: Compile Plugin + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + sm-version: [ '1.11.x' ] + + name: SM version ${{ matrix.sm-version }} + + steps: + - uses: actions/checkout@v3 + + - name: Setup SourcePawn Compiler + id: setup + uses: rumblefrog/setup-sp@master + with: + version: ${{ matrix.sm-version }} + + - name: Create plugins directory + run: mkdir plugins + + - run: spcomp -i scripting/include scripting/deathmatch.sp -o plugins/deathmatch.smx + + - name: Prepare files for artifact + run: | + mkdir artifact + mv ./configs ./artifact + mv ./plugins ./artifact/ + mv ./scripting ./artifact/ + mv ./translations ./artifact + mv ./LICENSE ./artifact/ + mv ./CHANGELOG.md ./artifact + mv ./README.md ./artifact + + - name: Upload compiled plugin + uses: actions/upload-artifact@v1 + with: + name: Compiled plugin with SM ${{ steps.setup.outputs.version }} + path: artifact \ No newline at end of file diff --git a/.github/workflows/create-release-on-tag.yml b/.github/workflows/create-release-on-tag.yml new file mode 100644 index 0000000..1eeed07 --- /dev/null +++ b/.github/workflows/create-release-on-tag.yml @@ -0,0 +1,94 @@ +name: Publish release + +on: + push: + tags: + - 'v*' + +jobs: + release: + name: Create GitHub release + runs-on: ubuntu-latest + steps: + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + + - name: Output Release URL File + run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt + + - name: Save Release URL File for publish + uses: actions/upload-artifact@v1 + with: + name: release_url + path: release_url.txt + + compile: + runs-on: ubuntu-latest + needs: release + strategy: + matrix: + sm-version: [ '1.11.x' ] + + name: SM version ${{ matrix.sm-version }} + + steps: + - uses: actions/checkout@v3 + + - name: Setup SourcePawn Compiler + id: setup + uses: rumblefrog/setup-sp@master + with: + version: ${{ matrix.sm-version }} + + - name: Create plugins directory + run: mkdir -p plugins + + - run: spcomp -i ./scripting/include ./scripting/deathmatch.sp -o ./plugins/deathmatch.smx + + - name: Prepare files for artifact + run: | + mkdir artifact + mv ./configs ./artifact + mv ./plugins ./artifact/ + mv ./scripting ./artifact/ + mv ./translations ./artifact + mv ./LICENSE ./artifact/ + mv ./CHANGELOG.md ./artifact + mv ./README.md ./artifact + + - name: Zip plugin + run : | + cd artifact + zip -r deathmatch * + cd .. + mv artifact/deathmatch.zip . + + - name: Load Release URL File from release job + uses: actions/download-artifact@v1 + with: + name: release_url + + - name: Get Release File Name & Upload URL + id: release_url + run: | + value=`cat release_url/release_url.txt` + echo ::set-output name=upload_url::$value + + - name: Upload Release files + id: upload-release-files + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.release_url.outputs.upload_url }} + asset_path: ./deathmatch.zip + asset_name: deathmatch-sm${{ steps.setup.outputs.version }}.zip + asset_content_type: application/zip \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index c1bcdb1..0fdbd4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,12 +7,10 @@ addons: matrix: allow_failures: - - env: SMVERSION=1.10 + - env: SMVERSION=1.11 env: - - SMVERSION=1.8 - - SMVERSION=1.9 - - SMVERSION=1.10 + - SMVERSION=1.11 before_script: - mkdir temp diff --git a/README.md b/README.md index 38b1ce4..87dbcd1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
-
-
+
+
diff --git a/deathmatch.zip b/deathmatch.zip
deleted file mode 100644
index 7aeba38..0000000
Binary files a/deathmatch.zip and /dev/null differ
diff --git a/plugins/deathmatch.smx b/plugins/deathmatch.smx
deleted file mode 100644
index cfead0c..0000000
Binary files a/plugins/deathmatch.smx and /dev/null differ
diff --git a/scripting/deathmatch.sp b/scripting/deathmatch.sp
index 70d849b..63a79c0 100644
--- a/scripting/deathmatch.sp
+++ b/scripting/deathmatch.sp
@@ -3022,7 +3022,7 @@ void MovePlayer(int client)
if (!spawnPointFound) g_iSpawnPointSearchFailures++; /* Stats */
}
-bool IsPointSuitableDistance(int spawnPoint, float[][3] enemyEyePositions, int numberOfEnemies)
+bool IsPointSuitableDistance(int spawnPoint, float enemyEyePositions[][3], int numberOfEnemies)
{
for (int i = 0; i < numberOfEnemies; i++)
{