6 int valid = (l.itemkeys & p.itemkeys);
24 int valid = l.itemkeys & p.itemkeys;
29 }
else if (l.itemkeys == valid) {
47 if ((keylist & (keylist-1)) == 0)
60 keylist = bitshift(keylist, -(l + 1));
102 precache_model(this.
model);
116 _setmodel(
this, this.
model);
122 setorigin(
this, this.
origin +
'0 0 32');
123 setsize(
this,
'-16 -16 -56',
'16 16 0');
127 setorigin(
this, this.
origin +
'0 0 8');
170 string _model =
"models/keys/key.md3";
176 objerror(
this,
"item_key.itemkeys must contain only 1 bit set specifying the key it represents!");
184 _netname =
"GOLD key";
185 _colormod =
'1 .9 0';
189 _netname =
"SILVER key";
190 _colormod =
'.9 .9 .9';
194 _netname =
"BRONZE key";
195 _colormod =
'.6 .25 0';
199 _netname =
"RED keycard";
200 _colormod =
'.9 0 0';
201 _model =
"models/keys/key.md3";
205 _netname =
"BLUE keycard";
206 _colormod =
'0 0 .9';
207 _model =
"models/keys/key.md3";
211 _netname =
"GREEN keycard";
212 _colormod =
'0 .9 0';
213 _model =
"models/keys/key.md3";
217 _netname =
"MASTER key";
218 _colormod =
'1 0.25 0.25';
222 _netname =
"FLUFFY PINK keycard";
227 objerror(
this,
"item_key doesn't have a default name for this key and a custom one was not specified!");
231 if (this.
model ==
"")
233 objerror(
this,
"item_key doesn't have a default model for this key and a custom one was not specified!");
249 if (this.
model ==
"")
256 if (this.
noise ==
"")
281 spawnfunc_item_key(
this);
299 spawnfunc_item_key(
this);
307 spawnfunc_item_key(
this);
313 spawnfunc_item_key(
this);
335 spawnfunc_item_key(
this);
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
ERASEABLE int lowestbit(int f)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
const float SOLID_TRIGGER
void SUB_UseTargets(entity this, entity actor, entity trigger)
bool item_keys_usekey(entity l, entity p)
Use keys from p on l.
void item_key_touch(entity this, entity toucher)
Key touch handler.
void spawn_item_key(entity this)
Spawn a key with given model, key code and color.
string item_keys_keylist(float keylist)
Returns a string with a comma separated list of key names, as specified in keylist.
string item_keys_names[ITEM_KEY_MAX]
list of key names.
void set_movetype(entity this, int mt)
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
void play2(entity e, string filename)
void DropToFloor_QC_DelayedInit(entity this)