]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'origin/master' into samual/balance_testing
authorSamual <samual@xonotic.org>
Sat, 18 Feb 2012 18:48:27 +0000 (13:48 -0500)
committerSamual <samual@xonotic.org>
Sat, 18 Feb 2012 18:48:27 +0000 (13:48 -0500)
16 files changed:
models/weapons/g_laser.md3
models/weapons/laser.tga [new file with mode: 0644]
models/weapons/laser_gloss.tga [new file with mode: 0644]
models/weapons/laser_glow.tga [new file with mode: 0644]
models/weapons/laser_norm.tga [new file with mode: 0644]
models/weapons/laser_reflect.tga [new file with mode: 0644]
models/weapons/laser_shirt.tga [new file with mode: 0644]
models/weapons/v_laser.md3
qcsrc/client/View.qc
qcsrc/client/shownames.qc
scripts/weapons.shader
textures/laser.tga [deleted file]
textures/laser_bump.tga [deleted file]
textures/laser_gloss.tga [deleted file]
textures/laser_glow.tga [deleted file]
textures/laser_shirt.tga [deleted file]

index d1f168a61cfca337a173aaf03d38414cc3d26ce3..fd3f1e74a32950b2fa23247771c841d18445c160 100644 (file)
Binary files a/models/weapons/g_laser.md3 and b/models/weapons/g_laser.md3 differ
diff --git a/models/weapons/laser.tga b/models/weapons/laser.tga
new file mode 100644 (file)
index 0000000..2e49562
Binary files /dev/null and b/models/weapons/laser.tga differ
diff --git a/models/weapons/laser_gloss.tga b/models/weapons/laser_gloss.tga
new file mode 100644 (file)
index 0000000..9599a94
Binary files /dev/null and b/models/weapons/laser_gloss.tga differ
diff --git a/models/weapons/laser_glow.tga b/models/weapons/laser_glow.tga
new file mode 100644 (file)
index 0000000..8221e75
Binary files /dev/null and b/models/weapons/laser_glow.tga differ
diff --git a/models/weapons/laser_norm.tga b/models/weapons/laser_norm.tga
new file mode 100644 (file)
index 0000000..80f646a
Binary files /dev/null and b/models/weapons/laser_norm.tga differ
diff --git a/models/weapons/laser_reflect.tga b/models/weapons/laser_reflect.tga
new file mode 100644 (file)
index 0000000..8f9aca5
Binary files /dev/null and b/models/weapons/laser_reflect.tga differ
diff --git a/models/weapons/laser_shirt.tga b/models/weapons/laser_shirt.tga
new file mode 100644 (file)
index 0000000..3c42a16
Binary files /dev/null and b/models/weapons/laser_shirt.tga differ
index dc5e2674505c1f02c3652980c5e130f6ecce69c0..9e35e636feca4e7a524a14975090cc186f7d06ef 100644 (file)
Binary files a/models/weapons/v_laser.md3 and b/models/weapons/v_laser.md3 differ
index f0810e5e29c3efbe230837c51997feea08c8bbb8..c23c2c78fdf893df760040f22a634af9201817cf 100644 (file)
@@ -94,6 +94,7 @@ vector GetCurrentFov(float fov)
 {
        float zoomsensitivity, zoomspeed, zoomfactor, zoomdir;
        float velocityzoom, curspeed;
+       vector v;
 
        zoomsensitivity = autocvar_cl_zoomsensitivity;
        zoomfactor = autocvar_cl_zoomfactor;
@@ -161,11 +162,15 @@ vector GetCurrentFov(float fov)
 
        if(autocvar_cl_velocityzoom && autocvar_cl_velocityzoom_type) // _type = 0 disables velocity zoom too
        {
+               v = pmove_vel;
+               if(csqcplayer)
+                       v = csqcplayer.velocity;
+
                switch(autocvar_cl_velocityzoom_type)
                {
-                       case 3: curspeed = max(0, v_forward * pmove_vel); break;
-                       case 2: curspeed = (v_forward * pmove_vel); break;
-                       case 1: default: curspeed = vlen(pmove_vel); break;
+                       case 3: curspeed = max(0, v_forward * v); break;
+                       case 2: curspeed = (v_forward * v); break;
+                       case 1: default: curspeed = vlen(v); break;
                }
                
                velocityzoom = bound(0, drawframetime / max(0.000000001, autocvar_cl_velocityzoom_time), 1); // speed at which the zoom adapts to player velocity
@@ -220,14 +225,18 @@ void TrueAim_Init()
 
 float EnemyHitCheck()
 {
-       float t;
+       float t, n;
        wcross_origin = project_3d_to_2d(trace_endpos);
        wcross_origin_z = 0;
-       if(trace_networkentity < 1)
+       if(trace_ent)
+               n = trace_ent.entnum;
+       else
+               n = trace_networkentity;
+       if(n < 1)
                return SHOTTYPE_HITWORLD;
-       if(trace_networkentity > maxclients)
+       if(n > maxclients)
                return SHOTTYPE_HITWORLD;
-       t = GetPlayerColor(trace_networkentity - 1);
+       t = GetPlayerColor(n - 1);
        if(teamplay)
                if(t == myteam)
                        return SHOTTYPE_HITTEAM;
index c2bff62c89172c3a0a203a801694182235b1da0a..5309c555e6085050b6a37b36509cf010964c2deb 100644 (file)
@@ -36,7 +36,7 @@ void Draw_ShowNames(entity ent)
                else
                {
                        traceline(view_origin, ent.origin, MOVE_NORMAL, ent);
-                       if(trace_fraction < 1 && trace_networkentity != ent.sv_entnum)
+                       if(trace_fraction < 1 && (trace_networkentity != ent.sv_entnum && trace_ent.entnum != ent.sv_entnum))
                                hit = 0;
                        else
                                hit = 1;
index 1243955c8b66cf7c69663922d64b9f26a0f9fc34..5a2532e6408eece8229a61845602b289da8f2212 100644 (file)
@@ -62,11 +62,11 @@ rl
                rgbgen lightingDiffuse
        }
 }
-laser
+models/weapons/laser
 {
        dpreflectcube cubemaps/default/sky
        {
-               map textures/laser.tga
+               map models/weapons/laser.tga
                rgbgen lightingDiffuse
        }
 }
diff --git a/textures/laser.tga b/textures/laser.tga
deleted file mode 100644 (file)
index c0f2bc7..0000000
Binary files a/textures/laser.tga and /dev/null differ
diff --git a/textures/laser_bump.tga b/textures/laser_bump.tga
deleted file mode 100644 (file)
index 2180e6e..0000000
Binary files a/textures/laser_bump.tga and /dev/null differ
diff --git a/textures/laser_gloss.tga b/textures/laser_gloss.tga
deleted file mode 100644 (file)
index fc54840..0000000
Binary files a/textures/laser_gloss.tga and /dev/null differ
diff --git a/textures/laser_glow.tga b/textures/laser_glow.tga
deleted file mode 100644 (file)
index 90e32e7..0000000
Binary files a/textures/laser_glow.tga and /dev/null differ
diff --git a/textures/laser_shirt.tga b/textures/laser_shirt.tga
deleted file mode 100644 (file)
index 279c0e7..0000000
Binary files a/textures/laser_shirt.tga and /dev/null differ