]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/trigger/hurt.qc
q3compat: make trigger_hurt without spawnflags 16 deal damage every frame even if...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / trigger / hurt.qc
index 8c21c509c5643419bb937d1d4170a81d711f12df..246bfdf9b55d9c1a35cf284339d063f48f6e0bd5 100644 (file)
@@ -22,10 +22,10 @@ void trigger_hurt_touch(entity this, entity toucher)
        if (toucher.iscreature)
        {
                if (toucher.takedamage)
-               if (toucher.triggerhurttime < time)
+               if (toucher.triggerhurttime < time || (q3compat && !(this.spawnflags & HURT_SLOW)))
                {
                        EXACTTRIGGER_TOUCH(this, toucher);
-                       toucher.triggerhurttime = time + ((autocvar_sv_q3defragcompat && !(this.spawnflags & HURT_SLOW)) ? 0.1 : 1);
+                       toucher.triggerhurttime = time + 1;
 
                        entity own;
                        own = this.enemy;
@@ -66,7 +66,7 @@ spawnfunc(trigger_hurt)
        this.use = trigger_hurt_use;
        this.enemy = world; // I hate you all
        if (!this.dmg)
-               this.dmg = ((autocvar_sv_q3defragcompat) ? 5 : 10000);
+               this.dmg = ((q3compat) ? 5 : 10000);
        if (this.message == "")
                this.message = "was in the wrong place";
        if (this.message2 == "")