Skip to content

Commit

Permalink
Merge pull request #71 from Hedgefog/master
Browse files Browse the repository at this point in the history
Release 1.4.0
  • Loading branch information
Hedgefog authored Mar 27, 2021
2 parents f0df5fc + f5fadc5 commit a72eb2d
Show file tree
Hide file tree
Showing 35 changed files with 1,681 additions and 267 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Zombie Panic Mod for Counter-Strike 1.6
__Version:__ 1.3.0
__Version:__ 1.4.0

### Download latest:
- [Releases](../../releases)
Expand Down
6 changes: 5 additions & 1 deletion assets/addons/amxmodx/configs/plugins-zombiepanic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ zp_music.amxx
zp_use_pickup.amxx
zp_controls.amxx
zp_infection.amxx
; zp_bot_fixes.amxx

; Hud
zp_mapinfo.amxx
Expand Down Expand Up @@ -71,7 +72,10 @@ zp_entity_weapon_handgrenade.amxx
zp_entity_weapon_satchel.amxx
zp_entity_weapon_shotgun.amxx
zp_entity_weapon_9mmhandgun.amxx
zp_entity_weapon_crowbar.amxx

; Extra
zp_objective_marks.amxx
zp_hud_hints.amxx
zp_hints.amxx


5 changes: 3 additions & 2 deletions assets/addons/amxmodx/configs/zombiepanic.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ mp_scoreboard_showhealth 0
mp_scoreboard_showmoney 0

// [Zombie Panic] Flashlight
zp_flashlight_consumption_rate 0.5
zp_flashlight_consumption_rate 1.0
zp_flashlight_recovery_rate 0.5

// [Zombie Panic] Gamerules
Expand Down Expand Up @@ -38,8 +38,9 @@ zp_zombievision_auto 1

// [Entity] item_healthkit
zp_healthkit_cure_chance 25
zp_healthkit_suspend_infection 1

// [Zombie Panic] Hints HUD
// [Zombie Panic] Hints
zp_hints 1

// [Zombie Panic] Objective Marks
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"selectable": true,
"models": {
"zombie": "models/zombiepanic/v100/characters/male/zombie.mdl",
"human": "models/zombiepanic/v100/characters/male/human.mdl",
Expand Down
Binary file modified assets/maps/zpo_contingency.bsp
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zombiepanic",
"version": "1.3.0",
"version": "1.4.0",
"description": "Zombie Panic Mod",
"scripts": {
"gulp": "gulp",
Expand Down
2 changes: 1 addition & 1 deletion src/include/api_custom_weapons.inc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ enum CW_Flags (<<=1) {

native CW:CW_Register(const szName[], iWeaponId, iClipSize = WEAPON_NOCLIP, iPrimaryAmmoType = -1, iPrimaryAmmoMaxAmount = -1, iSecondaryAmmoType = -1, iSecondaryAmmoMaxAmount = -1, iSlotId = 0, iPosition = 0, iWeaponFlags = 0, const szIcon[] = "", CW_Flags:iFlags = CWF_None);
native CW_Bind(CW:iHandler, CW_Binding:iBinding, const szFunctionName[]);
native CW:CW_GetHandlerByEntity(iEntity);
native CW:CW_GetHandlerByEntity(pEntity);
native CW:CW_GetHandler(const szName[]);

native CW_Deploy(pItem);
Expand Down
48 changes: 47 additions & 1 deletion src/include/zombiepanic.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,38 @@
/*
1.4.0
Additions and improvements:
Infected players with symptoms can now pickup healthkit
Healthkit is now suspends infection
Player disconnection now affets zombie lives
Increased flashlight consumption rate
Bots no longer affect items respawn
Reduced respawn control range for not visible items
Added bodyindex property to Character API
Added inherit property to Characters API
Reduced weapon drop velocity
Force disable minmodels
Added weapon_crowbar entity
Updated humans win message
Increased duration for win message screen fade effect
Improved team menu
Added plugin to fix and improve bots behavior
Cvars:
Added zp_healthkit_suspend_infection cvar
Fixes:
Fixed weaponbox cleanup
Fixed a bug when weapons overflow entities storage
Grenades can no longer be dropped at the start of a throw
Fixed melee hit detection
Fixed respawn task for spectators
Fixed respawn hints
Fixed infected attribute updating
Fixed weapon animations for spectators
Fixed crosshair for spectators
Fixed team info for spectators
Fixed game messages on zpo_contingency map
1.3.0
Additions and improvements:
Removed default pain sound
Expand Down Expand Up @@ -81,16 +115,21 @@ native bool:ZP_Player_IsInfected(pPlayer);
native bool:ZP_Player_IsTransforming(pPlayer);
native bool:ZP_Player_IsPartialZombie(pPlayer);
native ZP_Player_SetInfected(pPlayer, bool:bValue, pInfector = 0);
native ZP_Player_GetInfector(pPlayer);
native bool:ZP_Player_SetCharacter(pPlayer, const szCharacter[]);

forward ZP_Fw_PlayerJoined(pPlayer);
forward ZP_Fw_PlayerPanic(pPlayer);
forward ZP_Fw_PlayerZombieVision(pPlayer, bool:bValue);
forward ZP_Fw_Player_AimItem(pPlayer, pItem);
forward ZP_Fw_PlayerAimItem(pPlayer, pItem);
forward ZP_Fw_PlayerInfected(pPlayer, pInfector);
forward ZP_Fw_PlayerCured(pPlayer);
forward ZP_Fw_PlayerTransformationDeath(pPlayer);
forward ZP_Fw_PlayerTransformed(pPlayer);
forward ZP_Fw_PlayerEquiped(pPlayer);
forward ZP_Fw_PlayerSpeedUpdated(pPlayer);
forward ZP_Fw_PlayerCharacterUpdated(pPlayer);
forward ZP_Fw_PlayerModelUpdated(pPlayer);

// Player inventory

Expand All @@ -102,6 +141,8 @@ native ZP_Player_SetAmmo(pPlayer, const szAmmo[], iValue);
native ZP_Player_AddAmmo(pPlayer, const szAmmo[], iValue);
native ZP_Player_NextAmmo(pPlayer);
native ZP_Player_DropAmmo(pPlayer);
native ZP_Player_GetSelectedAmmo(pPlayer);
native ZP_Player_SetSelectedAmmo(pPlayer, const szAmmo[]);

// Weapons

Expand Down Expand Up @@ -131,6 +172,11 @@ native ZP_GameRules_DispatchWin(iTeam);
native ZP_GameRules_CanItemRespawn(pItem);
native ZP_GameRules_IsCompetitive();

forward ZP_Fw_NewRound();
forward ZP_Fw_RoundStarted();
forward ZP_Fw_RoundEnd(iWinnerTeam);
forward ZP_Fw_ZombieLivesChanged(iLives);

// Map Info

native ZP_ShowMapInfo(pPlayer);
6 changes: 2 additions & 4 deletions src/include/zombiepanic_const.inc
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#define ZP_TITLE "Zombie Panic"
#define ZP_VERSION "1.3.0"
#define ZP_VERSION "1.4.0"

#define ZP_HUMAN_TEAM 2
#define ZP_ZOMBIE_TEAM 1
#define ZP_ZOMBIE_WIN_MESSAGE "#Terrorists_Win"
#define ZP_HUMAN_WIN_MESSAGE "#CTs_Win"
#define ZP_ZOMBIE_TEAM_NAME "Zombies"
#define ZP_HUMAN_TEAM_NAME "Survivors"
#define ZP_HUMAN_TEAM_NAME "Humans"

#define ZP_HUMAN_HEALTH 100.0
#define ZP_ZOMBIE_HEALTH 200.0
Expand Down
29 changes: 29 additions & 0 deletions src/include/zombiepanic_utils.inc
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,32 @@ stock UTIL_SetupSpawnerRespawn(pEntity) {
}
}

stock UTIL_GetAmmoId(const szAmmoName[]) {
new iSize = sizeof(AMMO_LIST);
for (new iAmmoId = 0; iAmmoId < iSize; ++iAmmoId) {
if (equal(AMMO_LIST[iAmmoId], szAmmoName)) {
return iAmmoId;
}
}

return -1;
}

stock bool:UTIL_IsUsableButton(pButton, pPlayer) {
new iszMaster = get_ent_data(pButton, "CBaseToggle", "m_sMaster");

if (iszMaster) {
static szMaster[32];
engfunc(EngFunc_SzFromIndex, iszMaster, szMaster, charsmax(szMaster));

if (!UTIL_IsMasterTriggered(szMaster, pPlayer)) {
return false;
}
}

if (get_ent_data(pButton, "CBaseToggle", "m_toggle_state") != TS_AT_BOTTOM) {
return false;
}

return true;
}
Loading

0 comments on commit a72eb2d

Please sign in to comment.