Skip to content

Commit 7021f01

Browse files
authored
Merge pull request #2 from CS2ModServer/dev
Upstream merge Source2Ze/CS2Fixes -> CS2ModServer/CS2Fixes
2 parents 2280f55 + cc8fccf commit 7021f01

File tree

93 files changed

+13085
-3789
lines changed

Some content is hidden

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

93 files changed

+13085
-3789
lines changed

.gitattributes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
docker-entrypoint.sh text eol=lf
1+
docker-entrypoint.sh text eol=lf
2+
clang-format.sh text eol=lf
3+
protobuf/protocompile.sh text eol=lf

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
tags:
66
- '*'
77
branches:
8-
- main
8+
- '*'
99
paths-ignore:
1010
- LICENSE
1111
- README.md

AMBuilder

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ for sdk_target in MMSPlugin.sdk_targets:
6363
'src/entities.cpp',
6464
'src/events.cpp',
6565
'src/utils/entity.cpp',
66+
'src/utils/weapon.cpp',
67+
'src/cs2_sdk/entity/services.cpp',
68+
'src/cs2_sdk/entity/ccsplayerpawn.cpp',
69+
'src/cs2_sdk/entity/cbasemodelentity.cpp',
6670
'src/cs2_sdk/schema.cpp',
6771
'src/ctimer.cpp',
6872
'src/panoramavote.cpp',

CS2Fixes.sln

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Global
1414
EndGlobalSection
1515
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1616
{2A734041-5881-4EA1-BF05-46F361443AF3}.Debug|x64.ActiveCfg = Debug|x64
17-
{2A734041-5881-4EA1-BF05-46F361443AF3}.Debug|x64.Build.0 = Debug|x64
1817
{2A734041-5881-4EA1-BF05-46F361443AF3}.Debug|x86.ActiveCfg = Debug|Win32
1918
{2A734041-5881-4EA1-BF05-46F361443AF3}.Debug|x86.Build.0 = Debug|Win32
2019
{2A734041-5881-4EA1-BF05-46F361443AF3}.Release|x64.ActiveCfg = Release|x64

CS2Fixes.vcxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@
225225
<ClCompile Include="src\utils\entity.cpp" />
226226
<ClCompile Include="src\utils\plat_unix.cpp" />
227227
<ClCompile Include="src\utils\plat_win.cpp" />
228+
<ClCompile Include="src\utils\weapon.cpp" />
229+
<ClCompile Include="src\cs2_sdk\entity\services.cpp" />
230+
<ClCompile Include="src\cs2_sdk\entity\ccsplayerpawn.cpp" />
231+
<ClCompile Include="src\cs2_sdk\entity\cbasemodelentity.cpp" />
228232
</ItemGroup>
229233
<ItemGroup>
230234
<ClInclude Include="src\adventuremenu.h" />
@@ -265,6 +269,7 @@
265269
<ClInclude Include="src\cs2_sdk\entity\lights.h" />
266270
<ClInclude Include="src\cs2_sdk\entity\services.h" />
267271
<ClInclude Include="src\cs2_sdk\entity\viewmodels.h" />
272+
<ClInclude Include="src\cs2_sdk\entity\cpointhurt.h" />
268273
<ClInclude Include="src\cs2_sdk\schema.h" />
269274
<ClInclude Include="src\cs2_sdk\entityio.h" />
270275
<ClInclude Include="src\cdetour.h" />
@@ -303,6 +308,7 @@
303308
<ClInclude Include="src\utils\plat.h" />
304309
<ClInclude Include="src\utils\virtual.h" />
305310
<ClInclude Include="src\netmessages.h" />
311+
<ClInclude Include="src\utils\weapon.h" />
306312
</ItemGroup>
307313
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
308314
<ImportGroup Label="ExtensionTargets" />

CS2Fixes.vcxproj.filters

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,18 @@
179179
<ClCompile Include="src\entwatch.cpp">
180180
<Filter>Source Files</Filter>
181181
</ClCompile>
182+
<ClCompile Include="src\utils\weapon.cpp">
183+
<Filter>Source Files\utils</Filter>
184+
</ClCompile>
185+
<ClCompile Include="src\cs2_sdk\entity\services.cpp">
186+
<Filter>Source Files\cs2_sdk\entity</Filter>
187+
</ClCompile>
188+
<ClCompile Include="src\cs2_sdk\entity\ccsplayerpawn.cpp">
189+
<Filter>Source Files\cs2_sdk\entity</Filter>
190+
</ClCompile>
191+
<ClCompile Include="src\cs2_sdk\entity\cbasemodelentity.cpp">
192+
<Filter>Source Files\cs2_sdk\entity</Filter>
193+
</ClCompile>
182194
<ClCompile Include="src\PyAPI.cpp">
183195
<Filter>Source Files</Filter>
184196
</ClCompile>
@@ -403,6 +415,12 @@
403415
<ClInclude Include="src\cs2_sdk\entity\viewmodels.h">
404416
<Filter>Header Files\cs2_sdk\entity</Filter>
405417
</ClInclude>
418+
<ClInclude Include="src\cs2_sdk\entity\cpointhurt.h">
419+
<Filter>Header Files\cs2_sdk\entity</Filter>
420+
</ClInclude>
421+
<ClInclude Include="src\utils\weapon.h">
422+
<Filter>Header Files\utils</Filter>
423+
</ClInclude>
406424
<ClInclude Include="src\PyInclude.h">
407425
<Filter>Header Files</Filter>
408426
</ClInclude>

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ RUN cd ambuild && python setup.py install && cd ..
99
RUN git clone https://github.com/alliedmodders/metamod-source
1010
RUN git config --global --add safe.directory /app
1111

12-
COPY . ./source
1312
COPY ./docker-entrypoint.sh ./
1413
ENV HL2SDKCS2=/app/source/sdk
1514
ENV MMSOURCE112=/app/metamod-source

cfg/cs2fixes/cs2fixes.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ cs2f_drop_map_weapons 0 // Whether to force drop map-spawned weapons on death
2424
cs2f_shuffle_player_physics_sim 0 // Whether to enable shuffle player list in physics simulate
2525
cs2f_prevent_using_players 0 // Whether to prevent +use from hitting players (0=can use players, 1=cannot use players)
2626
cs2f_map_steamids_enable 0 // Whether to make Steam ID's available to maps
27+
cs2f_fix_game_bans 0 // Whether to fix CS2 game bans spreading to all new joining players
2728
2829
cs2f_beacon_particle "particles/cs2fixes/player_beacon.vpcf" // .vpcf file to be precached and used for player beacon
2930
@@ -38,7 +39,7 @@ cs2f_flashlight_shadows 1 // Whether to enable flashlight shadows
3839
cs2f_flashlight_transmit_others 0 // Whether to transmit other players' flashlights, recommended to have shadows disabled with this
3940
cs2f_flashlight_brightness 1.0 // How bright should flashlights be
4041
cs2f_flashlight_distance 54 // How far flashlights should be from the player's head (the default is such that an equipped awp doesn't block the light if shadows are enabled)
41-
cs2f_flashlight_color "255 255 255" // What color to use for flashlights
42+
cs2f_flashlight_color "255 255 255 0" // What color to use for flashlights
4243
cs2f_flashlight_attachment axis_of_intent // Which attachment to parent a flashlight to. If the player model is not properly setup, you might have to use clip_limit here instead
4344

4445
// Damage block settings
@@ -125,6 +126,7 @@ cs2f_leader_defend_particle "particles/cs2fixes/leader_defend_mark.vpcf" /
125126
cs2f_leader_mark_particle "particles/cs2fixes/leader_defend_mark.vpcf" // Path to particle to be used when a ct leader using player_ping
126127
cs2f_leader_can_target_players 0 // Whether a leader can target other players with leader commands (not including c_leader)
127128
cs2f_leader_vote_multiple 1 // If 1, players can vote up to cs2f_max_leaders leaders. If 0, they may vote for a single leader
129+
cs2f_leader_extra_score 20000 // Extra score to give a leader to affect their position on the scoreboard
128130
cs2f_leader_max_leaders 3 // Max amount of leaders set via c_vl or a leader using c_leader (doesn't impact admins)
129131
cs2f_leader_max_markers 6 // Max amount of markers set by leaders (doesn't impact admins)
130132
cs2f_leader_max_glows 3 // Max amount of glows set by leaders (doesn't impact admins)

gamedata/cs2fixes.games.txt

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,6 @@
4545
"windows" "\x76\x2A\xF2\x0F\x10\x4F\x2A\x41\x0F\x28\xC1\x0F\x28\xD1\xF3\x0F\x59\xC0"
4646
"linux" "\x0F\x87\x2A\x2A\x2A\x2A\x49\x8B\x7C\x24\x2A\xE8\x2A\x2A\x2A\x2A\x66\x0F\xEF\xED\x66\x0F\xD6\x85"
4747
}
48-
// Check vauff's pin in #scripting
49-
"ClientMovementUnlock"
50-
{
51-
"library" "client"
52-
"windows" "\x76\x2A\xF2\x0F\x10\x4F\x2A\x41\x0F\x28\xC1\x0F\x28\xD1\xF3\x0F\x59\xC0"
53-
"linux" "\x0F\x87\x2A\x2A\x2A\x2A\x49\x8B\x7D\x30\xE8\x2A\x2A\x2A\x2A\x66\x0F\xEF\xED\x66\x0F\xD6\x85\x2A\x2A\x2A\x2A"
54-
}
55-
// String: "Noise removal", there should be 3 customermachine checks
56-
"HammerNoCustomerMachine"
57-
{
58-
"library" "hammer"
59-
"windows" "\xFF\x15\x2A\x2A\x2A\x2A\x84\xC0\x0F\x85\x2A\x2A\x2A\x2A\xB9"
60-
"linux" ""
61-
}
6248
// String: "CCSPlayerPawnBase::SwitchTeam", just keep in mind this is actually CCSPlayerController::SwitchTeam
6349
"CCSPlayerController_SwitchTeam"
6450
{
@@ -394,15 +380,16 @@
394380
"GameSystem_Think_CheckSteamBan"
395381
{
396382
"library" "server"
397-
"windows" "\x41\x54\x48\x83\xEC\x2A\xBA\x2A\x2A\x2A\x2A\x48\x8D\x0D\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x48\x85\xC0"
383+
"windows" "\x41\x54\x48\x81\xEC\x2A\x2A\x2A\x2A\xBA\x2A\x2A\x2A\x2A\x48\x8D\x0D\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x48\x85\xC0"
398384
"linux" "\x55\x48\x8D\x3D\x2A\x2A\x2A\x2A\xBE\x2A\x2A\x2A\x2A\x48\x89\xE5\x41\x57\x41\x56\x41\x55\x41\x54\x53\x48\x83\xEC"
399385
}
400386
// Location to CUtlMap unk that is referenced by function with "Notification about user penalty: %u/%u (%u sec)\n" string
387+
// On Linux the unk is located in a sub-function that gets called with "CUtlRBTree overflow with %u elements!\n" string
401388
"CCSGameRules__sm_mapGcBanInformation"
402389
{
403390
"library" "server"
404-
"windows" "\x48\x8D\x0D\x2A\x2A\x2A\x2A\xF2\x0F\x58\xC1"
405-
"linux" "\x48\x8D\x3D\x2A\x2A\x2A\x2A\x44\x89\x6D"
391+
"windows" "\x48\x8D\x0D\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x48\x63\xD8\x48\x6B\xD3"
392+
"linux" "\x48\x8D\x3D\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x48\x8B\x05\x2A\x2A\x2A\x2A\x83\x05"
406393
}
407394
}
408395
"Offsets"
@@ -585,18 +572,6 @@
585572
"windows" "\x49\x89\xF8\x90"
586573
"linux" "\x48\x89\xDA\x90\x90"
587574
}
588-
// Client
589-
"ClientMovementUnlock"
590-
{
591-
"windows" "\xEB"
592-
"linux" "\x90\x90\x90\x90\x90\x90"
593-
}
594-
// Hammer
595-
"HammerNoCustomerMachine"
596-
{
597-
"windows" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
598-
"linux" ""
599-
}
600575
}
601576
}
602-
}
577+
}

0 commit comments

Comments
 (0)