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

Commit 76509f6

Browse files
authored
1.1.0 release (#44)
* 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]>
1 parent 170b3a6 commit 76509f6

File tree

133 files changed

+30327
-1759
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+30327
-1759
lines changed

.github/workflows/build.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
#Original at https://github.com/Source2ZE/CS2Fixes/blob/main/.github/workflows/build.yml
2+
name: CI
3+
4+
on:
5+
push:
6+
tags:
7+
- '*'
8+
branches:
9+
- main
10+
paths-ignore:
11+
- LICENSE
12+
- README.md
13+
- 'configs**'
14+
- '**.sln'
15+
- '**.vcxproj**'
16+
pull_request:
17+
paths-ignore:
18+
- LICENSE
19+
- README.md
20+
- 'configs**'
21+
- '**.sln'
22+
- '**.vcxproj**'
23+
24+
jobs:
25+
build:
26+
name: Build
27+
runs-on: ${{ matrix.os }}
28+
env:
29+
HL2SDKCS2: ${{ github.workspace }}/mm-cs2-scrim/sdk
30+
container: ${{ matrix.container }}
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
os: [ubuntu-latest, windows-latest]
35+
include:
36+
- os: windows-latest
37+
- os: ubuntu-latest
38+
container: registry.gitlab.steamos.cloud/steamrt/sniper/sdk
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v4
42+
with:
43+
path: mm-cs2-scrim
44+
submodules: recursive
45+
46+
- name: Checkout Metamod
47+
uses: actions/checkout@v4
48+
with:
49+
repository: alliedmodders/metamod-source
50+
ref: master
51+
path: mmsource-2.0
52+
submodules: recursive
53+
54+
- name: Checkout AMBuild
55+
uses: actions/checkout@v4
56+
with:
57+
repository: alliedmodders/ambuild
58+
path: ambuild
59+
60+
- name: Install AMBuild
61+
run: |
62+
cd ambuild && python setup.py install && cd ..
63+
64+
- name: Build
65+
working-directory: mm-cs2-scrim
66+
shell: bash
67+
run: |
68+
mkdir build && cd build
69+
python ../configure.py --enable-optimize --symbol-files --sdks cs2
70+
ambuild
71+
72+
- name: Upload artifact
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: ${{ runner.os }}
76+
path: mm-cs2-scrim/build/package
77+
78+
release:
79+
name: Release
80+
if: startsWith(github.ref, 'refs/tags/')
81+
needs: build
82+
runs-on: ubuntu-latest
83+
84+
steps:
85+
- name: Download artifacts
86+
uses: actions/download-artifact@v4
87+
88+
- name: Package
89+
run: |
90+
version=`echo $GITHUB_REF | sed "s/refs\/tags\///"`
91+
ls -Rall
92+
if [ -d "./Linux/" ]; then
93+
cd ./Linux/
94+
tar -czf ../${{ github.event.repository.name }}-${version}-linux.tar.gz *
95+
cd -
96+
fi
97+
if [ -d "./Windows/" ]; then
98+
cd ./Windows/
99+
zip -r ../${{ github.event.repository.name }}-${version}-windows.zip *
100+
cd -
101+
fi
102+
103+
- name: Release
104+
uses: svenstaro/upload-release-action@v2
105+
with:
106+
repo_token: ${{ secrets.GITHUB_TOKEN }}
107+
file: ${{ github.event.repository.name }}-*
108+
tag: ${{ github.ref }}
109+
file_glob: true

.github/workflows/compile-metamod-addon.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ on:
44
- pull_request
55

66
env:
7-
HL2SDKCS2: /home/runner/work/mm-cs2-scrim/mm-cs2-scrim/sdk
8-
MMSOURCE_DEV: /home/runner/work/mm-cs2-scrim/mm-cs2-scrim/metamod-source
7+
HL2SDKCS2: /__w/mm-cs2-scrim/mm-cs2-scrim/sdk
8+
MMSOURCE_DEV: /__w/mm-cs2-scrim/mm-cs2-scrim/metamod-source
99
CC: clang
1010
CXX: clang++
1111

1212
jobs:
1313
build:
1414
runs-on: ubuntu-latest
15+
container: registry.gitlab.steamos.cloud/steamrt/sniper/sdk
1516

1617
steps:
1718
- name: Checkout
@@ -42,7 +43,7 @@ jobs:
4243
ls -la
4344
- name: Update submodules
4445
run: |
45-
cd /home/runner/work/mm-cs2-scrim/mm-cs2-scrim/metamod-source
46+
cd metamod-source
4647
git submodule update --recursive
4748
4849
- name: Compile
@@ -57,9 +58,9 @@ jobs:
5758
sudo apt-get install python3 -y
5859
sudo apt-get install gcc -y
5960
echo ---
60-
cd /home/runner/work/mm-cs2-scrim/mm-cs2-scrim/ambuild && sudo python3 ./setup.py install
61+
cd ambuild && sudo python3 ./setup.py install
6162
ls -la
62-
cd /home/runner/work/mm-cs2-scrim/mm-cs2-scrim
63+
cd ../
6364
ls -la
64-
mkdir build && cd build && python3 ../configure.py --enable-optimize --symbol-files --sdks cs2
65+
mkdir build && cd build && python3 ../configure.py --sdks cs2 --targets x86_64
6566
ambuild

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
[Dd]ebug/
1+
/[Dd]ebug/
22
[Dd]ebugPublic/
3-
[Rr]elease/
3+
/[Rr]elease/
44
[Rr]eleases/
55
[Pp]ublish/
66
[Pp]roperties/

AMBuildScript

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ class MMSPluginConfig(object):
278278
cxx.linkflags += ['/NODEFAULTLIB:libcmt']
279279
else:
280280
cxx.cflags += ['/MT']
281-
cxx.linkflags += ['/NODEFAULTLIB:libcmt']
282281
cxx.defines += [
283282
'_CRT_SECURE_NO_DEPRECATE',
284283
'_CRT_SECURE_NO_WARNINGS',
@@ -470,8 +469,7 @@ class MMSPluginConfig(object):
470469
else:
471470
compiler.postlink += [os.path.join(lib_folder, 'interfaces_i486.a')]
472471

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

476474
binary = self.Library(compiler, name)
477475
compiler = binary.compiler

AMBuilder

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,49 +26,60 @@ for sdk_name in MMSPlugin.sdks:
2626
os.path.join(builder.sourcePath, 'vendor', 'subhook'),
2727
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'include'),
2828
os.path.join(builder.sourcePath, 'vendor', 'protobuf-3.21.8', 'src'),
29+
os.path.join(builder.sourcePath, 'protobuf', 'generated'),
2930
]
3031

32+
target_folder = 'Debug' if builder.options.debug else 'Release'
33+
target_protobuf = 'libprotobufd' if builder.options.debug else 'libprotobuf'
34+
3135
if binary.compiler.target.platform == 'linux':
3236
binary.compiler.postlink += [
33-
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', 'libfunchook.a'),
34-
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', 'libdistorm.a'),
35-
os.path.join(builder.sourcePath, 'vendor', 'protobuf-lib', 'libprotobuf.a'),
37+
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', target_folder, 'libfunchook.a'),
38+
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', target_folder, 'libdistorm.a'),
39+
os.path.join(builder.sourcePath, 'vendor', 'protobuf-lib', target_folder, target_protobuf + '.a'),
3640
]
3741
binary.sources += ['src/utils/plat_unix.cpp']
3842
elif binary.compiler.target.platform == 'windows':
3943
binary.compiler.postlink += [
4044
os.path.join('psapi.lib'),
41-
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', 'funchook.lib'),
42-
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', 'distorm.lib'),
43-
os.path.join(builder.sourcePath, 'vendor', 'protobuf-lib', 'libprotobuf.lib'),
45+
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', target_folder, 'funchook.lib'),
46+
os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', target_folder, 'distorm.lib'),
47+
os.path.join(builder.sourcePath, 'vendor', 'protobuf-lib', target_folder, target_protobuf + '.lib'),
48+
os.path.join(builder.sourcePath, 'sdk', 'lib', 'public', 'win64', 'steam_api64.lib')
4449
]
4550
binary.sources += ['src/utils/plat_win.cpp']
4651

4752

4853
binary.sources += [
4954
'src/cs2fixes.cpp',
5055
'src/mempatch.cpp',
51-
'src/patches.cpp',
5256
'src/cvars.cpp',
53-
'src/adminsystem.cpp',
57+
'src/adminsystem.cpp',
5458
'src/commands.cpp',
5559
'src/addresses.cpp',
5660
'src/detours.cpp',
5761
'src/events.cpp',
5862
'src/utils/entity.cpp',
5963
'src/cs2_sdk/schema.cpp',
60-
'src/cs2_sdk/interfaces/cs2_interfaces.cpp',
61-
'src/cs2_sdk/interfaces/centitysystem.cpp',
6264
'src/ctimer.cpp',
6365
'src/playermanager.cpp',
6466
'src/gameconfig.cpp',
67+
'src/gamesystem.cpp',
68+
'src/entitylistener.cpp',
6569
]
6670

6771
if sdk_name in ['dota', 'cs2']:
6872
binary.sources += [
73+
os.path.join(sdk.path, 'entity2', 'entitysystem.cpp'),
74+
os.path.join(sdk.path, 'entity2', 'entityidentity.cpp'),
75+
os.path.join(sdk.path, 'entity2', 'entitykeyvalues.cpp'),
6976
os.path.join(sdk.path, 'tier1', 'convar.cpp'),
70-
os.path.join(sdk.path, 'tier1', 'generichash.cpp'),
71-
os.path.join(sdk.path, 'public', 'tier0', 'memoverride.cpp'),
77+
os.path.join(sdk.path, 'tier1', 'keyvalues3.cpp'),
78+
]
79+
80+
if sdk_name in ['dota', 'cs2'] and (binary.compiler.target.platform == 'windows' and builder.options.debug != '1') or binary.compiler.target.platform == 'linux':
81+
binary.sources += [
82+
os.path.join(sdk.path, 'public', 'tier0', 'memoverride.cpp')
7283
]
7384

7485
if cxx.target.arch == 'x86':

CFGs/cs2scrim/cs2scrim.cfg

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// cvars for cs2scrim plugin
2+
// you can enable/disable features from this config file
3+
// by default all the features are enabled internally
4+
5+
//console command | Value | Chat command
6+
cs2scrim_coach 1 //.coach
7+
cs2scrim_pracc 1 //.pracc
8+
cs2scrim_scrim 1 //.scrim
9+
cs2scrim_demo 1 //.record .stoprecord
10+
cs2scrim_restore 1 //.restore
11+
cs2scrim_rcon 1 //.rcon
12+
cs2scrim_pause 1 //.pause .unpause
13+
cs2scrim_practice_spawn 1 //.spawn
14+
cs2scrim_admin_ban 1 //.ban
15+
cs2scrim_admin_kick 1 //.kick
16+
cs2scrim_admin_gag 1 //.gag
17+
cs2scrim_admin_slay 1 //.slay
18+
cs2scrim_admin_teleport 1 //.goto
19+
cs2scrim_admin_team 1 //.setteam

CFGs/gotvcfg.cfg

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
sv_hibernate_postgame_delay 180
22

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

CFGs/pracc.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,5 @@ sv_grenade_trajectory_prac_pipreview 1
5050

5151
buddha_reset_hp 100
5252
buddha 1
53-
say "Practice CFG Mode loaded"
53+
say "Practice CFG loaded"
54+
say "by ρλd"

CFGs/scrim.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ mp_autokick 0
44
mp_match_can_clinch 0
55

66
mp_freezetime 20
7+
mp_warmup_end
78
mp_restartgame 1
89

910
cash_team_bonus_shorthanded 0
1011

11-
say mr24 loaded
12+
say "Competitive MR24 loaded"
13+
say "by ρλd"

0 commit comments

Comments
 (0)