]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/misc/corner.qc
Net: move message headers to their respective files
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / misc / corner.qc
index 390fd2c79c2949871b0e66a6b1aed731b098e922..d1bfe00de3c0c2ba41245f90ee1e0b4809023247 100644 (file)
@@ -1,7 +1,9 @@
+REGISTER_NET_LINKED(ENT_CLIENT_CORNER)
+
 #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 +28,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 +59,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 +77,8 @@ void ent_corner()
 
        self.wait = ReadByte();
 
+       return = true;
+
        self.classname = "path_corner";
        self.drawmask = MASK_NORMAL;
        self.entremove = corner_remove;