Популяризирай сървър
Black Friday Свършва след 50% отстъпка за място в Master Server и за списъка Client, който идва с PREMIUM ЗА ЦЯЛ ЖИВОТ
01 Дни 11 Ч 31 Мин 01 Сек
Виж офертите

Fix: flags can be picked up again (#1)

Browse Source
Merged on counter-strike-boost.com by admin #117
C csb-bot committed parent 4560b50279 commit 6a959ffd47ca55748f5799e715ed056a2e82a406
1 changed file with 4 additions and 2 deletions
+4 -2 addons/amxmodx/scripting/csb_ctf.sma M
@@ -47,7 +47,9 @@ public plugin_init()
47 47
48 48 g_pEnabled = register_cvar("csb_ctf_enabled", "1")
49 49
50 - RegisterHam(Ham_Touch, FLAG_CLASS, "fwFlagTouch")
50 + /* flags are info_targets renamed to FLAG_CLASS: Ham hooks need the real
51 + entity class, and the handler keeps only touches of the two flags */
52 + RegisterHam(Ham_Touch, "info_target", "fwFlagTouch")
51 53 register_event("DeathMsg", "eventDeath", "a", "1>0")
52 54
53 55 g_iHudSync = CreateHudSyncObj()
@@ -144,7 +146,7 @@ public fwFlagTouch(flag, other)
144 146
145 147 new i = pev(flag, pev_iuser1)
146 148
147 - if (i < 0 || i > 1)
149 + if (i < 0 || i > 1 || flag != g_iFlagEnt[i])
148 150 return HAM_IGNORED
149 151
150 152 new team = get_user_team(other)
151 153