X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Ftturrets.qc;h=2b9ec0297b2ef63411d210cc8a8597bc8438691f;hb=4337108fce31bfd194b2e7c01304a4a0cd7fef20;hp=f4a53ca199563b18495dce544fce2af04a7537df;hpb=3075f859f31fc7f9a7b2bcac4f2c42b96796a28a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/tturrets.qc b/qcsrc/client/tturrets.qc index f4a53ca19..2b9ec0297 100644 --- a/qcsrc/client/tturrets.qc +++ b/qcsrc/client/tturrets.qc @@ -264,7 +264,7 @@ void turret_draw2d() return; string spriteimage = self.netname; - float t = (GetPlayerColor(player_localentnum - 1) + 1); + float t = (GetPlayerColor(player_localnum) + 1); float a = self.alpha * autocvar_hud_panel_fg_alpha; vector rgb = spritelookupcolor(spriteimage, self.teamradar_color); @@ -604,6 +604,9 @@ void ent_turret() if(sf & TNSF_ANG) { + if(self.tur_head == world) // aparenly this can happpen before TNSF_SETUP. great. + self.tur_head = spawn(); + self.tur_head.move_angles_x = ReadShort(); self.tur_head.move_angles_y = ReadShort(); //self.tur_head.angles = self.angles + self.tur_head.move_angles; @@ -612,6 +615,9 @@ void ent_turret() if(sf & TNSF_AVEL) { + if(self.tur_head == world) // aparenly this can happpen before TNSF_SETUP. great. + self.tur_head = spawn(); + self.tur_head.move_avelocity_x = ReadShort(); self.tur_head.move_avelocity_y = ReadShort(); } @@ -643,7 +649,7 @@ void ent_turret() if(sf & TNSF_STATUS) { float _tmp; - _tmp = ReadByte(); + _tmp = ReadByte(); if(_tmp != self.team) { self.team = _tmp;