Xonotic
porto.qh
Go to the documentation of this file.
1 #pragma once
2 
4 /* spawnfunc */ ATTRIB(PortoLaunch, m_canonical_spawnfunc, string, "weapon_porto");
5 /* ammotype */ ATTRIB(PortoLaunch, ammo_type, Resource, RES_NONE);
6 /* impulse */ ATTRIB(PortoLaunch, impulse, int, 0);
8 /* rating */ ATTRIB(PortoLaunch, bot_pickupbasevalue, float, 0);
9 /* color */ ATTRIB(PortoLaunch, wpcolor, vector, '0.5 0.5 0.5');
10 /* modelname */ ATTRIB(PortoLaunch, mdl, string, "porto");
11 #ifdef GAMEQC
12 /* model */ ATTRIB(PortoLaunch, m_model, Model, MDL_PORTO_ITEM);
13 #endif
14 /* crosshair */ ATTRIB(PortoLaunch, w_crosshair, string, "gfx/crosshairporto");
15 /* crosshair */ ATTRIB(PortoLaunch, w_crosshair_size, float, 0.6);
16 /* wepimg */ ATTRIB(PortoLaunch, model2, string, "weaponporto");
17 /* refname */ ATTRIB(PortoLaunch, netname, string, "porto");
18 /* wepname */ ATTRIB(PortoLaunch, m_name, string, _("Port-O-Launch"));
19 
20 #define X(BEGIN, P, END, class, prefix) \
21  BEGIN(class) \
22  P(class, prefix, animtime, float, BOTH) \
23  P(class, prefix, lifetime, float, BOTH) \
24  P(class, prefix, refire, float, BOTH) \
25  P(class, prefix, secondary, float, NONE) \
26  P(class, prefix, speed, float, BOTH) \
27  P(class, prefix, switchdelay_drop, float, NONE) \
28  P(class, prefix, switchdelay_raise, float, NONE) \
29  P(class, prefix, weaponreplace, string,NONE) \
30  P(class, prefix, weaponstartoverride, float, NONE) \
31  P(class, prefix, weaponstart, float, NONE) \
32  P(class, prefix, weaponthrowable, float, NONE) \
33  END()
34  W_PROPS(X, PortoLaunch, porto)
35 #undef X
36 ENDCLASS(PortoLaunch)
37 REGISTER_WEAPON(PORTO, porto, NEW(PortoLaunch));
38 
39 SPAWNFUNC_WEAPON(weapon_porto, WEP_PORTO)
40 
41 #ifdef CSQC
42 void Porto_Draw(entity this);
43 #endif
44 
45 #ifdef SVQC
46 .entity porto_current;
47 .vector porto_v_angle; // holds "held" view angles
48 .float porto_v_angle_held;
49 .vector right_vector;
50 .float porto_forbidden;
51 
52 void W_Porto_Fail(entity this, float failhard);
53 void W_Porto_Remove (entity p);
54 #endif
const int WEP_FLAG_NODUAL
Definition: weapon.qh:207
#define NEW(cname,...)
Definition: oo.qh:105
CLASS(Object) Object
Definition: oo.qh:318
entity() spawn
string netname
Definition: powerups.qc:20
float bot_pickupbasevalue
Definition: bot.qh:66
float impulse
Definition: progsdefs.qc:158
float spawnflags
Definition: progsdefs.qc:191
#define ATTRIB(...)
Definition: oo.qh:136
#define X(BEGIN, P, END, class, prefix)
Definition: porto.qh:20
REGISTER_WEAPON(PORTO, porto, NEW(PortoLaunch))
Definition: model.qh:3
const int WEP_TYPE_OTHER
Definition: weapon.qh:195
vector(float skel, float bonenum) _skel_get_boneabs_hidden
#define SPAWNFUNC_WEAPON(name, weapon)
Definition: weapon.qh:143
#define ENDCLASS(cname)
Definition: oo.qh:269
const int WEP_FLAG_NOTRUEAIM
Definition: weapon.qh:210
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition: weapon.qh:41
vector right_vector
Definition: portals.qc:110
#define W_PROPS(L, class, prefix)
Definition: all.qh:163
const int WEP_FLAG_SUPERWEAPON
Definition: weapon.qh:202
string m_name
Definition: scores.qh:135