]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/wall.qc
Merge branch 'master' into terencehill/min_spec_time
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / wall.qc
index 64916ad8c17d05251f940ed0ae9e02e340ffb8bf..600bf5fa8fc9f13330d260895ca00d3066a0e026 100644 (file)
@@ -1,5 +1,7 @@
 #include "wall.qh"
 
+#include "autocvars.qh"
+#include "main.qh"
 #include "bgmscript.qh"
 
 
@@ -109,9 +111,7 @@ void Ent_Wall_Draw(entity this)
 
 void Ent_Wall_Remove(entity this)
 {
-       if(this.bgmscript)
-               strunzone(this.bgmscript);
-       this.bgmscript = string_null;
+       strfree(this.bgmscript);
 }
 
 NET_HANDLE(ENT_CLIENT_WALL, bool isnew)
@@ -136,13 +136,12 @@ NET_HANDLE(ENT_CLIENT_WALL, bool isnew)
                        this.colormap = ReadShort();
                else
                        this.colormap = 0;
+               this.skin = ReadByte();
        }
 
        if(f & 2)
        {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
                setorigin(this, this.origin);
        }
 
@@ -178,28 +177,22 @@ NET_HANDLE(ENT_CLIENT_WALL, bool isnew)
                this.scale = ReadShort() / 256.0;
                if(f & 0x20)
                {
-                       this.mins_x = ReadCoord();
-                       this.mins_y = ReadCoord();
-                       this.mins_z = ReadCoord();
-                       this.maxs_x = ReadCoord();
-                       this.maxs_y = ReadCoord();
-                       this.maxs_z = ReadCoord();
+                       this.mins = ReadVector();
+                       this.maxs = ReadVector();
                }
                else
                        this.mins = this.maxs = '0 0 0';
                setsize(this, this.mins, this.maxs);
 
-               if(this.bgmscript)
-                       strunzone(this.bgmscript);
-               this.bgmscript = ReadString();
-               if(substring(this.bgmscript, 0, 1) == "<")
+               string s = ReadString();
+               if(substring(s, 0, 1) == "<")
                {
-                       this.bgmscript = strzone(substring(this.bgmscript, 1, -1));
+                       strcpy(this.bgmscript, substring(s, 1, -1));
                        this.bgmscriptangular = 1;
                }
                else
                {
-                       this.bgmscript = strzone(this.bgmscript);
+                       strcpy(this.bgmscript, s);
                        this.bgmscriptangular = 0;
                }
                if(this.bgmscript != "")
@@ -208,9 +201,7 @@ NET_HANDLE(ENT_CLIENT_WALL, bool isnew)
                        this.bgmscriptdecay = ReadByte() / 64.0;
                        this.bgmscriptsustain = ReadByte() / 255.0;
                        this.bgmscriptrelease = ReadByte() / 64.0;
-                       this.movedir_x = ReadCoord();
-                       this.movedir_y = ReadCoord();
-                       this.movedir_z = ReadCoord();
+                       this.movedir = ReadVector();
                        this.lip = ReadByte() / 255.0;
                }
                this.fade_start = ReadByte();