]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/misc/corner.qc
Cleanup
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / misc / corner.qc
index 390fd2c79c2949871b0e66a6b1aed731b098e922..1623ac4fc402a4a51cb96ab93c45477969664a84 100644 (file)
@@ -1,7 +1,7 @@
 #ifdef SVQC
 bool corner_send(entity to, int sf)
 {SELFPARAM();
-       WriteByte(MSG_ENTITY, ENT_CLIENT_CORNER);
+       WriteHeader(MSG_ENTITY, ENT_CLIENT_CORNER);
 
        WriteString(MSG_ENTITY, self.platmovetype);
 
@@ -26,8 +26,8 @@ void corner_link()
        //Net_LinkEntity(self, false, 0, corner_send);
 }
 
-void spawnfunc_path_corner()
-{SELFPARAM();
+spawnfunc(path_corner)
+{
        // setup values for overriding train movement
        // if a second value does not exist, both start and end speeds are the single value specified
        set_platmovetype(self, self.platmovetype);
@@ -57,8 +57,8 @@ void corner_remove()
        self.platmovetype = string_null;
 }
 
-void ent_corner()
-{SELFPARAM();
+NET_HANDLE(ENT_CLIENT_CORNER, bool isnew)
+{
        self.platmovetype = strzone(ReadString());
 
        self.origin_x = ReadCoord();
@@ -75,6 +75,8 @@ void ent_corner()
 
        self.wait = ReadByte();
 
+       return = true;
+
        self.classname = "path_corner";
        self.drawmask = MASK_NORMAL;
        self.entremove = corner_remove;