if (this.max_health)
{
this.takedamage = DAMAGE_YES;
- SetResource(this, RES_HEALTH, this.max_health);
+ SetResourceExplicit(this, RES_HEALTH, this.max_health);
}
this.state = STATE_DOWN;
if (GetResource(this, RES_HEALTH) <= 0)
{
- SetResource(this.owner, RES_HEALTH, this.owner.max_health);
+ SetResourceExplicit(this.owner, RES_HEALTH, this.owner.max_health);
this.owner.takedamage = DAMAGE_NO; // will be reset upon return
door_use(this.owner, attacker, NULL);
}
for(t = this; ; t = t.enemy)
{
if(GetResource(t, RES_HEALTH) && !GetResource(this, RES_HEALTH))
- SetResource(this, RES_HEALTH, GetResource(t, RES_HEALTH));
+ SetResourceExplicit(this, RES_HEALTH, GetResource(t, RES_HEALTH));
if((t.targetname != "") && (this.targetname == ""))
this.targetname = t.targetname;
if((t.message != "") && (this.message == ""))
// distribute health, targetname, message
for(t = this; t; t = t.enemy)
{
- SetResource(t, RES_HEALTH, GetResource(this, RES_HEALTH));
+ SetResourceExplicit(t, RES_HEALTH, GetResource(this, RES_HEALTH));
t.targetname = this.targetname;
t.message = this.message;
if(t.enemy == this)
precache_sound(this.noise2);
}
- 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.lip = 8;
this.pos1 = this.origin;
this.pos2 = this.pos1 + this.movedir*(fabs(this.movedir*this.size) - this.lip);
- if (!this.speed)
- {
- this.speed = 100;
- }
+ if(autocvar_sv_doors_always_open)
+ {
+ this.speed = max(750, this.speed);
+ }
+ else if (!this.speed)
+ {
+ this.speed = 100;
+ }
settouch(this, door_touch);