]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/csqcmodellib/cl_model.qc
Merge branch 'master' into divVerent/4team_ctf
[xonotic/xonotic-data.pk3dir.git] / qcsrc / csqcmodellib / cl_model.qc
index 2c7bc2d925da89fc0c1d971ad86e2ca696cddb2c..e04b92ecc8d81f1a587a9959e3e135d97303ba67 100644 (file)
@@ -203,7 +203,7 @@ void CSQCModel_Draw()
 void CSQCModel_Read(float isnew)
 {
        float sf;
-       sf = ReadShort();
+       sf = ReadInt24_t();
 
        // some nice flags for CSQCMODEL_IF and the hooks
        local noref float isplayer = (self.entnum >= 1 && self.entnum <= maxclients);
@@ -236,15 +236,18 @@ void CSQCModel_Read(float isnew)
 #undef CSQCMODEL_IF
 
        if(sf & CSQCMODEL_PROPERTY_MODELINDEX)
+       {
+               vector pmin = self.mins, pmax = self.maxs;
                setmodelindex(self, self.modelindex); // this retrieves the .model key and sets mins/maxs/absmin/absmax
-               // FIXME do we WANT this to override mins/maxs?
+               setsize(self, pmin, pmax);
+       }
 
        if(sf & CSQCMODEL_PROPERTY_TELEPORTED)
        {
                self.iflags |= IFLAG_TELEPORTED;
                self.csqcmodel_teleported = 1;
        }
-       
+
        CSQCModel_InterpolateAnimation_Note(sf);
        InterpolateOrigin_Note();
        CSQCPlayer_PostUpdate();