Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.7 KiB

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//
#include "cbase.h"
#include "weapon_dodbasegrenade.h"
#ifdef CLIENT_DLL
#define CWeaponRifleGrenadeUS_Live C_WeaponRifleGrenadeUS_Live
#else
#include "dod_riflegrenade_us.h" //the thing that we throw
#endif
class CWeaponRifleGrenadeUS_Live : public CWeaponDODBaseGrenade
{
public:
DECLARE_CLASS( CWeaponRifleGrenadeUS_Live, CWeaponDODBaseGrenade );
DECLARE_NETWORKCLASS();
DECLARE_PREDICTABLE();
CWeaponRifleGrenadeUS_Live() {}
virtual DODWeaponID GetWeaponID( void ) const { return WEAPON_RIFLEGREN_US_LIVE; }
#ifndef CLIENT_DLL
virtual void EmitGrenade( Vector vecSrc, QAngle vecAngles, Vector vecVel, AngularImpulse angImpulse, CBasePlayer *pPlayer, float flLifeTime = GRENADE_FUSE_LENGTH )
{
// align the grenade vertically and spin end over end
QAngle vecNewAngles = QAngle(45,pPlayer->EyeAngles().y,0);
AngularImpulse angNewImpulse = AngularImpulse( 0, 600, 0 );
CDODRifleGrenadeUS::Create( vecSrc, vecNewAngles, vecVel, angNewImpulse, pPlayer, flLifeTime, GetWeaponID() );
}
#endif
virtual bool IsArmed( void ) { return true; }
private:
CWeaponRifleGrenadeUS_Live( const CWeaponRifleGrenadeUS_Live & );
};
IMPLEMENT_NETWORKCLASS_ALIASED( WeaponRifleGrenadeUS_Live, DT_WeaponRifleGrenadeUS_Live )
BEGIN_NETWORK_TABLE(CWeaponRifleGrenadeUS_Live, DT_WeaponRifleGrenadeUS_Live)
END_NETWORK_TABLE()
BEGIN_PREDICTION_DATA( CWeaponRifleGrenadeUS_Live )
END_PREDICTION_DATA()
LINK_ENTITY_TO_CLASS( weapon_riflegren_us_live, CWeaponRifleGrenadeUS_Live );
PRECACHE_WEAPON_REGISTER( weapon_riflegren_us_live );