void door_blocked(entity this, entity blocker)
{
+ bool reverse = false;
if((this.spawnflags & DOOR_CRUSH)
#ifdef SVQC
&& (blocker.takedamage != DAMAGE_NO)
else
door_rotating_go_down(this);
}
+ reverse = true;
}
}
#ifdef SVQC
}
#endif
}
+ if (!reverse)
+ SUB_CalcMovePause(this);
}
void door_hit_top(entity this)
#ifdef SVQC
if (!((toucher.iscreature || (toucher.flags & FL_PROJECTILE)) && !IS_DEAD(toucher)))
#elif defined(CSQC)
- if(!((IS_CLIENT(toucher) || toucher.classname == "csqcprojectile") && !IS_DEAD(toucher)))
+ if(!((IS_CLIENT(toucher) || toucher.classname == "ENT_CLIENT_PROJECTILE") && !IS_DEAD(toucher)))
#endif
return;
// TODO: other soundpacks
if (this.sounds > 0 || q3compat)
{
- // Doors in Q3 always have sounds (they're hard coded in Q3 engine)
+ // Doors in Q3 always have sounds (they're hard coded)
this.noise2 = "plats/medplat1.wav";
this.noise1 = "plats/medplat2.wav";
}
precache_sound(this.noise2);
}
- if(autocvar_sv_doors_always_open)
- {
- this.wait = -1;
- }
- else if (!this.wait)
- {
- this.wait = 3;
- }
+ if(autocvar_sv_doors_always_open)
+ {
+ this.wait = -1;
+ }
+ else if (!this.wait)
+ {
+ this.wait = 3;
+ }
if (!this.lip)
{
this.state = STATE_BOTTOM;
- if (GetResource(this, RES_HEALTH))
+ if (GetResource(this, RES_HEALTH) || (q3compat && this.targetname == ""))
{
//this.canteamdamage = true; // TODO
this.takedamage = DAMAGE_YES;
this.pos1 = this.origin;
this.pos2 = this.pos1 + this.movedir*(fabs(this.movedir*this.size) - this.lip);
- if(autocvar_sv_doors_always_open)
- {
- this.speed = max(750, this.speed);
- }
- else if (!this.speed)
- {
+ if(autocvar_sv_doors_always_open)
+ {
+ this.speed = max(750, this.speed);
+ }
+ else if (!this.speed)
+ {
if (q3compat)
this.speed = 400;
else
- this.speed = 100;
- }
+ this.speed = 100;
+ }
settouch(this, door_touch);