33#define DEBUG
44
55#define PLUGIN_AUTHOR " BattlefieldDuck"
6- #define PLUGIN_VERSION " 5.1 "
6+ #define PLUGIN_VERSION " 5.2 "
77
88#include <sourcemod>
99#include <sdkhooks>
@@ -27,6 +27,8 @@ public const float ZERO_VECTOR[3] = {0.0, 0.0, 0.0};
2727//Hide ammo count & weapon selection
2828#define HIDEHUD_WEAPONSELECTION ( 1 << 0 )
2929
30+ #define EF_NODRAW (1 << 5 )
31+
3032//Impluse
3133#define IN_SPRAY 201
3234
@@ -126,6 +128,7 @@ public void OnMapStart()
126128
127129public void OnClientPutInServer (int client )
128130{
131+ g_bPhysGunMode [client ] = false ;
129132 g_bShowHints [client ] = true ;
130133
131134 g_iAimingEntityRef [client ] = INVALID_ENT_REFERENCE ;
@@ -258,6 +261,20 @@ public Action BlockWeaponSwitch(int client, int entity)
258261 return Plugin_Handled ;
259262}
260263
264+ public void TF2_OnConditionRemoved (int client , TFCond condition )
265+ {
266+ if (condition == TFCond_Taunting )
267+ {
268+ if (IsHoldingPhysicsGun (client ))
269+ {
270+ int iViewModel = GetEntPropEnt (client , Prop_Send , " m_hViewModel" );
271+
272+ //Hide Original viewmodel
273+ SetEntProp (iViewModel , Prop_Send , " m_fEffects" , GetEntProp (iViewModel , Prop_Send , " m_fEffects" ) | EF_NODRAW );
274+ }
275+ }
276+ }
277+
261278public Action OnPlayerRunCmd (int client , int &buttons , int &impulse , float vel [3 ], float angles [3 ], int &weapon , int &subtype , int &cmdnum , int &tickcount , int &seed , int mouse [2 ])
262279{
263280 ClientSettings (client , buttons , impulse , vel , angles , weapon , subtype , cmdnum , tickcount , seed , mouse );
@@ -409,7 +426,6 @@ void TE_SetupBeamEnts(int ent1, int ent2, int ModelIndex, int HaloIndex, int Sta
409426
410427//Credits: FlaminSarge
411428#define EF_BONEMERGE (1 << 0 )
412- #define EF_NODRAW (1 << 5 )
413429#define EF_BONEMERGE_FASTCULL (1 << 7 )
414430int CreateVM (int client , int modelindex )
415431{
0 commit comments