/*** * * Copyright (c) 1999, Cold Ice Modification. * * This code has been written by SlimShady ( darcuri@optonline.net ) * * 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 and from the Cold Ice team. * * Please if you use this code in any public form, please give us credit. * ****/ #ifndef WEAPONS_H #define WEAPONS_H #include "effects.h" class CBasePlayer; extern int gmsgWeapPickup; //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 *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 ); static CGrenade *ShootTimed( entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time ); static CGrenade *ShootClusterGrenade( entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time ); static CGrenade *ShootCluster( entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time ); void Explode( Vector vecSrc, Vector vecAim ); void Explode( TraceResult *pTrace, int bitsDamageType ); void EXPORT Smoke( void ); void EXPORT ClusterTumbleThink( void ); void EXPORT ClusterLaunch( void ); void EXPORT ClusterDetonate( void ); entvars_t *clusterOwner; void EXPORT BounceTouch( CBaseEntity *pOther ); void EXPORT SlideTouch( 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 ); BOOL m_fRegisteredSound;// whether or not this grenade has issued its DANGER sound to the world sound list yet. }; // constant items #define ITEM_HEALTHKIT 1 #define ITEM_BATTERY 2 #define WEAPON_NONE 0 #define WEAPON_CROWBAR 1 #define WEAPON_KNIFE 2 #define WEAPON_SWORD 3 #define WEAPON_PPK 4 #define WEAPON_MAG60 5 #define WEAPON_M16 6 #define WEAPON_UZI 7 #define WEAPON_MAC10 8 #define WEAPON_DOUBLEUZI 9 #define WEAPON_ASHOTGUN 10 #define WEAPON_SSHOTGUN 11 #define WEAPON_CHAINGUN 12 #define WEAPON_RIFLE 13 #define WEAPON_BOLTGUN 14 #define WEAPON_GRENADEL 15 #define WEAPON_CLUSTERGRENADE 16 #define WEAPON_RAILGUN 17 #define WEAPON_PULSERIFLE 18 #define WEAPON_CHUMTOAD 19 #define WEAPON_ROCKETL 20 #define WEAPON_TNT 21 #define WEAPON_TRIPMINE 22 #define WEAPON_NUKE 23 //TODO: maybe incorrect. Needs redefine later. #define WEAPON_FASTRPG 24 #define WEAPON_DOUBLEMAC 25 #define WEAPON_NAILGUN 26 #define WEAPON_SATCHEL 27 #define WEAPON_HANDGRENADE 28 #define WEAPON_HKG36 29 #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 ) { #if defined( CLIENT_WEAPONS ) return TRUE; #else return FALSE; #endif } 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 ) { #if defined( CLIENT_WEAPONS ) return TRUE; #else return FALSE; #endif } private: unsigned short m_usSnarkFire; };*/ #endif // WEAPONS_H