]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/util.qc
Unnecessary newlines are unnecessary
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / util.qc
index 41e7cd491ce7d8fb1456b0511b65d08418e4123a..8a6a5ee87bc06716cfebceb362af3217420a4476 100644 (file)
@@ -6,7 +6,7 @@ float turret_tag_fire_update(entity this)
 {
        if(!this.tur_head)
        {
-               LOG_DEBUG("Call to turret_tag_fire_update with this.tur_head missing!\n");
+               LOG_DEBUG("Call to turret_tag_fire_update with this.tur_head missing!");
                this.tur_shotorg = '0 0 0';
                return false;
        }
@@ -39,8 +39,8 @@ void FireImoBeam(entity this, vector start, vector end, vector smin, vector smax
        {
                tracebox(start, smin, smax, end, false, this);
 
-               // if it is world we can't hurt it so stop now
-               if (trace_ent == world || trace_fraction == 1)
+               // if it is NULL we can't hurt it so stop now
+               if (trace_ent == NULL || trace_fraction == 1)
                        break;
 
                if (trace_ent.solid == SOLID_BSP)
@@ -60,7 +60,7 @@ void FireImoBeam(entity this, vector start, vector end, vector smin, vector smax
        endpoint = trace_endpos;
 
        // find all the entities the railgun hit and restore their solid state
-       ent = findfloat(world, railgunhit, true);
+       ent = findfloat(NULL, railgunhit, true);
        while (ent)
        {
                // restore their solid type
@@ -69,7 +69,7 @@ void FireImoBeam(entity this, vector start, vector end, vector smin, vector smax
        }
 
        // find all the entities the railgun hit and hurt them
-       ent = findfloat(world, railgunhit, true);
+       ent = findfloat(NULL, railgunhit, true);
        while (ent)
        {
                // get the details we need to call the damage function
@@ -114,8 +114,8 @@ void mark_error(vector where,float lifetime)
 {
        entity err = new(error_marker);
        setmodel(err, MDL_MARKER);
-       setorigin(err,where);
-       err.movetype = MOVETYPE_NONE;
+       setorigin(err, where);
+       set_movetype(err, MOVETYPE_NONE);
        setthink(err, marker_think);
        err.nextthink = time;
        err.skin = 0;
@@ -127,8 +127,8 @@ void mark_info(vector where,float lifetime)
 {
        entity err = spawn(info_marker);
        setmodel(err, MDL_MARKER);
-       setorigin(err,where);
-       err.movetype = MOVETYPE_NONE;
+       setorigin(err, where);
+       set_movetype(err, MOVETYPE_NONE);
        setthink(err, marker_think);
        err.nextthink = time;
        err.skin = 1;
@@ -140,8 +140,8 @@ entity mark_misc(vector where,float lifetime)
 {
        entity err = spawn(mark_misc);
        setmodel(err, MDL_MARKER);
-       setorigin(err,where);
-       err.movetype = MOVETYPE_NONE;
+       setorigin(err, where);
+       set_movetype(err, MOVETYPE_NONE);
        setthink(err, marker_think);
        err.nextthink = time;
        err.skin = 3;
@@ -165,9 +165,9 @@ void paint_target(entity onwho, float f_size, vector v_color, float f_time)
        e.scale = (f_size/512);
        //setsize(e, '0 0 0', '0 0 0');
        //setattachment(e,onwho,"");
-       setorigin(e,onwho.origin + '0 0 1');
+       setorigin(e, onwho.origin + '0 0 1');
        e.alpha = 0.15;
-       e.movetype = MOVETYPE_FLY;
+       set_movetype(e, MOVETYPE_FLY);
 
        e.velocity = (v_color * 32); // + '0 0 1' * 64;
 
@@ -184,9 +184,9 @@ void paint_target2(entity onwho, float f_size, vector v_color, float f_time)
        e.scale = (f_size/512);
        setsize(e, '0 0 0', '0 0 0');
 
-       setorigin(e,onwho.origin + '0 0 1');
+       setorigin(e, onwho.origin + '0 0 1');
        e.alpha = 0.15;
-       e.movetype = MOVETYPE_FLY;
+       set_movetype(e, MOVETYPE_FLY);
 
        e.velocity = (v_color * 32); // + '0 0 1' * 64;
        e.avelocity_x = -128;
@@ -202,8 +202,8 @@ void paint_target3(vector where, float f_size, vector v_color, float f_time)
        setmodel(e, MDL_TUR_C512); // precision set above
        e.scale = (f_size/512);
        setsize(e, '0 0 0', '0 0 0');
-       setorigin(e,where+ '0 0 1');
-       e.movetype = MOVETYPE_NONE;
+       setorigin(e, where + '0 0 1');
+       set_movetype(e, MOVETYPE_NONE);
        e.velocity = '0 0 0';
        e.colormod = v_color;
        SUB_SetFade(e,time,f_time);