mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-06-01 00:17:43 +03:00
Merge branch 'restored-content' into dev
This commit is contained in:
commit
bddb12fbc1
@ -28,8 +28,10 @@
|
|||||||
// Custom convars for flaregun
|
// Custom convars for flaregun
|
||||||
ConVar flaregun_primary_velocity("sv_flaregun_primary_velocity", "1500");
|
ConVar flaregun_primary_velocity("sv_flaregun_primary_velocity", "1500");
|
||||||
ConVar flaregun_secondary_velocity("sv_flaregun_secondary_velocity", "500");
|
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_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
|
// Custom derived class for flare gun projectiles
|
||||||
class CFlareGunProjectile : public CFlare
|
class CFlareGunProjectile : public CFlare
|
||||||
@ -159,6 +161,7 @@ CFlareGunProjectile *CFlareGunProjectile::Create(Vector vecOrigin, QAngle vecAng
|
|||||||
pFlare->Spawn();
|
pFlare->Spawn();
|
||||||
pFlare->SetTouch(&CFlareGunProjectile::FlareGunProjectileTouch);
|
pFlare->SetTouch(&CFlareGunProjectile::FlareGunProjectileTouch);
|
||||||
pFlare->SetThink(&CFlare::FlareThink);
|
pFlare->SetThink(&CFlare::FlareThink);
|
||||||
|
pFlare->m_bLight = flaregun_dynamic_lights.GetBool();
|
||||||
|
|
||||||
//Start up the flare
|
//Start up the flare
|
||||||
pFlare->Start(lifetime);
|
pFlare->Start(lifetime);
|
||||||
@ -219,8 +222,8 @@ void CFlareGunProjectile::FlareGunProjectileTouch(CBaseEntity *pOther)
|
|||||||
trace_t tr;
|
trace_t tr;
|
||||||
tr = CBaseEntity::GetTouchTrace();
|
tr = CBaseEntity::GetTouchTrace();
|
||||||
|
|
||||||
//Only do this on the first bounce
|
//Only do this on the first bounce if the convar is set
|
||||||
if (m_nBounces == 0)
|
if (flaregun_projectile_sticky.GetBool() && m_nBounces == 0)
|
||||||
{
|
{
|
||||||
const surfacedata_t *pdata = physprops->GetSurfaceData(tr.surface.surfaceProps);
|
const surfacedata_t *pdata = physprops->GetSurfaceData(tr.surface.surfaceProps);
|
||||||
|
|
||||||
|
48
sp/src/game/server/mod/weapon_pipe.cpp
Normal file
48
sp/src/game/server/mod/weapon_pipe.cpp
Normal 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 )
|
||||||
|
{
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user