]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
func_plat: Use Q3 defaults for .dmg .speed and .lip on Q3 maps
authorbones_was_here <bones_was_here@xonotic.au>
Fri, 14 Oct 2022 08:34:12 +0000 (18:34 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 16 Feb 2023 11:07:30 +0000 (21:07 +1000)
qcsrc/common/mapobjects/func/plat.qc

index ae9c121ab32cea5d943f24d6f5d138932bab7505..9dd3ac73288ed8949825a44cbbc41bc3876d2190 100644 (file)
@@ -58,7 +58,12 @@ void plat_link(entity this)
 
 spawnfunc(func_plat)
 {
-       if (this.spawnflags & CRUSH)
+       if (q3compat)
+       {
+               this.spawnflags = 0; // Q3 plats have no spawnflags
+               if (!this.dmg) this.dmg = 2;
+       }
+       else if (this.spawnflags & CRUSH)
        {
                this.dmg = 10000;
        }
@@ -124,8 +129,8 @@ spawnfunc(func_plat)
 
        setblocked(this, plat_crush);
 
-       if (!this.speed) this.speed = 150;
-       if (!this.lip) this.lip = 16;
+       if (!this.speed) this.speed = q3compat ? 200 : 150;
+       if (!this.lip) this.lip = q3compat ? 8 : 16;
        if (!this.height) this.height = this.size.z - this.lip;
 
        this.pos1 = this.origin;