Merge branch 'restored-content' into dev

This commit is contained in:
1upD 2018-11-26 23:51:55 -05:00
commit bddb12fbc1
2 changed files with 54 additions and 3 deletions

View File

@ -28,8 +28,10 @@
// Custom convars for flaregun
ConVar flaregun_primary_velocity("sv_flaregun_primary_velocity", "1500");
ConVar flaregun_secondary_velocity("sv_flaregun_secondary_velocity", "500");
ConVar flaregun_duration_seconds("sv_flaregun_lifetime_seconds", "10");
ConVar flaregun_duration_seconds("sv_flaregun_lifetime_seconds", "30");
ConVar flaregun_stop_velocity("sv_flaregun_stop_velocity", "128");
ConVar flaregun_projectile_sticky("sv_flaregun_projectile_sticky", "0");
ConVar flaregun_dynamic_lights("sv_flaregun_dynamic_lights", "1");
// Custom derived class for flare gun projectiles
class CFlareGunProjectile : public CFlare
@ -159,6 +161,7 @@ CFlareGunProjectile *CFlareGunProjectile::Create(Vector vecOrigin, QAngle vecAng
pFlare->Spawn();
pFlare->SetTouch(&CFlareGunProjectile::FlareGunProjectileTouch);
pFlare->SetThink(&CFlare::FlareThink);
pFlare->m_bLight = flaregun_dynamic_lights.GetBool();
//Start up the flare
pFlare->Start(lifetime);
@ -219,8 +222,8 @@ void CFlareGunProjectile::FlareGunProjectileTouch(CBaseEntity *pOther)
trace_t tr;
tr = CBaseEntity::GetTouchTrace();
//Only do this on the first bounce
if (m_nBounces == 0)
//Only do this on the first bounce if the convar is set
if (flaregun_projectile_sticky.GetBool() && m_nBounces == 0)
{
const surfacedata_t *pdata = physprops->GetSurfaceData(tr.surface.surfaceProps);

View File

@ -0,0 +1,48 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: Crowbar - an old favorite
//
// $NoKeywords: $
//=============================================================================//
#include "cbase.h"
#include "basehlcombatweapon.h"
#include "player.h"
#include "gamerules.h"
#include "ammodef.h"
#include "mathlib/mathlib.h"
#include "in_buttons.h"
#include "soundent.h"
#include "basebludgeonweapon.h"
#include "vstdlib/random.h"
#include "npcevent.h"
#include "ai_basenpc.h"
#include "weapon_pipe.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
//-----------------------------------------------------------------------------
// CWeaponCrowbar
//-----------------------------------------------------------------------------
IMPLEMENT_SERVERCLASS_ST(CWeaponPipe, DT_WeaponPipe)
END_SEND_TABLE()
LINK_ENTITY_TO_CLASS( weapon_pipe, CWeaponPipe );
PRECACHE_WEAPON_REGISTER( CWeaponPipe );
acttable_t CWeaponPipe::m_acttable[] =
{
{ ACT_MELEE_ATTACK1, ACT_MELEE_ATTACK_SWING, true },
{ ACT_IDLE, ACT_IDLE, false },
{ ACT_IDLE_ANGRY, ACT_IDLE_ANGRY_MELEE, false },
};
IMPLEMENT_ACTTABLE(CWeaponPipe);
//-----------------------------------------------------------------------------
// Constructor
//-----------------------------------------------------------------------------
CWeaponPipe::CWeaponPipe( void )
{
}