]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/func/door.qc
Support door keys on QL maps
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / func / door.qc
index ba2e53d27d027c2a01bbcd38736fec993665b60b..0250b48cf0b7ee87908791f47279a25b15b8269d 100644 (file)
@@ -683,6 +683,10 @@ void door_init_shared(entity this)
                string s = GetField_fullspawndata(this, "sound_start", true);
                string e = GetField_fullspawndata(this, "sound_end", true);
 
+               // Quake Live adds these ones, because of course it had to be different from CPMA
+               if (!s) s = GetField_fullspawndata(this, "startsound", true);
+               if (!e) e = GetField_fullspawndata(this, "endsound", true);
+
                if (s)
                        this.noise2 = strzone(s);
                else
@@ -746,7 +750,7 @@ void door_init_shared(entity this)
 // spawnflags require key (for now only func_door)
 spawnfunc(func_door)
 {
-       // Quake 1 keys compatibility
+       // Quake 1 and QL keys compatibility
        if (this.spawnflags & SPAWNFLAGS_GOLD_KEY)
                this.itemkeys |= ITEM_KEY_BIT(0);
        if (this.spawnflags & SPAWNFLAGS_SILVER_KEY)