Skip to content

Commit 1393956

Browse files
authored
Merge pull request #95 from hedgefog/master
bugfix
2 parents 66e8e67 + ad31b73 commit 1393956

6 files changed

Lines changed: 11 additions & 13 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zombiepanic",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"description": "CS Zombie Panic",
55
"scripts": {
66
"build": "amxxpack build",

src/include/zombiepanic.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
/*
2+
1.5.1
3+
Fixes:
4+
Fixed grenade throw on holster
5+
26
1.5.0
37
Common:
48
Refactored the entire codebase using AMXX Modding Kit

src/include/zombiepanic_const.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <weapon_base_throwable_const>
77

88
#define ZP_TITLE "Zombie Panic"
9-
#define ZP_VERSION "1.5.0"
9+
#define ZP_VERSION "1.5.1"
1010

1111
/*--------------------------------[ Constants ]--------------------------------*/
1212

src/scripts/player-roles/base.sma

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ public plugin_init() {
9797

9898
CW_RegisterClassNativeMethodHook(WEAPON(Base), CW_Method_PrimaryAttack, "CWHook_Weapon_Attack_Post", true);
9999
CW_RegisterClassNativeMethodHook(WEAPON(Base), CW_Method_SecondaryAttack, "CWHook_Weapon_Attack_Post", true);
100-
CW_RegisterClassNativeMethodHook(WEAPON(Grenade), CW_Method_PrimaryAttack, "CWHook_Weapon_Attack_Post", true);
101-
CW_RegisterClassNativeMethodHook(WEAPON(Grenade), CW_Method_SecondaryAttack, "CWHook_Weapon_Attack_Post", true);
102100

103101
CE_RegisterClassNativeMethodHook(ENTITY(Button), CE_Method_Use, "CEHook_Button_Use_Post", true);
104102

src/scripts/weapons/handgrenade.sma

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public plugin_init() {
6565
CW_SetMember(this, CW_Member_iSlot, 3);
6666
CW_SetMember(this, CW_Member_iPosition, 0);
6767
CW_SetMemberString(this, CW_Member_szIcon, "handgrenade");
68+
CW_SetMember(this, Weapon_BaseThrowable_Member_bThrowOnHolster, true);
6869
CW_SetMemberString(this, WEAPON_BASE_MEMBER(szBounceSound), g_rgszBounceSounds[random(g_iBounceSoundsNum)]);
6970
}
7071

@@ -76,16 +77,11 @@ public plugin_init() {
7677

7778
@Weapon_Holster(const this) {
7879
static pPlayer; pPlayer = get_ent_data_entity(this, "CBasePlayerItem", "m_pPlayer");
79-
static Float:flStartThrow; flStartThrow = CW_GetMember(this, BASEGRENADE_MEMBER(flStartThrow));
80-
81-
if (!is_user_connected(pPlayer)) return;
8280

83-
if (flStartThrow) {
84-
CW_CallMethod(this, BASEGRENADE_METHOD(Throw));
81+
if (is_user_connected(pPlayer)) {
82+
emit_sound(pPlayer, CHAN_WEAPON, "common/null.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
8583
}
8684

87-
emit_sound(pPlayer, CHAN_WEAPON, "common/null.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
88-
8985
CW_CallBaseMethod();
9086
}
9187

0 commit comments

Comments
 (0)