Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
weapon.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 namespace ai {
4 struct avoidset;
5 } // namespace ai
6 struct dynent;
7 struct fpsent;
8 struct physent;
9 struct vec;
10 
11 namespace game {
12 
13 extern void shoot(fpsent *d, const vec &targ);
14 extern void shoteffects(int gun, const vec &from, const vec &to, fpsent *d, bool local, int id, int prevaction);
15 extern void explode(bool local, fpsent *owner, const vec &v, dynent *safe, int dam, int gun);
16 extern void explodeeffects(int gun, fpsent *d, bool local, int id = 0);
17 extern void damageeffect(int damage, fpsent *d, bool thirdperson = true);
18 extern void gibeffect(int damage, const vec &vel, fpsent *d);
19 extern float intersectdist;
20 extern bool intersect(dynent *d, const vec &from, const vec &to, float &dist = intersectdist);
21 extern dynent *intersectclosest(const vec &from, const vec &to, fpsent *at, float &dist = intersectdist);
22 
23 extern int getweapon(const char *name);
24 extern void removeweapons(fpsent *owner);
25 extern void updateweapons(int curtime);
26 extern void gunselect(int gun, fpsent *d);
27 extern void weaponswitch(fpsent *d);
28 extern void avoidweapons(ai::avoidset &obstacles, float radius);
29 
30 
31 extern void bounced(physent *d, const vec &surface);
32 extern bool weaponcollide(physent *d, const vec &dir);
33 extern void adddynlights();
34 extern void particletrack(physent *owner, vec &o, vec &d);
35 extern void dynlighttrack(physent *owner, vec &o, vec &hud);
36 
37 }
bool weaponcollide(physent *d, const vec &dir)
Definition: weapon.cpp:1202
void dynlighttrack(physent *owner, vec &o, vec &hud)
Definition: weapon.cpp:858
avoidset obstacles
Definition: ai.cpp:46
dynent * intersectclosest(const vec &from, const vec &to, fpsent *at, float &bestdist)
Definition: weapon.cpp:877
void bounced(physent *d, const vec &surface)
Definition: weapon.cpp:246
void gibeffect(int damage, const vec &vel, fpsent *d)
Definition: weapon.cpp:415
int getweapon(const char *name)
Definition: weapon.cpp:90
bool intersect(dynent *d, const vec &from, const vec &to, float &dist)
Definition: weapon.cpp:869
Definition: ai.hpp:66
Definition: ents.hpp:128
void removeweapons(fpsent *d)
Definition: weapon.cpp:1181
void shoteffects(int gun, const vec &from, const vec &to, fpsent *d, bool local, int id, int prevaction)
Definition: weapon.cpp:741
void at(tagval *args, int numargs)
Definition: command.cpp:2678
SharedVar< int > thirdperson
vector with 3 floats and some useful methods.
Definition: geom.hpp:110
void damageeffect(int damage, fpsent *d, bool thirdperson)
Definition: weapon.cpp:394
int curtime
Definition: legacy_time.cpp:14
int d
Definition: octaedit.cpp:1749
void explode(bool local, fpsent *owner, const vec &v, dynent *safe, int damage, int gun)
Definition: weapon.cpp:503
Definition: ents.hpp:258
#define dir(name, v, d, s, os)
Definition: physics.cpp:2014
void shoot(fpsent *d, const vec &targ)
Definition: weapon.cpp:938
void updateweapons(int curtime)
Definition: weapon.cpp:1187
float intersectdist
Definition: weapon.cpp:867
Definition: fpsent.hpp:12
void gunselect(int gun, fpsent *d)
Definition: weapon.cpp:65
void weaponswitch(fpsent *d)
Definition: weapon.cpp:132
void adddynlights()
Definition: weapon.cpp:1001
void avoidweapons(ai::avoidset &obstacles, float radius)
Definition: weapon.cpp:1219
void particletrack(physent *owner, vec &o, vec &d)
Definition: weapon.cpp:842
void explodeeffects(int gun, fpsent *d, bool local, int id)
Definition: weapon.cpp:590