this.pos2 = this.pos1;
this.pos1 = this.origin;
-#ifdef SVQC
- this.SendFlags |= SF_TRIGGER_UPDATE;
-#endif
+// no longer needed: not using delayed initialisation for door_init_startopen()
+//#ifdef SVQC
+// this.SendFlags |= SF_TRIGGER_UPDATE;
+//#endif
}
void door_reset(entity this)
if(this.spawnflags & DOOR_NONSOLID)
this.solid = SOLID_NOT;
-// DOOR_START_OPEN is to allow an entity to be lighted in the closed position
-// but spawn in the open position
- if (this.spawnflags & DOOR_START_OPEN)
- InitializeEntity(this, door_init_startopen, INITPRIO_SETLOCATION);
-
door_init_shared(this);
this.pos1 = this.origin;
absmovedir.z = fabs(this.movedir.z);
this.pos2 = this.pos1 + this.movedir * (absmovedir * this.size - this.lip);
+// DOOR_START_OPEN is to allow an entity to be lighted in the closed position
+// but spawn in the open position
+ if (this.spawnflags & DOOR_START_OPEN)
+ door_init_startopen(this);
+
if(autocvar_sv_doors_always_open)
{
this.speed = max(750, this.speed);
bool autocvar_sv_doors_always_open;
#endif
-const int DOOR_START_OPEN = BIT(0);
+const int DOOR_START_OPEN = BIT(0); // has same meaning in Q3: reverse position 1 and 2
const int DOOR_DONT_LINK = BIT(2);
const int SPAWNFLAGS_GOLD_KEY = BIT(3); // Quake 1 compat, can only be used with func_door!
const int SPAWNFLAGS_SILVER_KEY = BIT(4); // Quake 1 compat, can only be used with func_door!