Promouvoir serveur

Initial release 1.0.0

Browse Source
1.0.0 - Initial release.
Daemon666 committed commit 8b2a22a48106bbc0f5e37ae0e6987ed59fac263d
4 changed files with 176 additions and 0 deletions
+3 -0 CHANGELOG.md A
@@ -0,0 +1,3 @@
1 +## 1.0.0 (2025-05-20)
2 +
3 +1.0.0 - Initial release.
+1 -0 README.md A
@@ -0,0 +1 @@
1 +<p><strong>CSB Semiclip</strong> stops teammates from bodyblocking each other. During a player's own physics step every nearby teammate is briefly made non-solid, so movement never collides with a friend; solidity is restored one step later, and <code>AddToFullPack</code> mirrors the change into the client's prediction so there is no jitter. Shooting is unaffected.</p><p>It is a clean-room GPL re-implementation inspired by the classic <em>Semiclip</em> by ConnorMcLeod.</p><h2>Features</h2><ul><li>Per-player solidity toggling in <code>PlayerPreThink</code>/<code>PlayerPostThink</code></li><li>Optional team-only mode, so enemies still block normally</li><li>Configurable proximity range to keep the loop cheap</li><li>No client-side collision prediction between teammates</li></ul><h2>Installation</h2><ol><li>Put <code>csb_semiclip.amxx</code> in <code>addons/amxmodx/plugins/</code></li><li>Add <code>csb_semiclip.amxx</code> to <code>plugins.ini</code></li><li>Change the map</li></ol>
+131 -0 addons/amxmodx/scripting/csb_semiclip.sma A
@@ -0,0 +1,131 @@
1 +/*
2 + * CSB Semiclip
3 + * Copyright (C) 2026 counter-strike-boost.com
4 + *
5 + * Lets teammates pass through each other instead of blocking. During each
6 + * player's physics window (between his PreThink and PostThink) every close
7 + * teammate is temporarily made non-solid, so movement never collides with a
8 + * friend; the solidity is restored immediately after. AddToFullPack mirrors
9 + * the non-solid state into that client's own prediction so there is no
10 + * client-side jitter. Shooting is unaffected because the change only lasts for
11 + * the owner's own physics step. Essential on Deathrun, KZ, HNS and Jailbreak.
12 + *
13 + * Inspired by the classic "Semiclip" by ConnorMcLeod. This is an independent
14 + * GPL re-implementation; no original code is reused.
15 + *
16 + * This program is free software: you can redistribute it and/or modify it under
17 + * the terms of the GNU General Public License as published by the Free Software
18 + * Foundation, either version 3 of the License, or (at your option) any later
19 + * version. It is distributed in the hope that it will be useful, but WITHOUT
20 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
21 + * FOR A PARTICULAR PURPOSE. See <https://www.gnu.org/licenses/> for details.
22 + */
23 +
24 +#include <amxmodx>
25 +#include <fakemeta>
26 +
27 +new const PLUGIN[] = "CSB Semiclip"
28 +new const VERSION[] = "1.0.0"
29 +new const AUTHOR[] = "counter-strike-boost.com"
30 +
31 +#define SOLID_NOT 0
32 +#define SOLID_SLIDEBOX 3
33 +
34 +new g_pEnabled, g_pTeamOnly, g_pRange
35 +new g_iMaxPlayers
36 +new g_iSaved[33] /* saved pev_solid while non-solid, -1 = untouched */
37 +
38 +public plugin_init()
39 +{
40 + register_plugin(PLUGIN, VERSION, AUTHOR)
41 +
42 + g_pEnabled = register_cvar("csb_semiclip", "1")
43 + g_pTeamOnly = register_cvar("csb_semiclip_teamonly", "1")
44 + g_pRange = register_cvar("csb_semiclip_range", "160")
45 +
46 + register_forward(FM_PlayerPreThink, "fw_PreThink")
47 + register_forward(FM_PlayerPostThink, "fw_PostThink")
48 + register_forward(FM_AddToFullPack, "fw_AddToFullPack", 1)
49 +
50 + g_iMaxPlayers = get_maxplayers()
51 +
52 + for (new i = 1; i <= 32; i++)
53 + g_iSaved[i] = -1
54 +}
55 +
56 +/* Make close teammates non-solid for the duration of id's physics step. */
57 +public fw_PreThink(id)
58 +{
59 + if (!get_pcvar_num(g_pEnabled) || !is_user_alive(id))
60 + return FMRES_IGNORED
61 +
62 + new Float:range = get_pcvar_float(g_pRange)
63 + new bool:teamOnly = get_pcvar_num(g_pTeamOnly) != 0
64 + new team = get_user_team(id)
65 +
66 + new Float:oPos[3], Float:tPos[3]
67 + pev(id, pev_origin, oPos)
68 +
69 + for (new i = 1; i <= g_iMaxPlayers; i++)
70 + {
71 + if (i == id || !is_user_alive(i))
72 + continue
73 +
74 + if (teamOnly && get_user_team(i) != team)
75 + continue
76 +
77 + pev(i, pev_origin, tPos)
78 +
79 + if (range > 0.0 && get_distance_f(oPos, tPos) > range)
80 + continue
81 +
82 + if (g_iSaved[i] != -1) /* already made non-solid this step */
83 + continue
84 +
85 + g_iSaved[i] = pev(i, pev_solid)
86 + set_pev(i, pev_solid, SOLID_NOT)
87 + }
88 +
89 + return FMRES_IGNORED
90 +}
91 +
92 +/* Restore everything we touched once id's movement has been resolved. */
93 +public fw_PostThink(id)
94 +{
95 + for (new i = 1; i <= g_iMaxPlayers; i++)
96 + {
97 + if (g_iSaved[i] == -1)
98 + continue
99 +
100 + if (pev_valid(i))
101 + set_pev(i, pev_solid, g_iSaved[i])
102 +
103 + g_iSaved[i] = -1
104 + }
105 +
106 + return FMRES_IGNORED
107 +}
108 +
109 +/* Kill client-side collision prediction between teammates. */
110 +public fw_AddToFullPack(es, e, ent, host, hostflags, player, pSet)
111 +{
112 + if (!get_pcvar_num(g_pEnabled))
113 + return FMRES_IGNORED
114 +
115 + if (ent < 1 || ent > g_iMaxPlayers || host < 1 || host > g_iMaxPlayers || ent == host)
116 + return FMRES_IGNORED
117 +
118 + if (!is_user_alive(ent) || !is_user_alive(host))
119 + return FMRES_IGNORED
120 +
121 + if (get_pcvar_num(g_pTeamOnly) && get_user_team(ent) != get_user_team(host))
122 + return FMRES_IGNORED
123 +
124 + set_es(es, ES_Solid, SOLID_NOT)
125 + return FMRES_HANDLED
126 +}
127 +
128 +public client_disconnected(id)
129 +{
130 + g_iSaved[id] = -1
131 +}
+41 -0 csb.json A
@@ -0,0 +1,41 @@
1 +{
2 + "name": "CSB Semiclip",
3 + "category": "movement",
4 + "tags": "semiclip, teammates, movement",
5 + "image": "",
6 + "original_author": "ConnorMcLeod",
7 + "original_url": "",
8 + "license": "GPL-3.0",
9 + "title": "CSB Semiclip",
10 + "short_desc": "Teammates pass through each other instead of blocking, so nobody can bodyblock. Great for Deathrun, KZ, HNS and Jailbreak.",
11 + "version": "1.0.0",
12 + "amxx_min": "1.8.2",
13 + "amxx_compile_default": "1.9",
14 + "rehlds_ok": true,
15 + "hlds_ok": true,
16 + "regamedll_required": false,
17 + "metamod_flavor": "any",
18 + "reapi_required": false,
19 + "modules": "fakemeta",
20 + "install_notes": "1. Put csb_semiclip.amxx in addons/amxmodx/plugins/\n2. Add it to plugins.ini\n3. Change the map",
21 + "known_conflicts": "Other semiclip / no-block plugins that also toggle pev_solid.",
22 + "cvars": [
23 + {
24 + "name": "csb_semiclip",
25 + "default": "1",
26 + "description": "Enable the plugin."
27 + },
28 + {
29 + "name": "csb_semiclip_teamonly",
30 + "default": "1",
31 + "description": "1 = only teammates pass through each other; 0 = everyone."
32 + },
33 + {
34 + "name": "csb_semiclip_range",
35 + "default": "160",
36 + "description": "Only affect teammates within this many units (0 = no limit)."
37 + }
38 + ],
39 + "commands": [],
40 + "main": "addons/amxmodx/scripting/csb_semiclip.sma"
41 +}
0 42