]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/misc/corner.qc
Merge branch 'master' into terencehill/translate_colors_2
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / misc / corner.qc
index ccac77b6c9c402b7340c68ad12263531a066a486..d081807bccb3072bcf466c74efb003d8f7346e45 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);
 
@@ -36,29 +38,29 @@ spawnfunc(path_corner)
 }
 #elif defined(CSQC)
 
-void corner_remove()
-{SELFPARAM();
-       if(self.target) { strunzone(self.target); }
-       self.target = string_null;
+void corner_remove(entity this)
+{
+       if(this.target) { strunzone(this.target); }
+       this.target = string_null;
 
-       if(self.target2) { strunzone(self.target2); }
-       self.target2 = string_null;
+       if(this.target2) { strunzone(this.target2); }
+       this.target2 = string_null;
 
-       if(self.target3) { strunzone(self.target3); }
-       self.target3 = string_null;
+       if(this.target3) { strunzone(this.target3); }
+       this.target3 = string_null;
 
-       if(self.target4) { strunzone(self.target4); }
-       self.target4 = string_null;
+       if(this.target4) { strunzone(this.target4); }
+       this.target4 = string_null;
 
-       if(self.targetname) { strunzone(self.targetname); }
-       self.targetname = string_null;
+       if(this.targetname) { strunzone(this.targetname); }
+       this.targetname = string_null;
 
-       if(self.platmovetype) { strunzone(self.platmovetype); }
-       self.platmovetype = string_null;
+       if(this.platmovetype) { strunzone(this.platmovetype); }
+       this.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;