]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'martin-t/okc3' into martin-t/master
authorMartin Taibr <taibr.martin@gmail.com>
Tue, 29 Aug 2017 00:46:12 +0000 (02:46 +0200)
committerMartin Taibr <taibr.martin@gmail.com>
Tue, 29 Aug 2017 00:46:12 +0000 (02:46 +0200)
1  2 
qcsrc/server/weapons/tracing.qc

index a82f0fcdcbc0ece3cc303c86b39c3d7e27ad463a,bf272a01a94e02d75041436a36b2c7ce1846ddad..d9643bfff3257d79217ab881a2107f788ddb3baa
@@@ -30,7 -30,7 +30,7 @@@ void W_SetupShot_Dir_ProjectileSize_Ran
        float oldsolid = ent.dphitcontentsmask;
        if(!IS_CLIENT(ent))
                antilag = false; // no antilag for non-clients!
-       if (IS_PLAYER(ent) && (ent.(weaponentity).m_weapon == WEP_RIFLE || ent.(weaponentity).m_weapon == WEP_MACHINEGUN))
+       if (IS_PLAYER(ent) && (ent.(weaponentity).m_weapon.spawnflags & WEP_FLAG_PENETRATEWALLS))
                ent.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_CORPSE;
        else
                ent.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
                                        if (trace_ent == CS(ent).cursor_trace_ent)
                                                w_shotdir = normalize(CS(ent).cursor_trace_ent.origin - w_shotorg);
                                        else
-                                               LOG_INFO("antilag fail\n");
+                                               LOG_INFO("antilag fail");
                                }
                        }
                }
@@@ -185,7 -185,7 +185,7 @@@ void W_SetupProjVelocity_Explicit(entit
        #if 0
        mspercallsum += gettime(GETTIME_HIRES);
        mspercallcount += 1;
-       LOG_INFO("avg: ", ftos(mspercallcount / mspercallsum), " per sec\n");
+       LOG_INFO("avg: ", ftos(mspercallcount / mspercallsum), " per sec");
        #endif
  
        proj.velocity = W_CalculateProjectileVelocity(proj.owner, proj.owner.velocity, pSpeed * dir, forceAbsolute);
@@@ -343,9 -343,9 +343,9 @@@ void fireBullet(entity this, .entity we
        float solid_penetration_left = 1;
        float total_damage = 0;
  
 -      if(tracereffects & EF_RED)
 +      if(max_solid_penetration >= 50)
                fireBullet_trace_callback_eff = EFFECT_RIFLE;
 -      else if(tracereffects & EF_BLUE)
 +      else if(max_solid_penetration < 50)
                fireBullet_trace_callback_eff = EFFECT_RIFLE_WEAK;
        else
                fireBullet_trace_callback_eff = EFFECT_BULLET;