X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Flib%2Fcsqcmodel%2Fcl_model.qc;h=c4f6dbf0a5d896200d0f638592498d8d5d2518f6;hb=56ef23431c51759117dc2bdf768a0b0d1180d4ec;hp=1275f11783a0fb64fe3d2edfef4a31c4f8ec0d3b;hpb=4d91f9f38ee0fe58d4ac93662da2bcd52921d373;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/lib/csqcmodel/cl_model.qc b/qcsrc/lib/csqcmodel/cl_model.qc index 1275f1178..c4f6dbf0a 100644 --- a/qcsrc/lib/csqcmodel/cl_model.qc +++ b/qcsrc/lib/csqcmodel/cl_model.qc @@ -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);