From 9a8c1dd2bfc768454d39dd98ec6bb699f22ca26a Mon Sep 17 00:00:00 2001 From: Night Owl Date: Wed, 21 Jun 2017 01:17:25 +0500 Subject: [PATCH] Use satchel and handgrenade again. --- cl_dll/hl/hl_weapons.cpp | 11 +++++------ dlls/CMakeLists.txt | 4 ++-- dlls/coldice/cluster_grenade.cpp | 1 - dlls/coldice/tnt.cpp | 2 -- dlls/skill.h | 2 ++ dlls/weapons.cpp | 4 ++-- dlls/weapons.h | 12 ++++++++++-- 7 files changed, 21 insertions(+), 15 deletions(-) diff --git a/cl_dll/hl/hl_weapons.cpp b/cl_dll/hl/hl_weapons.cpp index b3858920..150c8db3 100644 --- a/cl_dll/hl/hl_weapons.cpp +++ b/cl_dll/hl/hl_weapons.cpp @@ -63,10 +63,9 @@ CShotgun g_Shotgun; CRpg g_Rpg; CGauss g_Gauss; CEgon g_Egon; -CHgun g_HGun; +CHgun g_HGun;*/ CHandGrenade g_HandGren; CSatchel g_Satchel; -*/ CTripmine g_Tripmine; //CSqueak g_Snark; @@ -634,9 +633,9 @@ void HUD_InitClientWeapons( void ) HUD_PrepEntity( &g_Rpg, &player ); HUD_PrepEntity( &g_Gauss, &player ); HUD_PrepEntity( &g_Egon, &player ); - HUD_PrepEntity( &g_HGun, &player ); + HUD_PrepEntity( &g_HGun, &player );*/ HUD_PrepEntity( &g_HandGren, &player ); - HUD_PrepEntity( &g_Satchel, &player );*/ + HUD_PrepEntity( &g_Satchel, &player ); HUD_PrepEntity( &g_Tripmine, &player ); //HUD_PrepEntity( &g_Snark, &player ); } @@ -731,13 +730,13 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm break; case WEAPON_HORNETGUN: pWeapon = &g_HGun; - break; + break;*/ case WEAPON_HANDGRENADE: pWeapon = &g_HandGren; break; case WEAPON_SATCHEL: pWeapon = &g_Satchel; - break;*/ + break; case WEAPON_TRIPMINE: pWeapon = &g_Tripmine; break; diff --git a/dlls/CMakeLists.txt b/dlls/CMakeLists.txt index 59c47c50..ef79c330 100644 --- a/dlls/CMakeLists.txt +++ b/dlls/CMakeLists.txt @@ -70,7 +70,7 @@ set (SVDLL_SOURCES h_cine.cpp h_cycler.cpp h_export.cpp -# handgrenade.cpp + handgrenade.cpp hassassin.cpp headcrab.cpp healthkit.cpp @@ -101,7 +101,7 @@ set (SVDLL_SOURCES rat.cpp roach.cpp # rpg.cpp -# satchel.cpp + satchel.cpp schedule.cpp scientist.cpp scripted.cpp diff --git a/dlls/coldice/cluster_grenade.cpp b/dlls/coldice/cluster_grenade.cpp index 82ce742f..83cca989 100644 --- a/dlls/coldice/cluster_grenade.cpp +++ b/dlls/coldice/cluster_grenade.cpp @@ -54,7 +54,6 @@ public: float m_flReleaseThrow; }; LINK_ENTITY_TO_CLASS( weapon_clustergrenade, CClusterGrenade ); -LINK_ENTITY_TO_CLASS( weapon_handgrenade, CClusterGrenade ); void CClusterGrenade::Spawn( ) { diff --git a/dlls/coldice/tnt.cpp b/dlls/coldice/tnt.cpp index d3646f75..9fad93fa 100644 --- a/dlls/coldice/tnt.cpp +++ b/dlls/coldice/tnt.cpp @@ -44,8 +44,6 @@ public: int m_iExplode; }; LINK_ENTITY_TO_CLASS( weapon_tnt, CKamikaze ); -LINK_ENTITY_TO_CLASS( weapon_satchel, CKamikaze ); - void CKamikaze::Spawn( ) { diff --git a/dlls/skill.h b/dlls/skill.h index 12d1dece..be887fb5 100644 --- a/dlls/skill.h +++ b/dlls/skill.h @@ -103,6 +103,8 @@ struct skilldata_t float plrDmgRocket; float plrDmgRailgun; float plrDmgPulse; + float plrDmgHandGrenade; + float plrDmgSatchel; float plrDmgTripmine; // weapons shared by monsters diff --git a/dlls/weapons.cpp b/dlls/weapons.cpp index 85da3f4d..03c0b6a0 100644 --- a/dlls/weapons.cpp +++ b/dlls/weapons.cpp @@ -1679,10 +1679,10 @@ TYPEDESCRIPTION CEgon::m_SaveData[] = }; IMPLEMENT_SAVERESTORE( CEgon, CBasePlayerWeapon ) - +*/ TYPEDESCRIPTION CSatchel::m_SaveData[] = { DEFINE_FIELD( CSatchel, m_chargeReady, FIELD_INTEGER ), }; -IMPLEMENT_SAVERESTORE( CSatchel, CBasePlayerWeapon )*/ +IMPLEMENT_SAVERESTORE( CSatchel, CBasePlayerWeapon ) diff --git a/dlls/weapons.h b/dlls/weapons.h index d926c1f5..afe31048 100644 --- a/dlls/weapons.h +++ b/dlls/weapons.h @@ -132,6 +132,8 @@ public: #define CLUSTERGRENADE_WEIGHT 24 #define TNT_WEIGHT 30 #define NUKE_WEIGHT 40 +#define HANDGRENADE_WEIGHT 5 +#define SATCHEL_WEIGHT -10 // weapon clip/carry ammo capacities #define PPK_MAX_CARRY 64 @@ -155,6 +157,8 @@ public: #define TRIPMINE_MAX_CARRY 2 #define TNT_MAX_CARRY 1 #define NUKE_MAX_CARRY 2 +#define HANDGRENADE_MAX_CARRY 10 +#define SATCHEL_MAX_CARRY 5 // the maximum amount of ammo each weapon's clip can hold #define WEAPON_NOCLIP -1 @@ -174,6 +178,8 @@ public: #define GRENADEL_MAX_CLIP 6 #define ROCKETL_MAX_CLIP 1 #define NUKE_MAX_CLIP 1 +#define HANDGRENADE_MAX_CLIP WEAPON_NOCLIP +#define SATCHEL_MAX_CLIP WEAPON_NOCLIP // the default amount of ammo that comes with each gun when it spawns #define PPK_DEFAULT_GIVE 72 @@ -196,6 +202,8 @@ public: #define TRIPMINE_DEFAULT_GIVE 2 #define TNT_DEFAULT_GIVE 1 #define NUKE_DEFAULT_GIVE 3 +#define HANDGRENADE_DEFAULT_GIVE 5 +#define SATCHEL_DEFAULT_GIVE 1 // The amount of ammo given to a player by an ammo item. #define AMMO_PPKCLIP_GIVE 24 @@ -914,7 +922,7 @@ public: private: unsigned short m_usHornetFire; }; - +*/ class CHandGrenade : public CBasePlayerWeapon { public: @@ -972,7 +980,7 @@ public: #endif } }; -*/ + class CTripmine : public CBasePlayerWeapon { public: