39 Damage (blocker,
this,
this, 10000, DEATH_HURTTRIGGER.m_id,
DMG_NOWEP, blocker.origin,
'0 0 0');
46 Damage (blocker,
this,
this, this.
dmg, DEATH_HURTTRIGGER.m_id,
DMG_NOWEP, blocker.origin,
'0 0 0');
63 door_rotating_go_up(
this, blocker);
70 door_rotating_go_down(
this);
79 Damage (blocker,
this,
this, 10000, DEATH_HURTTRIGGER.m_id,
DMG_NOWEP, blocker.origin,
'0 0 0');
97 setthink(
this, door_rotating_go_down);
173 int valid = (door.itemkeys & store.itemkeys);
174 door.itemkeys &= ~valid;
179 play2(player, door.noise);
180 Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_DOOR_UNLOCKED);
188 if(player.key_door_messagetime <=
time)
190 play2(player, door.noise3);
191 Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_DOOR_LOCKED_NEED, item_keys_keylist(door.itemkeys));
192 player.key_door_messagetime =
time + 2;
200 if(player.key_door_messagetime <=
time)
202 play2(player, door.noise3);
203 Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_DOOR_LOCKED_ALSONEED, item_keys_keylist(door.itemkeys));
204 player.key_door_messagetime =
time + 2;
213 if (this.
owner !=
this)
214 objerror (
this,
"door_fire: this.owner != this");
222 if (e.classname ==
"door") {
225 door_rotating_go_down(e);
228 }
while ((e !=
this) && (e !=
NULL));
236 if (e.classname ==
"door") {
242 e.pos2 =
'0 0 0' - e.pos2;
246 && (((e.lip == 666) && (trigger.trigger_reverse == 0)) || ((e.lip != 666) && (trigger.trigger_reverse != 0)))))
248 door_rotating_go_up(e, trigger);
252 }
while ((e !=
this) && (e !=
NULL));
304 if (!(this.
owner.dmg) && (
this.owner.message !=
""))
308 play2(toucher, this.
owner.noise);
317 Damage (blocker,
this,
this, 10000, DEATH_HURTTRIGGER.m_id,
DMG_NOWEP, blocker.origin,
'0 0 0');
325 Damage (blocker,
this,
this, this.
dmg, DEATH_HURTTRIGGER.m_id,
DMG_NOWEP, blocker.origin,
'0 0 0');
334 door_rotating_go_up (
this, blocker);
336 door_rotating_go_down (
this);
344 Damage (blocker,
this,
this, 10000, DEATH_HURTTRIGGER.m_id,
DMG_NOWEP, blocker.origin,
'0 0 0');
362 if (!((toucher.iscreature || (toucher.flags & FL_PROJECTILE)) && !
IS_DEAD(toucher)))
364 if(!((
IS_CLIENT(toucher) || toucher.classname ==
"ENT_CLIENT_PROJECTILE") && !
IS_DEAD(toucher)))
383 vector t1 = fmins, t2 = fmaxs;
385 trigger =
new(doortriggerfield);
388 trigger.owner =
this;
393 setsize (trigger, t1 -
'60 60 8', t2 +
'60 60 8');
416 if((e1.absmin_x > e2.absmax_x + DELTA)
417 || (e1.absmin_y > e2.absmax_y + DELTA)
418 || (e1.absmin_z > e2.absmax_z + DELTA)
419 || (e2.absmin_x > e1.absmax_x + DELTA)
420 || (e2.absmin_y > e1.absmax_y + DELTA)
421 || (e2.absmin_z > e1.absmax_z + DELTA)
460 for(t =
this; ; t = t.enemy)
475 for(t =
this; ; t = t.enemy)
479 if((t.targetname !=
"") && (
this.targetname ==
""))
481 if((t.message !=
"") && (
this.message ==
""))
483 if (t.absmin_x < cmins_x)
484 cmins_x = t.absmin_x;
485 if (t.absmin_y < cmins_y)
486 cmins_y = t.absmin_y;
487 if (t.absmin_z < cmins_z)
488 cmins_z = t.absmin_z;
489 if (t.absmax_x > cmaxs_x)
490 cmaxs_x = t.absmax_x;
491 if (t.absmax_y > cmaxs_y)
492 cmaxs_y = t.absmax_y;
493 if (t.absmax_z > cmaxs_z)
494 cmaxs_z = t.absmax_z;
500 for(t =
this; t; t = t.enemy)
556 WriteHeader(MSG_ENTITY, ENT_CLIENT_DOOR);
566 trigger_common_write(
this,
true);
568 WriteVector(MSG_ENTITY, this.
pos1);
569 WriteVector(MSG_ENTITY, this.
pos2);
571 WriteVector(MSG_ENTITY, this.
size);
587 WriteVector(MSG_ENTITY, this.
origin);
589 WriteVector(MSG_ENTITY, this.
pos1);
590 WriteVector(MSG_ENTITY, this.
pos2);
629 void door_init_shared(
entity this)
636 this.
noise =
"misc/talk.wav";
641 this.
noise3 =
"misc/talk.wav";
650 if((this.
dmg || (this.
spawnflags & DOOR_CRUSH)) && (this.message2 ==
""))
652 this.message2 =
"was squished by";
659 this.
noise2 =
"plats/medplat1.wav";
660 this.
noise1 =
"plats/medplat2.wav";
686 if(autocvar_sv_doors_always_open)
726 if (!InitMovingBrushTrigger(
this))
742 door_init_shared(
this);
747 if(autocvar_sv_doors_always_open)
751 else if (!this.
speed)
780 _setmodel(
this, this.mdl);
782 trigger_common_read(
this,
true);
784 this.
pos1 = ReadVector();
785 this.
pos2 = ReadVector();
787 this.
size = ReadVector();
789 this.
wait = ReadShort();
790 this.
speed = ReadShort();
791 this.
lip = ReadByte();
792 this.
state = ReadByte();
793 this.
ltime = ReadCoord();
815 this.
origin = ReadVector();
818 this.
pos1 = ReadVector();
819 this.
pos2 = ReadVector();
const int HITTYPE_SPLASH
automatically set by RadiusDamage
void door_trigger_touch(entity this, entity toucher)
void door_generic_plat_blocked(entity this, entity blocker)
#define REGISTER_NET_LINKED(id)
#define ITEM_KEY_BIT(n)
Returns the bit ID of a key.
string GetField_fullspawndata(entity e, string f,...)
const int SF_TRIGGER_INIT
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
const int DOOR_START_OPEN
void door_use(entity this, entity actor, entity trigger)
const int SPAWNFLAGS_GOLD_KEY
const int DOOR_ROTATING_BIDIR_IN_DOWN
void FindConnectedComponent(entity e,.entity fld, findNextEntityNearFunction_t nxt, isConnectedFunction_t iscon, entity pass)
void SUB_UseTargets(entity this, entity actor, entity trigger)
#define NET_HANDLE(id, param)
void door_fire(entity this, entity actor, entity trigger)
spawnfunc(info_player_attacker)
void door_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
void SUB_CalcMove(entity this, vector tdest, float tspeedtype, float tspeed, void(entity this) func)
void door_spawnfield(entity this, vector fmins, vector fmaxs)
void door_go_up(entity this, entity actor, entity trigger)
void TakeResource(entity receiver, Resource res_type, float amount)
Takes an entity some resource.
void door_blocked(entity this, entity blocker)
bool door_check_keys(entity door, entity player)
const int SF_TRIGGER_RESET
const int SPAWNFLAGS_SILVER_KEY
void door_init_startopen(entity this)
void door_go_down(entity this)
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
const int CH_TRIGGER_SINGLE
void door_touch(entity this, entity toucher)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
void door_hit_bottom(entity this)
bool LinkDoors_isconnected(entity e1, entity e2, entity pass)
void LinkDoors(entity this)
entity LinkDoors_nextent(entity cur, entity near, entity pass)
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
const int DOOR_ROTATING_BIDIR
void InitializeEntity(entity e, void(entity this) func, int order)
void door_reset(entity this)
#define _sound(e, c, s, v, a)
const float SOLID_TRIGGER
#define DEATH_ISSPECIAL(t)
#define pass(name, colormin, colormax)
void door_hit_top(entity this)
void set_movetype(entity this, int mt)
const int SF_TRIGGER_UPDATE