6 int valid = (l.itemkeys & p.itemkeys);
24 int valid = l.itemkeys & p.itemkeys;
29 }
else if (l.itemkeys == valid) {
40 string item_keys_keylist(
float keylist) {
46 if ((keylist & (keylist-1)) == 0)
54 n =
strcat(n,
", the ", item_keys_names[base + l]);
56 n =
strcat(
"the ", item_keys_names[base + l]);
58 keylist = bitshift(keylist, -(l + 1));
85 play2(toucher, this.
noise);
98 void spawn_item_key(
entity this)
100 precache_model(this.
model);
112 this.mdl = this.
model;
114 _setmodel(
this, this.
model);
117 setsize(
this,
'-16 -16 -56',
'16 16 0');
129 settouch(
this, item_key_touch);
166 objerror(
this,
"item_key.itemkeys must contain only 1 bit set specifying the key it represents!");
174 _netname =
"GOLD key";
175 _colormod =
'1 .9 0';
179 _netname =
"SILVER key";
180 _colormod =
'.9 .9 .9';
184 _netname =
"BRONZE key";
185 _colormod =
'.6 .25 0';
189 _netname =
"RED keycard";
190 _colormod =
'.9 0 0';
194 _netname =
"BLUE keycard";
195 _colormod =
'0 0 .9';
199 _netname =
"GREEN keycard";
200 _colormod =
'0 .9 0';
204 _netname =
"FLUFFY PINK keycard";
208 objerror(
this,
"item_key doesn't have a default name for this key and a custom one was not specified!");
219 _model =
"models/keys/key.md3";
221 _model =
"models/keys/key.md3";
222 }
else if (this.
model ==
"") {
223 objerror(
this,
"item_key doesn't have a default model for this key and a custom one was not specified!");
237 if (this.
model ==
"")
244 if (this.
noise ==
"")
251 spawn_item_key(
this);
269 spawnfunc_item_key(
this);
287 spawnfunc_item_key(
this);
#define ITEM_KEY_BIT(n)
Returns the bit ID of a key.
void SUB_UseTargets(entity this, entity actor, entity trigger)
ERASEABLE int lowestbit(int f)
spawnfunc(info_player_attacker)
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
vector(float skel, float bonenum) _skel_get_boneabs_hidden
const float SOLID_TRIGGER
void set_movetype(entity this, int mt)