29 #ifndef __GAME_WEAPON_H__
30 #define __GAME_WEAPON_H__
54 static const int AMMO_NUMTYPES = 16;
58 static const int LIGHTID_WORLD_MUZZLE_FLASH = 1;
59 static const int LIGHTID_VIEW_MUZZLE_FLASH = 100;
66 char particlename[128];
106 void GetWeaponDef(
const char *objectname,
int ammoinclip );
111 const char *
Icon(
void )
const;
114 virtual void SetModel(
const char *modelname );
149 void SetState(
const char *statename,
int blendFrames );
174 int AmmoCount()
const;
175 int GetGrabberState()
const;
383 void Event_LaunchProjectiles(
int num_projectiles,
float spread,
float fuseOffset,
float launchPower,
float dmgPower );
398 void Event_Grabber(
int enable );
399 void Event_GrabberHasTarget(
void );
400 void Event_GrabberSetGrabDistance(
float dist );
401 void Event_LaunchProjectilesEllipse(
int num_projectiles,
float spreada,
float spreadb,
float fuseOffset,
float power );
402 void Event_LaunchPowerup(
const char* powerup,
float duration,
int useAmmo );
404 void Event_StartWeaponSmoke();
405 void Event_StopWeaponSmoke();
407 void Event_StartWeaponParticle(
const char*
name);
408 void Event_StopWeaponParticle(
const char*
name);
410 void Event_StartWeaponLight(
const char*
name);
411 void Event_StopWeaponLight(
const char*
name);
void Event_IsInvisible(void)
GLsizei const GLfloat * value
const idDeclEntityDef * weaponDef
jointHandle_t barrelJointWorld
void SetOwner(idPlayer *owner)
void Event_Flashlight(int enable)
void Event_UseAmmo(int amount)
void Event_GetLightParm(int parmnum)
void Event_PlayAnim(int channel, const char *animname)
bool BloodSplat(float size)
type * GetEntity(void) const
void Event_LaunchProjectiles(int num_projectiles, float spread, float fuseOffset, float launchPower, float dmgPower)
static void CacheWeapon(const char *weaponName)
idScriptBool WEAPON_ATTACK
float weaponAngleOffsetScale
void Event_PlayCycle(int channel, const char *animname)
GLenum GLenum GLenum GLenum GLenum scale
void Event_EjectBrass(void)
void SetPushVelocity(const idVec3 &pushVelocity)
idAngles muzzle_kick_angles
void Event_NetReload(void)
jointHandle_t ejectJointWorld
void InitWorldModel(const idDeclEntityDef *def)
virtual void WriteToSnapshot(idBitMsgDelta &msg) const
virtual void DeconstructScriptObject(void)
int weaponAngleOffsetAverages
void Event_NetEndReload(void)
const idDeclParticle * smoke
const idSoundShader * sndHum
void Event_WeaponState(const char *statename, int blendFrames)
void Event_AllowDrop(int allow)
jointHandle_t flashJointWorld
jointHandle_t barrelJointView
idScriptBool WEAPON_RELOAD
jointHandle_t ventLightJointView
void Event_CreateProjectile(void)
void Event_SetLightParm(int parmnum, float value)
void Event_ClipSize(void)
void EnterCinematic(void)
bool ShowCrosshair(void) const
jointHandle_t ejectJointView
static const char * GetAmmoPickupNameForNum(ammo_t ammonum)
bool IsReloading(void) const
CLASS_PROTOTYPE(idWeapon)
void GetWeaponTimeOffsets(float *time, float *scale)
virtual bool ClientReceiveEvent(int event, int time, const idBitMsg &msg)
const idDeclEntityDef * meleeDef
virtual void ClientPredictionThink(void)
void SetState(const char *statename, int blendFrames)
const idMaterial * nozzleGlowShader
bool IsWorldModelReady(void)
static ammo_t GetAmmoNumForName(const char *ammoname)
idScriptBool WEAPON_RAISEWEAPON
renderLight_t worldMuzzleFlash
void Event_SetWeaponStatus(float newStatus)
idVec3 muzzle_kick_offset
void UpdateNozzleFx(void)
renderLight_t muzzleFlash
ammo_t GetAmmoType(void) const
int AmmoAvailable(void) const
const idDeclParticle * weaponSmoke
float weaponAngleOffsetMax
const idEventDef EV_Weapon_State("weaponState","sd")
void Event_WeaponRising(void)
void Event_WeaponReloading(void)
void Restore(idRestoreGame *savefile)
idEntityPtr< idAnimatedEntity > worldModel
bool GetGlobalJointTransform(bool viewModel, const jointHandle_t jointHandle, idVec3 &offset, idMat3 &axis)
virtual idThread * ConstructScriptObject(void)
void Event_GetWorldModel(void)
void MuzzleFlashLight(void)
void Event_GetBlendFrames(int channel)
void GetWeaponDef(const char *objectname, int ammoinclip)
idEntity * DropItem(const idVec3 &velocity, int activateDelay, int removeDelay, bool died)
const idDeclParticle * strikeSmoke
const char * Icon(void) const
void UpdateFlashPosition(void)
void Event_WeaponReady(void)
void Event_GetOwner(void)
void Event_TotalAmmoCount(void)
void GetWeaponAngleOffsets(int *average, float *scale, float *max)
void Event_WeaponOutOfAmmo(void)
void Event_SetLightParms(float parm0, float parm1, float parm2, float parm3)
virtual void ReadFromSnapshot(const idBitMsgDelta &msg)
int worldMuzzleFlashHandle
idScriptBool WEAPON_NETENDRELOAD
void Event_AddToClip(int amount)
void Event_SetSkin(const char *skinname)
int AmmoInClip(void) const
static const char * GetAmmoNameForNum(ammo_t ammonum)
void Event_AmmoInClip(void)
void Event_SetBlendFrames(int channel, int blendFrames)
void Event_AutoReload(void)
void PresentWeapon(bool showViewModel)
int AmmoRequired(void) const
idPlayer * GetOwner(void)
void MuzzleRise(idVec3 &origin, idMat3 &axis)
idScriptBool WEAPON_LOWERWEAPON
jointHandle_t guiLightJointView
void HideWorldModel(void)
void Save(idSaveGame *savefile) const
void Event_WeaponHolstered(void)
idScriptBool WEAPON_NETRELOAD
void Event_WeaponLowering(void)
jointHandle_t flashJointView
void Event_AmmoAvailable(void)
virtual bool ShouldConstructScriptObjectAtSpawn(void) const
void ShowWorldModel(void)
void Event_AnimDone(int channel, int blendFrames)
bool IsHolstered(void) const
virtual void SetModel(const char *modelname)
idScriptBool WEAPON_NETFIRING