]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/csqcmodel/cl_model.qc
Remove an extra new line prepended to LOG_INFO messages
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / csqcmodel / cl_model.qc
index 1275f11783a0fb64fe3d2edfef4a31c4f8ec0d3b..c4f6dbf0a5d896200d0f638592498d8d5d2518f6 100644 (file)
@@ -179,7 +179,7 @@ void CSQCModel_InterpolateAnimation_Do(entity this)
 void CSQCModel_Draw(entity this)
 {
        // some nice flags for CSQCMODEL_IF and the hooks
-       bool isplayer = (this.entnum >= 1 && this.entnum <= maxclients);
+       bool isplayer = (this.isplayermodel & ISPLAYER_CLIENT);
        noref bool islocalplayer = (this.entnum == player_localnum + 1);
        noref bool isnolocalplayer = (isplayer && (this.entnum != player_localnum + 1));
 
@@ -226,7 +226,7 @@ NET_HANDLE(ENT_CLIENT_MODEL, bool isnew)
        int psf = ReadByte();
 
        // some nice flags for CSQCMODEL_IF and the hooks
-       bool isplayer = (psf & ISPLAYER_ENT) || (this.entnum >= 1 && this.entnum <= maxclients);
+       bool isplayer = (psf & ISPLAYER_CLIENT) || (this.entnum >= 1 && this.entnum <= maxclients);
        if (isnew && isplayer)
        {
                CSQCModel_players[this.entnum - 1] = this;
@@ -235,10 +235,10 @@ NET_HANDLE(ENT_CLIENT_MODEL, bool isnew)
        bool islocalplayer = (this.entnum == player_localnum + 1);
        noref bool isnolocalplayer = (isplayer && !islocalplayer);
 
-       this.isplayermodel = BITSET(this.isplayermodel, ISPLAYER_ENT, isplayer);
+       this.isplayermodel = BITSET(this.isplayermodel, ISPLAYER_CLIENT, isplayer);
        this.isplayermodel = BITSET(this.isplayermodel, ISPLAYER_LOCAL, islocalplayer);
+       this.isplayermodel = BITSET(this.isplayermodel, ISPLAYER_PLAYER, (psf & ISPLAYER_PLAYER));
 
-       this.classname = "csqcmodel";
        this.iflags |= IFLAG_ORIGIN; // interpolate origin too
        this.iflags |= IFLAG_ANGLES; // interpolate angles too
        this.iflags |= IFLAG_VELOCITY | IFLAG_AUTOVELOCITY; // let's calculate velocity automatically
@@ -276,6 +276,9 @@ NET_HANDLE(ENT_CLIENT_MODEL, bool isnew)
                this.csqcmodel_teleported = 1;
        }
 
+       if(sf & BIT(3))
+               this.alpha = this.m_alpha;
+
        if(sf & BIT(14))
                viewloc_SetTags(this);