Skip to content

Commit

Permalink
Let players pick up weapon_c4 with zr_enable 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Frozen-H2O committed Oct 10, 2024
1 parent 51e6b32 commit ddfe477
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion configs/zr/weapons.cfg.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// Gear
"c4"
{
"enabled" "0"
"enabled" "1"
}
"knife"
{
Expand Down
2 changes: 1 addition & 1 deletion src/zombiereborn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,7 @@ bool ZR_Detour_CCSPlayer_WeaponServices_CanUse(CCSPlayer_WeaponServices *pWeapon
if (!pPawn)
return false;
const char *pszWeaponClassname = pPlayerWeapon->GetClassname();
if (pPawn->m_iTeamNum() == CS_TEAM_T && V_strncmp(pszWeaponClassname, "weapon_knife", 12))
if (pPawn->m_iTeamNum() == CS_TEAM_T && V_strncmp(pszWeaponClassname, "weapon_knife", 12) && V_strncmp(pszWeaponClassname, "weapon_c4", 9))
return false;
if (pPawn->m_iTeamNum() == CS_TEAM_CT && V_strlen(pszWeaponClassname) > 7 && !g_pZRWeaponConfig->FindWeapon(pszWeaponClassname + 7))
return false;
Expand Down

0 comments on commit ddfe477

Please sign in to comment.