doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Weapon.h
Go to the documentation of this file.
1 /*
2 ===========================================================================
3 
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
6 
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
8 
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13 
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
21 
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
23 
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25 
26 ===========================================================================
27 */
28 
29 #ifndef __GAME_WEAPON_H__
30 #define __GAME_WEAPON_H__
31 
32 /*
33 ===============================================================================
34 
35  Player Weapon
36 
37 ===============================================================================
38 */
39 
40 #ifdef _D3XP
41 extern const idEventDef EV_Weapon_State;
42 #endif
43 
44 typedef enum {
52 
53 typedef int ammo_t;
54 static const int AMMO_NUMTYPES = 16;
55 
56 class idPlayer;
57 
58 static const int LIGHTID_WORLD_MUZZLE_FLASH = 1;
59 static const int LIGHTID_VIEW_MUZZLE_FLASH = 100;
60 
61 class idMoveableItem;
62 
63 #ifdef _D3XP
64 typedef struct {
65  char name[64];
66  char particlename[128];
67  bool active;
68  int startTime;
69  jointHandle_t joint; //The joint on which to attach the particle
70  bool smoke; //Is this a smoke particle
71  const idDeclParticle* particle; //Used for smoke particles
72  idFuncEmitter* emitter; //Used for non-smoke particles
73 } WeaponParticle_t;
74 
75 typedef struct {
76  char name[64];
77  bool active;
78  int startTime;
79  jointHandle_t joint;
80  int lightHandle;
81  renderLight_t light;
82 } WeaponLight_t;
83 #endif
84 
85 class idWeapon : public idAnimatedEntity {
86 public:
88 
89  idWeapon();
90  virtual ~idWeapon();
91 
92  // Init
93  void Spawn( void );
94  void SetOwner( idPlayer *owner );
95  idPlayer* GetOwner( void );
96  virtual bool ShouldConstructScriptObjectAtSpawn( void ) const;
97 
98  static void CacheWeapon( const char *weaponName );
99 
100  // save games
101  void Save( idSaveGame *savefile ) const; // archives object for save game file
102  void Restore( idRestoreGame *savefile ); // unarchives object from save game file
103 
104  // Weapon definition management
105  void Clear( void );
106  void GetWeaponDef( const char *objectname, int ammoinclip );
107  bool IsLinked( void );
108  bool IsWorldModelReady( void );
109 
110  // GUIs
111  const char * Icon( void ) const;
112  void UpdateGUI( void );
113 
114  virtual void SetModel( const char *modelname );
115  bool GetGlobalJointTransform( bool viewModel, const jointHandle_t jointHandle, idVec3 &offset, idMat3 &axis );
116  void SetPushVelocity( const idVec3 &pushVelocity );
117  bool UpdateSkin( void );
118 
119  // State control/player interface
120  void Think( void );
121  void Raise( void );
122  void PutAway( void );
123  void Reload( void );
124  void LowerWeapon( void );
125  void RaiseWeapon( void );
126  void HideWeapon( void );
127  void ShowWeapon( void );
128  void HideWorldModel( void );
129  void ShowWorldModel( void );
130  void OwnerDied( void );
131  void BeginAttack( void );
132  void EndAttack( void );
133  bool IsReady( void ) const;
134  bool IsReloading( void ) const;
135  bool IsHolstered( void ) const;
136  bool ShowCrosshair( void ) const;
137  idEntity * DropItem( const idVec3 &velocity, int activateDelay, int removeDelay, bool died );
138  bool CanDrop( void ) const;
139  void WeaponStolen( void );
140 
141 #ifdef _D3XP
142  weaponStatus_t GetStatus() { return status; };
143 
144 #endif
145 
146  // Script state management
147  virtual idThread * ConstructScriptObject( void );
148  virtual void DeconstructScriptObject( void );
149  void SetState( const char *statename, int blendFrames );
150  void UpdateScript( void );
151  void EnterCinematic( void );
152  void ExitCinematic( void );
153  void NetCatchup( void );
154 
155  // Visual presentation
156  void PresentWeapon( bool showViewModel );
157  int GetZoomFov( void );
158  void GetWeaponAngleOffsets( int *average, float *scale, float *max );
159  void GetWeaponTimeOffsets( float *time, float *scale );
160  bool BloodSplat( float size );
161 
162  // Ammo
163  static ammo_t GetAmmoNumForName( const char *ammoname );
164  static const char *GetAmmoNameForNum( ammo_t ammonum );
165  static const char *GetAmmoPickupNameForNum( ammo_t ammonum );
166  ammo_t GetAmmoType( void ) const;
167  int AmmoAvailable( void ) const;
168  int AmmoInClip( void ) const;
169  void ResetAmmoClip( void );
170  int ClipSize( void ) const;
171  int LowAmmo( void ) const;
172  int AmmoRequired( void ) const;
173 #ifdef _D3XP
174  int AmmoCount() const;
175  int GetGrabberState() const;
176 #endif
177 
178  virtual void WriteToSnapshot( idBitMsgDelta &msg ) const;
179  virtual void ReadFromSnapshot( const idBitMsgDelta &msg );
180 
181  enum {
186  };
187  virtual bool ClientReceiveEvent( int event, int time, const idBitMsg &msg );
188 
189  virtual void ClientPredictionThink( void );
190 
191 private:
192  // script control
206  bool isLinked;
207 
208  // precreated projectile
210 
213 
214  // hiding (for GUIs and NPCs)
215  int hideTime;
218  float hideStart;
219  float hideEnd;
220  float hideOffset;
221  bool hide;
222  bool disabled;
223 
224  // berserk
225  int berserk;
226 
227  // these are the player render view parms, which include bobbing
230 
231  // the view weapon render entity parms
234 
235  // the muzzle bone's position, used for launching projectiles and trailing smoke
238 
240 
241  // weapon definition
242  // we maintain local copies of the projectile and brass dictionaries so they
243  // do not have to be copied across the DLL boundary when entities are spawned
252 
253  // view weapon gui light
256 
257  // muzzle flash
258  renderLight_t muzzleFlash; // positioned on view weapon bone
260 
261  renderLight_t worldMuzzleFlash; // positioned on world weapon bone
263 
267  bool lightOn;
269  bool allowDrop;
270 
271  // effects
273 
274  // weapon kick
280 
281  // ammo management
283  int ammoRequired; // amount of ammo to use each shot. 0 means weapon doesn't need ammo.
284  int clipSize; // 0 means no reload
285  int ammoClip;
286  int lowAmmo; // if ammo in clip hits this threshold, snd_
287  bool powerAmmo; // true if the clip reduction is a factor of the power setting when
288  // a projectile is launched
289  // mp client
290  bool isFiring;
291 
292  // zoom
293  int zoomFov; // variable zoom fov per weapon
294 
295  // joints from models
301 
305 
306 #ifdef _D3XP
307  jointHandle_t smokeJointView;
308 
309  idHashTable<WeaponParticle_t> weaponParticles;
310  idHashTable<WeaponLight_t> weaponLights;
311 #endif
312 
313  // sound
315 
316  // new style muzzle smokes
317  const idDeclParticle * weaponSmoke; // null if it doesn't smoke
318  int weaponSmokeStartTime; // set to gameLocal.time every weapon fire
319  bool continuousSmoke; // if smoke is continuous ( chainsaw )
320  const idDeclParticle * strikeSmoke; // striking something in melee
321  int strikeSmokeStartTime; // timing
322  idVec3 strikePos; // position of last melee strike
323  idMat3 strikeAxis; // axis of last melee strike
324  int nextStrikeFx; // used for sound and decal ( may use for strike smoke too )
325 
326  // nozzle effects
327  bool nozzleFx; // does this use nozzle effects ( parm5 at rest, parm6 firing )
328  // this also assumes a nozzle light atm
329  int nozzleFxFade; // time it takes to fade between the effects
330  int lastAttack; // last time an attack occured
331  renderLight_t nozzleGlow; // nozzle light
332  int nozzleGlowHandle; // handle for nozzle light
333 
334  idVec3 nozzleGlowColor; // color of the nozzle glow
335  const idMaterial * nozzleGlowShader; // shader for glow light
336  float nozzleGlowRadius; // radius of glow light
337 
338  // weighting for viewmodel angles
344 
345  // flashlight
346  void AlertMonsters( void );
347 
348  // Visual presentation
349  void InitWorldModel( const idDeclEntityDef *def );
350  void MuzzleFlashLight( void );
351  void MuzzleRise( idVec3 &origin, idMat3 &axis );
352  void UpdateNozzleFx( void );
353  void UpdateFlashPosition( void );
354 
355  // script events
356  void Event_Clear( void );
357  void Event_GetOwner( void );
358  void Event_WeaponState( const char *statename, int blendFrames );
359  void Event_SetWeaponStatus( float newStatus );
360  void Event_WeaponReady( void );
361  void Event_WeaponOutOfAmmo( void );
362  void Event_WeaponReloading( void );
363  void Event_WeaponHolstered( void );
364  void Event_WeaponRising( void );
365  void Event_WeaponLowering( void );
366  void Event_UseAmmo( int amount );
367  void Event_AddToClip( int amount );
368  void Event_AmmoInClip( void );
369  void Event_AmmoAvailable( void );
370  void Event_TotalAmmoCount( void );
371  void Event_ClipSize( void );
372  void Event_PlayAnim( int channel, const char *animname );
373  void Event_PlayCycle( int channel, const char *animname );
374  void Event_AnimDone( int channel, int blendFrames );
375  void Event_SetBlendFrames( int channel, int blendFrames );
376  void Event_GetBlendFrames( int channel );
377  void Event_Next( void );
378  void Event_SetSkin( const char *skinname );
379  void Event_Flashlight( int enable );
380  void Event_GetLightParm( int parmnum );
381  void Event_SetLightParm( int parmnum, float value );
382  void Event_SetLightParms( float parm0, float parm1, float parm2, float parm3 );
383  void Event_LaunchProjectiles( int num_projectiles, float spread, float fuseOffset, float launchPower, float dmgPower );
384  void Event_CreateProjectile( void );
385  void Event_EjectBrass( void );
386  void Event_Melee( void );
387  void Event_GetWorldModel( void );
388  void Event_AllowDrop( int allow );
389  void Event_AutoReload( void );
390  void Event_NetReload( void );
391  void Event_IsInvisible( void );
392  void Event_NetEndReload( void );
393 
394 #ifdef _D3XP
395  idGrabber grabber;
396  int grabberState;
397 
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 );
403 
404  void Event_StartWeaponSmoke();
405  void Event_StopWeaponSmoke();
406 
407  void Event_StartWeaponParticle( const char* name);
408  void Event_StopWeaponParticle( const char* name);
409 
410  void Event_StartWeaponLight( const char* name);
411  void Event_StopWeaponLight( const char* name);
412 #endif
413 };
414 
415 ID_INLINE bool idWeapon::IsLinked( void ) {
416  return isLinked;
417 }
418 
419 ID_INLINE bool idWeapon::IsWorldModelReady( void ) {
420  return ( worldModel.GetEntity() != NULL );
421 }
422 
423 ID_INLINE idPlayer* idWeapon::GetOwner( void ) {
424  return owner;
425 }
426 
427 #endif /* !__GAME_WEAPON_H__ */
jointHandle_t
Definition: Model.h:156
void Event_IsInvisible(void)
Definition: Weapon.cpp:3923
virtual ~idWeapon()
Definition: Weapon.cpp:187
idMat3 muzzleAxis
Definition: Weapon.h:237
bool disabled
Definition: Weapon.h:222
idVec3 pushVelocity
Definition: Weapon.h:239
int nozzleGlowHandle
Definition: Weapon.h:332
GLsizei const GLfloat * value
Definition: glext.h:3614
const idDeclEntityDef * weaponDef
Definition: Weapon.h:244
int berserk
Definition: Weapon.h:225
idVec3 strikePos
Definition: Weapon.h:322
jointHandle_t barrelJointWorld
Definition: Weapon.h:303
void SetOwner(idPlayer *owner)
Definition: Weapon.cpp:223
void Event_Flashlight(int enable)
Definition: Weapon.cpp:3158
void HideWeapon(void)
Definition: Weapon.cpp:1601
void Think(void)
Definition: Weapon.cpp:1519
void Event_UseAmmo(int amount)
Definition: Weapon.cpp:2888
void ExitCinematic(void)
Definition: Weapon.cpp:2380
void Event_GetLightParm(int parmnum)
Definition: Weapon.cpp:3173
void Event_PlayAnim(int channel, const char *animname)
Definition: Weapon.cpp:3028
bool BloodSplat(float size)
Definition: Weapon.cpp:1911
int nextStrikeFx
Definition: Weapon.h:324
float hideEnd
Definition: Weapon.h:219
int muzzleFlashHandle
Definition: Weapon.h:259
type * GetEntity(void) const
Definition: Game_local.h:695
int ammoClip
Definition: Weapon.h:285
void Event_LaunchProjectiles(int num_projectiles, float spread, float fuseOffset, float launchPower, float dmgPower)
Definition: Weapon.cpp:3274
void RaiseWeapon(void)
Definition: Weapon.cpp:1581
static void CacheWeapon(const char *weaponName)
Definition: Weapon.cpp:250
idScriptBool WEAPON_ATTACK
Definition: Weapon.h:193
float weaponAngleOffsetScale
Definition: Weapon.h:340
void Event_PlayCycle(int channel, const char *animname)
Definition: Weapon.cpp:3058
weaponStatus_t
Definition: Weapon.h:44
GLenum GLenum GLenum GLenum GLenum scale
Definition: glext.h:4804
void Event_EjectBrass(void)
Definition: Weapon.cpp:3882
void SetPushVelocity(const idVec3 &pushVelocity)
Definition: Weapon.cpp:1503
bool isFiring
Definition: Weapon.h:290
weaponStatus_t status
Definition: Weapon.h:200
idAngles muzzle_kick_angles
Definition: Weapon.h:278
void Event_NetReload(void)
Definition: Weapon.cpp:3004
jointHandle_t ejectJointWorld
Definition: Weapon.h:304
int LowAmmo(void) const
Definition: Weapon.cpp:2632
float hideOffset
Definition: Weapon.h:220
void InitWorldModel(const idDeclEntityDef *def)
Definition: Weapon.cpp:879
bool IsLinked(void)
Definition: Weapon.h:415
virtual void WriteToSnapshot(idBitMsgDelta &msg) const
Definition: Weapon.cpp:2680
virtual void DeconstructScriptObject(void)
Definition: Weapon.cpp:2039
int weaponAngleOffsetAverages
Definition: Weapon.h:339
bool UpdateSkin(void)
Definition: Weapon.cpp:1423
void Event_NetEndReload(void)
Definition: Weapon.cpp:3016
const idDeclParticle * smoke
Definition: Item.h:186
const idSoundShader * sndHum
Definition: Weapon.h:314
idMat3 strikeAxis
Definition: Weapon.h:323
void Event_WeaponState(const char *statename, int blendFrames)
Definition: Weapon.cpp:2787
void Event_AllowDrop(int allow)
Definition: Weapon.cpp:3867
bool silent_fire
Definition: Weapon.h:268
jointHandle_t flashJointWorld
Definition: Weapon.h:302
jointHandle_t barrelJointView
Definition: Weapon.h:296
bool hasBloodSplat
Definition: Weapon.h:272
idScriptBool WEAPON_RELOAD
Definition: Weapon.h:194
jointHandle_t ventLightJointView
Definition: Weapon.h:300
idStr state
Definition: Weapon.h:202
Definition: Vector.h:316
void Event_CreateProjectile(void)
Definition: Weapon.cpp:3254
float weaponOffsetTime
Definition: Weapon.h:342
void Event_SetLightParm(int parmnum, float value)
Definition: Weapon.cpp:3186
void Event_ClipSize(void)
Definition: Weapon.cpp:2981
idVec3 viewWeaponOrigin
Definition: Weapon.h:232
void EnterCinematic(void)
Definition: Weapon.cpp:2350
bool ShowCrosshair(void) const
Definition: Weapon.cpp:1745
jointHandle_t ejectJointView
Definition: Weapon.h:298
int animDoneTime
Definition: Weapon.h:205
static const char * GetAmmoPickupNameForNum(ammo_t ammonum)
Definition: Weapon.cpp:2552
idEntity * projectileEnt
Definition: Weapon.h:209
bool IsReloading(void) const
Definition: Weapon.cpp:1727
CLASS_PROTOTYPE(idWeapon)
GLintptr offset
Definition: glext.h:3113
idStr idealState
Definition: Weapon.h:203
int muzzle_kick_maxtime
Definition: Weapon.h:277
void GetWeaponTimeOffsets(float *time, float *scale)
Definition: Weapon.cpp:2428
virtual bool ClientReceiveEvent(int event, int time, const idBitMsg &msg)
Definition: Weapon.cpp:2724
const idDeclEntityDef * meleeDef
Definition: Weapon.h:245
renderLight_t guiLight
Definition: Weapon.h:254
virtual void ClientPredictionThink(void)
Definition: Weapon.cpp:3936
int kick_endtime
Definition: Weapon.h:275
idVec3 playerViewOrigin
Definition: Weapon.h:228
int animBlendFrames
Definition: Weapon.h:204
void SetState(const char *statename, int blendFrames)
Definition: Weapon.cpp:1819
void Event_Next(void)
Definition: Weapon.cpp:3117
const idMaterial * nozzleGlowShader
Definition: Weapon.h:335
bool IsWorldModelReady(void)
Definition: Weapon.h:419
int nozzleFxFade
Definition: Weapon.h:329
float meleeDistance
Definition: Weapon.h:247
bool hide
Definition: Weapon.h:221
static ammo_t GetAmmoNumForName(const char *ammoname)
Definition: Weapon.cpp:2445
int muzzleFlashEnd
Definition: Weapon.h:265
idStr icon
Definition: Weapon.h:251
idWeapon()
Definition: Weapon.cpp:150
void AlertMonsters(void)
Definition: Weapon.cpp:2104
int guiLightHandle
Definition: Weapon.h:255
bool continuousSmoke
Definition: Weapon.h:319
idScriptBool WEAPON_RAISEWEAPON
Definition: Weapon.h:198
renderLight_t worldMuzzleFlash
Definition: Weapon.h:261
void Event_Melee(void)
Definition: Weapon.cpp:3722
void Event_SetWeaponStatus(float newStatus)
void Spawn(void)
Definition: Weapon.cpp:198
int flashTime
Definition: Weapon.h:266
idVec3 muzzle_kick_offset
Definition: Weapon.h:279
int muzzle_kick_time
Definition: Weapon.h:276
void Raise(void)
Definition: Weapon.cpp:1528
void UpdateNozzleFx(void)
Definition: Weapon.cpp:1855
idMat3 viewWeaponAxis
Definition: Weapon.h:233
int GetZoomFov(void)
Definition: Weapon.cpp:2408
renderLight_t muzzleFlash
Definition: Weapon.h:258
Definition: Dict.h:65
void ResetAmmoClip(void)
Definition: Weapon.cpp:2605
#define NULL
Definition: Lib.h:88
ammo_t GetAmmoType(void) const
Definition: Weapon.cpp:2614
int AmmoAvailable(void) const
Definition: Weapon.cpp:2583
const idDeclParticle * weaponSmoke
Definition: Weapon.h:317
bool IsReady(void) const
Definition: Weapon.cpp:1718
float hideStart
Definition: Weapon.h:218
void ShowWeapon(void)
Definition: Weapon.cpp:1614
idDict brassDict
Definition: Weapon.h:249
int lastAttack
Definition: Weapon.h:330
float weaponAngleOffsetMax
Definition: Weapon.h:341
const idEventDef EV_Weapon_State("weaponState","sd")
int ammo_t
Definition: Weapon.h:53
void Event_WeaponRising(void)
Definition: Weapon.cpp:2862
void Reload(void)
Definition: Weapon.cpp:1552
int ammoRequired
Definition: Weapon.h:283
void Event_WeaponReloading(void)
Definition: Weapon.cpp:2841
void Restore(idRestoreGame *savefile)
Definition: Weapon.cpp:444
idEntityPtr< idAnimatedEntity > worldModel
Definition: Weapon.h:212
int hideTime
Definition: Weapon.h:215
void OwnerDied(void)
Definition: Weapon.cpp:1651
void NetCatchup(void)
Definition: Weapon.cpp:2396
idDict projectileDict
Definition: Weapon.h:246
bool GetGlobalJointTransform(bool viewModel, const jointHandle_t jointHandle, idVec3 &offset, idMat3 &axis)
Definition: Weapon.cpp:1477
virtual idThread * ConstructScriptObject(void)
Definition: Weapon.cpp:2011
void Event_GetWorldModel(void)
Definition: Weapon.cpp:3858
void Clear(void)
Definition: Weapon.cpp:677
int strikeSmokeStartTime
Definition: Weapon.h:321
void MuzzleFlashLight(void)
Definition: Weapon.cpp:1387
void Event_GetBlendFrames(int channel)
Definition: Weapon.cpp:3108
void GetWeaponDef(const char *objectname, int ammoinclip)
Definition: Weapon.cpp:925
idEntity * DropItem(const idVec3 &velocity, int activateDelay, int removeDelay, bool died)
Definition: Weapon.cpp:1791
const idDeclParticle * strikeSmoke
Definition: Weapon.h:320
const char * Icon(void) const
Definition: Weapon.cpp:1285
void UpdateGUI(void)
Definition: Weapon.cpp:1294
idPlayer * owner
Definition: Weapon.h:211
void UpdateFlashPosition(void)
Definition: Weapon.cpp:1366
void Event_WeaponReady(void)
Definition: Weapon.cpp:2813
Definition: Matrix.h:333
idVec3 flashColor
Definition: Weapon.h:264
void Event_GetOwner(void)
Definition: Weapon.cpp:2778
bool CanDrop(void) const
Definition: Weapon.cpp:1754
void Event_TotalAmmoCount(void)
Definition: Weapon.cpp:2971
int hideStartTime
Definition: Weapon.h:217
void GetWeaponAngleOffsets(int *average, float *scale, float *max)
Definition: Weapon.cpp:2417
float weaponOffsetScale
Definition: Weapon.h:343
idThread * thread
Definition: Weapon.h:201
float hideDistance
Definition: Weapon.h:216
void Event_WeaponOutOfAmmo(void)
Definition: Weapon.cpp:2829
const GLcharARB * name
Definition: glext.h:3629
idVec3 nozzleGlowColor
Definition: Weapon.h:334
GLsizeiptr size
Definition: glext.h:3112
void Event_SetLightParms(float parm0, float parm1, float parm2, float parm3)
Definition: Weapon.cpp:3201
Definition: Str.h:116
virtual void ReadFromSnapshot(const idBitMsgDelta &msg)
Definition: Weapon.cpp:2692
bool lightOn
Definition: Weapon.h:267
int worldMuzzleFlashHandle
Definition: Weapon.h:262
void EndAttack(void)
Definition: Weapon.cpp:1701
int clipSize
Definition: Weapon.h:284
ammo_t ammoType
Definition: Weapon.h:282
idScriptBool WEAPON_NETENDRELOAD
Definition: Weapon.h:196
void Event_AddToClip(int amount)
Definition: Weapon.cpp:2907
void BeginAttack(void)
Definition: Weapon.cpp:1679
void Event_SetSkin(const char *skinname)
Definition: Weapon.cpp:3127
int AmmoInClip(void) const
Definition: Weapon.cpp:2596
static const char * GetAmmoNameForNum(ammo_t ammonum)
Definition: Weapon.cpp:2498
int lowAmmo
Definition: Weapon.h:286
bool allowDrop
Definition: Weapon.h:269
renderLight_t nozzleGlow
Definition: Weapon.h:331
void Event_AmmoInClip(void)
Definition: Weapon.cpp:2945
void Event_SetBlendFrames(int channel, int blendFrames)
Definition: Weapon.cpp:3099
float nozzleGlowRadius
Definition: Weapon.h:336
idStr meleeDefName
Definition: Weapon.h:248
int weaponSmokeStartTime
Definition: Weapon.h:318
void Event_AutoReload(void)
Definition: Weapon.cpp:2990
int ClipSize(void) const
Definition: Weapon.cpp:2623
void PresentWeapon(bool showViewModel)
Definition: Weapon.cpp:2150
void WeaponStolen(void)
Definition: Weapon.cpp:1770
int AmmoRequired(void) const
Definition: Weapon.cpp:2641
idPlayer * GetOwner(void)
Definition: Weapon.h:423
void MuzzleRise(idVec3 &origin, idMat3 &axis)
Definition: Weapon.cpp:1976
bool isLinked
Definition: Weapon.h:206
void PutAway(void)
Definition: Weapon.cpp:1539
idScriptBool WEAPON_LOWERWEAPON
Definition: Weapon.h:199
#define max(x, y)
Definition: os.h:70
jointHandle_t guiLightJointView
Definition: Weapon.h:299
void HideWorldModel(void)
Definition: Weapon.cpp:1629
bool nozzleFx
Definition: Weapon.h:327
idVec3 muzzleOrigin
Definition: Weapon.h:236
void Save(idSaveGame *savefile) const
Definition: Weapon.cpp:287
int zoomFov
Definition: Weapon.h:293
void Event_Clear(void)
Definition: Weapon.cpp:2769
void Event_WeaponHolstered(void)
Definition: Weapon.cpp:2850
idScriptBool WEAPON_NETRELOAD
Definition: Weapon.h:195
void Event_WeaponLowering(void)
Definition: Weapon.cpp:2875
jointHandle_t flashJointView
Definition: Weapon.h:297
int brassDelay
Definition: Weapon.h:250
void Event_AmmoAvailable(void)
Definition: Weapon.cpp:2955
virtual bool ShouldConstructScriptObjectAtSpawn(void) const
Definition: Weapon.cpp:241
void ShowWorldModel(void)
Definition: Weapon.cpp:1640
void UpdateScript(void)
Definition: Weapon.cpp:2071
void Event_AnimDone(int channel, int blendFrames)
Definition: Weapon.cpp:3086
bool IsHolstered(void) const
Definition: Weapon.cpp:1736
void LowerWeapon(void)
Definition: Weapon.cpp:1563
virtual void SetModel(const char *modelname)
Definition: Weapon.cpp:1448
idScriptBool WEAPON_NETFIRING
Definition: Weapon.h:197
bool powerAmmo
Definition: Weapon.h:287
idMat3 playerViewAxis
Definition: Weapon.h:229