Skip to content

Commit

Permalink
Merge pull request #149 from Maxximou5/v2
Browse files Browse the repository at this point in the history
Master pull for v2 before v3
  • Loading branch information
Maxximou5 authored Jan 21, 2024
2 parents 2e637b6 + b871f29 commit e806064
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 7 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/compile-plugin-on-push.yml
Original file line number Diff line number Diff line change
@@ -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
94 changes: 94 additions & 0 deletions .github/workflows/create-release-on-tag.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<a href="https://www.maxximou5.com/">
<img src="https://www.maxximou5.com/sourcemod/assests/img/deathmatch_csgo.png" alt="csgo deathmatch plugin" width="600" alt="csgo-deathmatch-logo">
<a href="https://maxximou5.com/">
<img src="https://maxximous.com/static/img/banners/deathmatch_csgo.png" alt="CS:GO Deathmatch Sourcemod Plugin">
</a>
<br>
<a href="https://github.com/Maxximou5/csgo-deathmatch/releases">
Expand Down
Binary file removed deathmatch.zip
Binary file not shown.
Binary file removed plugins/deathmatch.smx
Binary file not shown.
2 changes: 1 addition & 1 deletion scripting/deathmatch.sp
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
{
Expand Down

0 comments on commit e806064

Please sign in to comment.