// Copyright (c) 1999, Valve LLC. All rights reserved. // // This product contains software technology licensed from Id // Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. // All Rights Reserved. // // Use, distribution, and modification of this source code and/or resulting // object code is restricted to non-commercial enhancements to products from // Valve LLC. All other use, distribution, or modification is prohibited // without written permission from Valve LLC. // // $Workfile: weapons.h $ // $Date: 2002/10/24 21:18:58 $ // //------------------------------------------------------------------------------- // $Log: weapons.h,v $ // Revision 1.17 2002/10/24 21:18:58 Flayra // - Made virtual so child weapons could customize reload // // Revision 1.16 2002/10/16 00:41:15 Flayra // - Removed unneeds sounds and events // - Added distress beacon event // - Added general purpose particle event // // Revision 1.15 2002/08/31 18:01:18 Flayra // - Work at VALVe // // Revision 1.14 2002/08/09 00:17:35 Flayra // - Added PRIMARY_WEAPON flag (allow marines to hold only one) // // Revision 1.13 2002/07/08 16:36:35 Flayra // - Added 0-degree constant, added document header // //=============================================================================== #ifndef WEAPONS_H #define WEAPONS_H #include "extdll.h" #include "util.h" #include "cbase.h" #include "player.h" #include "effects.h" //#include "dlls/weapons.h" class CBasePlayer; void DeactivateSatchels( CBasePlayer *pOwner ); // Contact Grenade / Timed grenade / Satchel Charge class CGrenade : public CBaseMonster { public: void Spawn( void ); typedef enum { SATCHEL_DETONATE = 0, SATCHEL_RELEASE } SATCHELCODE; static CGrenade *ShootExplosiveTimed( entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time, int inDamageType ); static CGrenade *ShootTimed( entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time); static CGrenade *ShootContact( entvars_t *pevOwner, Vector vecStart, Vector vecVelocity ); static CGrenade *ShootSatchelCharge( entvars_t *pevOwner, Vector vecStart, Vector vecVelocity ); static void UseSatchelCharges( entvars_t *pevOwner, SATCHELCODE code ); void Explode( Vector vecSrc, Vector vecAim ); void Explode( TraceResult *pTrace, int bitsDamageType ); void EXPORT Smoke( void ); void EXPORT BounceTouch( CBaseEntity *pOther ); void EXPORT SlideTouch( CBaseEntity *pOther ); void EXPORT ExplosiveBounceTouch( CBaseEntity *pOther ); void EXPORT ExplodeTouch( CBaseEntity *pOther ); void EXPORT DangerSoundThink( void ); void EXPORT PreDetonate( void ); void EXPORT Detonate( void ); void EXPORT DetonateUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ); void EXPORT TumbleThink( void ); virtual void BounceSound( void ); virtual int BloodColor( void ) { return DONT_BLEED; } virtual void Killed( entvars_t *pevAttacker, int iGib ); virtual void SetDamageType(int inDamageType); BOOL m_fRegisteredSound;// whether or not this grenade has issued its DANGER sound to the world sound list yet. private: int m_damageType; }; // constant items #define ITEM_HEALTHKIT 1 #define ITEM_ANTIDOTE 2 #define ITEM_SECURITY 3 #define ITEM_BATTERY 4 #define WEAPON_NONE 0 #define WEAPON_CROWBAR 1 #define WEAPON_GLOCK 2 #define WEAPON_PYTHON 3 #define WEAPON_MP5 4 #define WEAPON_CHAINGUN 5 #define WEAPON_CROSSBOW 6 #define WEAPON_SHOTGUN 7 #define WEAPON_RPG 8 #define WEAPON_GAUSS 9 #define WEAPON_EGON 10 #define WEAPON_HORNETGUN 11 #define WEAPON_HANDGRENADE 12 #define WEAPON_TRIPMINE 13 #define WEAPON_SATCHEL 14 #define WEAPON_SNARK 15 #define WEAPON_ALLWEAPONS (~(1<absmin = pev->origin + Vector(-16, -16, -5); // pev->absmax = pev->origin + Vector(16, 16, 28); // } // // void PrimaryAttack( void ); // BOOL Deploy( void ); // void Holster( int skiplocal = 0 ); // void WeaponIdle( void ); // // virtual BOOL UseDecrement( void ) // { // return TRUE; // } // //private: // unsigned short m_usTripFire; // //}; class CSqueak : public CBasePlayerWeapon { public: void Spawn( void ); void Precache( void ); int iItemSlot( void ) { return 5; } int GetItemInfo(ItemInfo *p); void PrimaryAttack( void ); void SecondaryAttack( void ); BOOL Deploy( void ); void Holster( int skiplocal = 0 ); void WeaponIdle( void ); int m_fJustThrown; virtual BOOL UseDecrement( void ) { return TRUE; } private: unsigned short m_usSnarkFire; }; #endif // WEAPONS_H