Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
1.1.0 release (#44)
Browse files Browse the repository at this point in the history
* 1.0.4 release, new features and fixes (#38)

* Uppdate credits

* Change ambuild config setting

* Coach tweaking

* Add `.noflash` command

* Add player damaged info

* Fix parse chat command function

* Add team select through chat command (`.ct`, `.t`, `.spec`, `side`)

* Remove unused sound block

* Clean up

* Hook say command, from `CS2Fixes`

Source2ZE/CS2Fixes@2808f35

* Fix build script

* Coach not taking player spawn

* Add `.rcon`

* 2nd iteration coach spawn

* Flash info fix

* Add map on demo name

* Coach 2nd iteration

* Coach choose side on spec

* bump version

* Spawn side can be chosen

Command optional addition `!spawn <spawn number> <ct/t>`

* Coach can choose side

Optional addition `.coach <ct/t>`

* Coach does dont block player spawns anymore

Now the coach is not blocking the competitive spawns from players.
On round pre-start the coach is switched to spectator, the players are spawned, once all the players are on the competitive spawns, the coach is moved to its target team.

* Add modularity to enable/disable features

Now the features of the plugin are configurable from the cs2scrim .cfg file, all enabled by default (if the cfg is not present)

* Fix flash crash

The crash was happening casued by null pointer not being checked

* Added `CCSPlayerPawnBase`

Needed class to remove flash effect

* Add `.last` command

.last command will teleport you to the latest grenade thrown, individual for each player.

fix

* Fix admin not being loaded

Fixing #36

* Block `.noclip` command only for practice

* Change plugin description and author

* Update readme

* Fix compile action

* Fix include

* Bump version `1.0.4-beta`

* Remove grenade thrown debug info

* Add `.unban` command (#20)

Co-authored-by: marqdevx <[email protected]>

* Comment

* Clean cvar

* Add description

* Improve performance

* Enable by cvar

* Mark and clean

* Fix `.setteam`

* Add CFGs

* create subfolder

* Bump version `1.0.4`

* Add control by cvar

* Remove tests

* Fix `.noflash` command

* Add control by cvars

* Clean description

* Update command list and description

* Update command list

* Clean and update credits

* Marqdevx/rebase/cs2fixes 1.5.0 (#43)

* Rebase from @CS2Fixes 1.5.0

* Remove unused functions

* Fix addresses

* Fix addresses namespace

* Fix changelevel crash

* add credits and warmup end

* Remove unused `Playerpawnbase` header

Now the `CCSPlayerPawnBase` is inside `CCSPlayerPawn` class header

* Fix client crash onTransmit

* Dont install ambuild when its already done

* Cleared get slots APis

* Re-add new features after rebase

---------

Co-authored-by: marqdevx <[email protected]>

* Add mapname to .dem file

---------

Co-authored-by: marqdevx <[email protected]>

* Bump version

* Update roadmap and metamod version

* Update gamedata txt `d51c978`

* coach kill after spawn

* Remove spawn priority output

* Remove CS2Fixes patches

* Enable no flash due to typo

* Fix cvar descriptions

* Move organize command

* Bump version

* Clean feedback chat and colors

* Remove coach on disconnect

* Last grenade only teleports if exists

* Update readme

* Fix spawns teleport

Fixing #45

* Add gotv folder

---------

Co-authored-by: marqdevx <[email protected]>
  • Loading branch information
marqdevx and marqdevx authored Mar 6, 2024
1 parent 170b3a6 commit 76509f6
Show file tree
Hide file tree
Showing 133 changed files with 30,327 additions and 1,759 deletions.
109 changes: 109 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
#Original at https://github.com/Source2ZE/CS2Fixes/blob/main/.github/workflows/build.yml
name: CI

on:
push:
tags:
- '*'
branches:
- main
paths-ignore:
- LICENSE
- README.md
- 'configs**'
- '**.sln'
- '**.vcxproj**'
pull_request:
paths-ignore:
- LICENSE
- README.md
- 'configs**'
- '**.sln'
- '**.vcxproj**'

jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
env:
HL2SDKCS2: ${{ github.workspace }}/mm-cs2-scrim/sdk
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: windows-latest
- os: ubuntu-latest
container: registry.gitlab.steamos.cloud/steamrt/sniper/sdk
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: mm-cs2-scrim
submodules: recursive

- name: Checkout Metamod
uses: actions/checkout@v4
with:
repository: alliedmodders/metamod-source
ref: master
path: mmsource-2.0
submodules: recursive

- name: Checkout AMBuild
uses: actions/checkout@v4
with:
repository: alliedmodders/ambuild
path: ambuild

- name: Install AMBuild
run: |
cd ambuild && python setup.py install && cd ..
- name: Build
working-directory: mm-cs2-scrim
shell: bash
run: |
mkdir build && cd build
python ../configure.py --enable-optimize --symbol-files --sdks cs2
ambuild
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}
path: mm-cs2-scrim/build/package

release:
name: Release
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest

steps:
- name: Download artifacts
uses: actions/download-artifact@v4

- name: Package
run: |
version=`echo $GITHUB_REF | sed "s/refs\/tags\///"`
ls -Rall
if [ -d "./Linux/" ]; then
cd ./Linux/
tar -czf ../${{ github.event.repository.name }}-${version}-linux.tar.gz *
cd -
fi
if [ -d "./Windows/" ]; then
cd ./Windows/
zip -r ../${{ github.event.repository.name }}-${version}-windows.zip *
cd -
fi
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.event.repository.name }}-*
tag: ${{ github.ref }}
file_glob: true
13 changes: 7 additions & 6 deletions .github/workflows/compile-metamod-addon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ on:
- pull_request

env:
HL2SDKCS2: /home/runner/work/mm-cs2-scrim/mm-cs2-scrim/sdk
MMSOURCE_DEV: /home/runner/work/mm-cs2-scrim/mm-cs2-scrim/metamod-source
HL2SDKCS2: /__w/mm-cs2-scrim/mm-cs2-scrim/sdk
MMSOURCE_DEV: /__w/mm-cs2-scrim/mm-cs2-scrim/metamod-source
CC: clang
CXX: clang++

jobs:
build:
runs-on: ubuntu-latest
container: registry.gitlab.steamos.cloud/steamrt/sniper/sdk

steps:
- name: Checkout
Expand Down Expand Up @@ -42,7 +43,7 @@ jobs:
ls -la
- name: Update submodules
run: |
cd /home/runner/work/mm-cs2-scrim/mm-cs2-scrim/metamod-source
cd metamod-source
git submodule update --recursive
- name: Compile
Expand All @@ -57,9 +58,9 @@ jobs:
sudo apt-get install python3 -y
sudo apt-get install gcc -y
echo ---
cd /home/runner/work/mm-cs2-scrim/mm-cs2-scrim/ambuild && sudo python3 ./setup.py install
cd ambuild && sudo python3 ./setup.py install
ls -la
cd /home/runner/work/mm-cs2-scrim/mm-cs2-scrim
cd ../
ls -la
mkdir build && cd build && python3 ../configure.py --enable-optimize --symbol-files --sdks cs2
mkdir build && cd build && python3 ../configure.py --sdks cs2 --targets x86_64
ambuild
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Dd]ebug/
/[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
/[Rr]elease/
[Rr]eleases/
[Pp]ublish/
[Pp]roperties/
Expand Down
4 changes: 1 addition & 3 deletions AMBuildScript
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ class MMSPluginConfig(object):
cxx.linkflags += ['/NODEFAULTLIB:libcmt']
else:
cxx.cflags += ['/MT']
cxx.linkflags += ['/NODEFAULTLIB:libcmt']
cxx.defines += [
'_CRT_SECURE_NO_DEPRECATE',
'_CRT_SECURE_NO_WARNINGS',
Expand Down Expand Up @@ -470,8 +469,7 @@ class MMSPluginConfig(object):
else:
compiler.postlink += [os.path.join(lib_folder, 'interfaces_i486.a')]

if sdk.name == 'bms':
compiler.postlink += [os.path.join(lib_folder, 'mathlib.a')]
compiler.postlink += [os.path.join(lib_folder, 'mathlib.a')]

binary = self.Library(compiler, name)
compiler = binary.compiler
Expand Down
35 changes: 23 additions & 12 deletions AMBuilder
Original file line number Diff line number Diff line change
Expand Up @@ -26,49 +26,60 @@ for sdk_name in MMSPlugin.sdks:
os.path.join(builder.sourcePath, 'vendor', 'subhook'),
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'include'),
os.path.join(builder.sourcePath, 'vendor', 'protobuf-3.21.8', 'src'),
os.path.join(builder.sourcePath, 'protobuf', 'generated'),
]

target_folder = 'Debug' if builder.options.debug else 'Release'
target_protobuf = 'libprotobufd' if builder.options.debug else 'libprotobuf'

if binary.compiler.target.platform == 'linux':
binary.compiler.postlink += [
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', 'libfunchook.a'),
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', 'libdistorm.a'),
os.path.join(builder.sourcePath, 'vendor', 'protobuf-lib', 'libprotobuf.a'),
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', target_folder, 'libfunchook.a'),
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', target_folder, 'libdistorm.a'),
os.path.join(builder.sourcePath, 'vendor', 'protobuf-lib', target_folder, target_protobuf + '.a'),
]
binary.sources += ['src/utils/plat_unix.cpp']
elif binary.compiler.target.platform == 'windows':
binary.compiler.postlink += [
os.path.join('psapi.lib'),
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', 'funchook.lib'),
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', 'distorm.lib'),
os.path.join(builder.sourcePath, 'vendor', 'protobuf-lib', 'libprotobuf.lib'),
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', target_folder, 'funchook.lib'),
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', target_folder, 'distorm.lib'),
os.path.join(builder.sourcePath, 'vendor', 'protobuf-lib', target_folder, target_protobuf + '.lib'),
os.path.join(builder.sourcePath, 'sdk', 'lib', 'public', 'win64', 'steam_api64.lib')
]
binary.sources += ['src/utils/plat_win.cpp']


binary.sources += [
'src/cs2fixes.cpp',
'src/mempatch.cpp',
'src/patches.cpp',
'src/cvars.cpp',
'src/adminsystem.cpp',
'src/adminsystem.cpp',
'src/commands.cpp',
'src/addresses.cpp',
'src/detours.cpp',
'src/events.cpp',
'src/utils/entity.cpp',
'src/cs2_sdk/schema.cpp',
'src/cs2_sdk/interfaces/cs2_interfaces.cpp',
'src/cs2_sdk/interfaces/centitysystem.cpp',
'src/ctimer.cpp',
'src/playermanager.cpp',
'src/gameconfig.cpp',
'src/gamesystem.cpp',
'src/entitylistener.cpp',
]

if sdk_name in ['dota', 'cs2']:
binary.sources += [
os.path.join(sdk.path, 'entity2', 'entitysystem.cpp'),
os.path.join(sdk.path, 'entity2', 'entityidentity.cpp'),
os.path.join(sdk.path, 'entity2', 'entitykeyvalues.cpp'),
os.path.join(sdk.path, 'tier1', 'convar.cpp'),
os.path.join(sdk.path, 'tier1', 'generichash.cpp'),
os.path.join(sdk.path, 'public', 'tier0', 'memoverride.cpp'),
os.path.join(sdk.path, 'tier1', 'keyvalues3.cpp'),
]

if sdk_name in ['dota', 'cs2'] and (binary.compiler.target.platform == 'windows' and builder.options.debug != '1') or binary.compiler.target.platform == 'linux':
binary.sources += [
os.path.join(sdk.path, 'public', 'tier0', 'memoverride.cpp')
]

if cxx.target.arch == 'x86':
Expand Down
19 changes: 19 additions & 0 deletions CFGs/cs2scrim/cs2scrim.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// cvars for cs2scrim plugin
// you can enable/disable features from this config file
// by default all the features are enabled internally

//console command | Value | Chat command
cs2scrim_coach 1 //.coach
cs2scrim_pracc 1 //.pracc
cs2scrim_scrim 1 //.scrim
cs2scrim_demo 1 //.record .stoprecord
cs2scrim_restore 1 //.restore
cs2scrim_rcon 1 //.rcon
cs2scrim_pause 1 //.pause .unpause
cs2scrim_practice_spawn 1 //.spawn
cs2scrim_admin_ban 1 //.ban
cs2scrim_admin_kick 1 //.kick
cs2scrim_admin_gag 1 //.gag
cs2scrim_admin_slay 1 //.slay
cs2scrim_admin_teleport 1 //.goto
cs2scrim_admin_team 1 //.setteam
12 changes: 6 additions & 6 deletions CFGs/gotvcfg.cfg
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
sv_hibernate_postgame_delay 180

tv_allow_camera_man 1 // Auto director allows spectators to become camera man
tv_allow_camera_man 0 // Auto director allows spectators to become camera man
tv_allow_static_shots 1 // Auto director uses fixed level cameras for shots
tv_autorecord 0 // Automatically records all games as GOTV demos.
tv_chatgroupsize 0 // Set the default chat group size
tv_chattimelimit 8 // Limits spectators to chat only every n seconds
tv_debug 0 // GOTV debug info.
tv_delaymapchange 1 // Delays map change until broadcast is complete
tv_deltacache 2 // Enable delta entity bit stream cache
tv_delaymapchange 0 // Delays map change until broadcast is complete
tv_deltacache 0 // Enable delta entity bit stream cache
tv_dispatchmode 1 // Dispatch clients to relay proxies: 0=never, 1=if appropriate, 2=always
tv_enable 1 // Activates GOTV on server.
tv_maxclients 10 // Maximum client number on GOTV server.
tv_maxrate 20000 // Max GOTV spectator bandwidth rate allowed, 0 == unlimited
tv_maxclients 1 // Maximum client number on GOTV server.
tv_maxrate 0 // Max GOTV spectator bandwidth rate allowed, 0 == unlimited
tv_name "CS2Scrim - GOTV" // GOTV host name
tv_overridemaster 0 // Overrides the GOTV master root address.
tv_port 27016 // Host SourceTV port
tv_relaypassword schmetterling // GOTV password for relay proxies
tv_relayvoice 0 // Relay voice data: 0=off, 1=on
tv_snapshotrate 128 // Snapshots broadcasted per second
tv_timeout 30 // GOTV connection timeout in seconds.
tv_timeout 15 // GOTV connection timeout in seconds.
tv_title "CS2Scrim - GOTV" // Set title for GOTV spectator UI
tv_transmitall 1 // Transmit all entities (not only director view)

Expand Down
3 changes: 2 additions & 1 deletion CFGs/pracc.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ sv_grenade_trajectory_prac_pipreview 1

buddha_reset_hp 100
buddha 1
say "Practice CFG Mode loaded"
say "Practice CFG loaded"
say "by ρλd"
4 changes: 3 additions & 1 deletion CFGs/scrim.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ mp_autokick 0
mp_match_can_clinch 0

mp_freezetime 20
mp_warmup_end
mp_restartgame 1

cash_team_bonus_shorthanded 0

say mr24 loaded
say "Competitive MR24 loaded"
say "by ρλd"
Loading

0 comments on commit 76509f6

Please sign in to comment.