From 6ac5ecfacc0c0ed7f54e2deedfb57557da11a852 Mon Sep 17 00:00:00 2001 From: Jakob MG Date: Sat, 31 Dec 2011 09:56:10 +0100 Subject: [PATCH] Fix http://dev.xonotic.org/issues/944 Likely things may be strange anyway if TNSF_SETUP is not the first message recived. But at least the warning should go away --- qcsrc/client/tturrets.qc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/tturrets.qc b/qcsrc/client/tturrets.qc index 89f1be7fa8..2b9ec0297b 100644 --- a/qcsrc/client/tturrets.qc +++ b/qcsrc/client/tturrets.qc @@ -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; -- 2.39.2