Don't link teleporter destinations to CSQC if they aren't targeted
authorMario <mario@smbclan.net>
Sat, 24 Aug 2019 08:24:46 +0000 (18:24 +1000)
committerMario <mario@smbclan.net>
Sat, 24 Aug 2019 08:24:46 +0000 (18:24 +1000)
qcsrc/common/mapobjects/misc/teleport_dest.qc
qcsrc/common/mapobjects/teleporters.qc

index 126a20e..e7eedd5 100644 (file)
@@ -43,7 +43,10 @@ spawnfunc(info_teleport_destination)
        {
        }
        else
+       {
                objerror (this, "^3Teleport destination without a targetname");
+               return; // don't link it to CSQC in this case!
+       }
 
        teleport_dest_link(this);
 }
index 339ade5..da86cab 100644 (file)
@@ -257,7 +257,7 @@ void teleport_findtarget(entity this)
        if(n == 0)
        {
                // no dest!
-               objerror (this, "Teleporter with nonexistant target");
+               objerror (this, "Teleporter with nonexistent target");
                return;
        }
        else if(n == 1)