From b349bbfd82cde50181c94ccab725560b22cb0461 Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Mon, 8 Jul 2019 21:11:06 +0300 Subject: [PATCH 1/7] Fix rapid crowbar bug --- dlls/crowbar.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/crowbar.cpp b/dlls/crowbar.cpp index 8a0ba9a3..e08a64fb 100644 --- a/dlls/crowbar.cpp +++ b/dlls/crowbar.cpp @@ -287,7 +287,10 @@ int CCrowbar::Swing( int fFirst ) } m_pPlayer->m_iWeaponVolume = CROWBAR_BODYHIT_VOLUME; if( !pEntity->IsAlive() ) + { + m_flNextPrimaryAttack = GetNextAttackDelay(0.25); return TRUE; + } else flVol = 0.1; From 1f584d72374b79b3c888841ea14ab3f992a04cbe Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Mon, 8 Jul 2019 21:20:14 +0300 Subject: [PATCH 2/7] Fix crowbar delay after the first hit --- dlls/crowbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/crowbar.cpp b/dlls/crowbar.cpp index 8a0ba9a3..735b47ff 100644 --- a/dlls/crowbar.cpp +++ b/dlls/crowbar.cpp @@ -330,7 +330,7 @@ int CCrowbar::Swing( int fFirst ) SetThink( &CCrowbar::Smack ); pev->nextthink = UTIL_WeaponTimeBase() + 0.2; #endif - m_flNextPrimaryAttack = GetNextAttackDelay( 0.25 ); + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.25; } #ifdef CROWBAR_IDLE_ANIM m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); From 5869d67d9948d83530bda68db12e5b69e080dbca Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Tue, 15 Oct 2019 07:58:33 +0300 Subject: [PATCH 3/7] Don't show rpg laser spot when player using func_tank --- dlls/rpg.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/rpg.cpp b/dlls/rpg.cpp index fe1fd8a9..f2a7b758 100644 --- a/dlls/rpg.cpp +++ b/dlls/rpg.cpp @@ -535,6 +535,9 @@ void CRpg::UpdateSpot( void ) #ifndef CLIENT_DLL if( m_fSpotActive ) { + if (m_pPlayer->pev->viewmodel == 0) + return; + if( !m_pSpot ) { m_pSpot = CLaserSpot::CreateSpot(); From ae6299f636c19660bb3eef96d539b3d3aef3180d Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 15 Oct 2019 22:16:49 +0300 Subject: [PATCH 4/7] wscript: use taskgen counter to solve problem with compiling shared code instead of hardcoding indexes --- cl_dll/wscript | 2 +- dlls/wscript | 2 +- wscript | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cl_dll/wscript b/cl_dll/wscript index 3ada920a..fb14661d 100644 --- a/cl_dll/wscript +++ b/cl_dll/wscript @@ -62,5 +62,5 @@ def build(bld): use = libs, install_path = install_path, subsystem = bld.env.MSVC_SUBSYSTEM, - idx = 1 + idx = bld.get_taskgen_count() ) diff --git a/dlls/wscript b/dlls/wscript index b1c8cffa..5fb8dc02 100644 --- a/dlls/wscript +++ b/dlls/wscript @@ -68,5 +68,5 @@ def build(bld): use = libs, install_path = install_path, subsystem = bld.env.MSVC_SUBSYSTEM, - idx = 2 + idx = bld.get_taskgen_count() ) diff --git a/wscript b/wscript index f3b268f0..937de04a 100644 --- a/wscript +++ b/wscript @@ -13,6 +13,12 @@ top = '.' Context.Context.line_just = 55 # should fit for everything on 80x26 +@Configure.conf +def get_taskgen_count(self): + try: idx = self.tg_idx_count + except: idx = 0 # don't set tg_idx_count to not increase counter + return idx + def options(opt): grp = opt.add_option_group('Common options') From 3fcc119275fc13037dcb9ce110192cac91f220b0 Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Wed, 16 Oct 2019 01:49:02 +0300 Subject: [PATCH 5/7] Place rapid crowbar fix under a macro --- dlls/crowbar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/crowbar.cpp b/dlls/crowbar.cpp index e08a64fb..2ff537fc 100644 --- a/dlls/crowbar.cpp +++ b/dlls/crowbar.cpp @@ -288,7 +288,9 @@ int CCrowbar::Swing( int fFirst ) m_pPlayer->m_iWeaponVolume = CROWBAR_BODYHIT_VOLUME; if( !pEntity->IsAlive() ) { +#ifdef CROWBAR_FIX_RAPID_CROWBAR m_flNextPrimaryAttack = GetNextAttackDelay(0.25); +#endif return TRUE; } else From c96794aa2dfd3120b8a133555c7192a9e527edc1 Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Wed, 16 Oct 2019 01:51:48 +0300 Subject: [PATCH 6/7] Place crowbar delay fix under a macro --- dlls/crowbar.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/crowbar.cpp b/dlls/crowbar.cpp index 735b47ff..66d8266e 100644 --- a/dlls/crowbar.cpp +++ b/dlls/crowbar.cpp @@ -330,7 +330,11 @@ int CCrowbar::Swing( int fFirst ) SetThink( &CCrowbar::Smack ); pev->nextthink = UTIL_WeaponTimeBase() + 0.2; #endif +#if CROWBAR_DELAY_FIX m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.25; +#else + m_flNextPrimaryAttack = GetNextAttackDelay( 0.25 ); +#endif } #ifdef CROWBAR_IDLE_ANIM m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); From b00170a0a26f86f8ac8e46cb0d8ebb8f2d26a2a1 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 26 Oct 2019 15:48:49 +0300 Subject: [PATCH 7/7] Support compiling with GCC 3.4.3 --- common/com_model.h | 4 ++-- common/mathlib.h | 4 +--- dlls/extdll.h | 7 +++++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/common/com_model.h b/common/com_model.h index abc8e8e6..631373fc 100644 --- a/common/com_model.h +++ b/common/com_model.h @@ -173,7 +173,7 @@ typedef struct mleaf_s } mleaf_t; -typedef struct msurface_s +struct msurface_s { int visframe; // should be drawn when node is crossed @@ -205,7 +205,7 @@ typedef struct msurface_s color24 *samples; // note: this is the actual lightmap data for this surface decal_t *pdecals; -} msurface_t; +}; typedef struct msurfmesh_s { diff --git a/common/mathlib.h b/common/mathlib.h index 6bcf76eb..5a1cd0b0 100644 --- a/common/mathlib.h +++ b/common/mathlib.h @@ -19,14 +19,12 @@ #include typedef float vec_t; -typedef vec_t vec2_t[2]; -#ifndef DID_VEC3_T_DEFINE +#if !defined DID_VEC3_T_DEFINE #define DID_VEC3_T_DEFINE typedef vec_t vec3_t[3]; #endif -typedef vec_t vec4_t[4]; // x,y,z,w #ifndef M_PI #define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h diff --git a/dlls/extdll.h b/dlls/extdll.h index 4610db5e..cded1754 100644 --- a/dlls/extdll.h +++ b/dlls/extdll.h @@ -51,12 +51,15 @@ #ifndef TRUE #define TRUE (!FALSE) #endif +#include +#include typedef unsigned int ULONG; typedef unsigned char BYTE; typedef int BOOL; #define MAX_PATH PATH_MAX -#include -#include +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif #endif //_WIN32 // Misc C-runtime library headers