]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/cl_turrets.qc
Merge branch 'drjaska/damagetext' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / cl_turrets.qc
index 84812fc4605cb2d34fb8497b975e1b9b7d6bafa3..219b23318c9ab6a68ae9be5f798de916b32659b9 100644 (file)
@@ -10,7 +10,7 @@ void turret_remove(entity this)
 .vector glowmod;
 void turret_changeteam(entity this)
 {
-       this.glowmod = Team_ColorRGB(this.team - 1) * 2;
+       this.glowmod = Team_ColorRGB(this.team - 1);
        this.teamradar_color = Team_ColorRGB(this.team - 1);
 
        if(this.team)
@@ -88,9 +88,9 @@ void turret_draw2d(entity this)
                if(hud != HUD_NORMAL)
                {
                        if((get_turretinfo(this.m_id)).spawnflags & TUR_FLAG_MOVE)
-                               txt = "gfx/vehicles/turret_moving.tga";
+                               txt = "gfx/vehicles/turret_moving";
                        else
-                               txt = "gfx/vehicles/turret_stationary.tga";
+                               txt = "gfx/vehicles/turret_stationary";
 
                        vector pz = drawgetimagesize(txt) * autocvar_cl_vehicles_crosshair_size;
                        drawpic(o - pz * 0.5, txt, pz , '1 1 1', 0.7, DRAWFLAG_NORMAL);
@@ -221,6 +221,8 @@ void turret_construct(entity this, bool isnew)
        setorigin(this, this.origin);
        _setmodel(this, tur.model);
        _setmodel(this.tur_head, tur.head_model);
+       this.solid = SOLID_BBOX; // before setsize so it will be linked to the area grid
+       this.tur_head.solid = SOLID_NOT;
        setsize(this, tur.m_mins, tur.m_maxs);
        setsize(this.tur_head, '0 0 0', '0 0 0');
 
@@ -235,8 +237,6 @@ void turret_construct(entity this, bool isnew)
        set_movetype(this, MOVETYPE_NOCLIP);
        this.tur_head.angles                    = this.angles;
        SetResourceExplicit(this, RES_HEALTH, 255);
-       this.solid                                              = SOLID_BBOX;
-       this.tur_head.solid                             = SOLID_NOT;
        set_movetype(this, MOVETYPE_NOCLIP);
        set_movetype(this.tur_head, MOVETYPE_NOCLIP);
        this.draw                                               = turret_draw;