r4174 - in trunk/data: particles qcsrc/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Aug 24 13:26:38 EDT 2008
Author: div0
Date: 2008-08-24 13:26:38 -0400 (Sun, 24 Aug 2008)
New Revision: 4174
Added:
trunk/data/particles/hook_blue.tga
trunk/data/particles/hook_pink.tga
trunk/data/particles/hook_red.tga
trunk/data/particles/hook_yellow.tga
Removed:
trunk/data/particles/hookbeam.tga
Modified:
trunk/data/qcsrc/client/hook.qc
Log:
new hook graphics
Added: trunk/data/particles/hook_blue.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/particles/hook_blue.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/particles/hook_pink.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/particles/hook_pink.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/particles/hook_red.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/particles/hook_red.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/particles/hook_yellow.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/particles/hook_yellow.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/data/particles/hookbeam.tga
===================================================================
(Binary files differ)
Modified: trunk/data/qcsrc/client/hook.qc
===================================================================
--- trunk/data/qcsrc/client/hook.qc 2008-08-24 15:54:53 UTC (rev 4173)
+++ trunk/data/qcsrc/client/hook.qc 2008-08-24 17:26:38 UTC (rev 4174)
@@ -33,9 +33,13 @@
// I want to draw a quad...
// from and to are MIDPOINTS.
+ float t;
vector axis, thickdir, A, B, C, D;
float length_tex;
+ t = -2 * time;
+ t = random();
+
axis = normalize(to - from);
length_tex = aspect * vlen(to - from) / thickness;
@@ -51,10 +55,10 @@
R_BeginPolygon(texture, 0);
else
R_BeginPolygon("", 0);
- R_PolygonVertex(A, '0 0 0', rgb, 1);
- R_PolygonVertex(B, '0 1 0', rgb, 1);
- R_PolygonVertex(C, '0 1 0' + length_tex * '1 0 0', rgb, 1);
- R_PolygonVertex(D, '0 0 0' + length_tex * '1 0 0', rgb, 1);
+ R_PolygonVertex(A, '0 0 0' + t * '1 0 0', rgb, 1);
+ R_PolygonVertex(B, '0 1 0' + t * '1 0 0', rgb, 1);
+ R_PolygonVertex(C, '0 1 0' + (t + length_tex) * '1 0 0', rgb, 1);
+ R_PolygonVertex(D, '0 0 0' + (t + length_tex) * '1 0 0', rgb, 1);
R_EndPolygon();
}
@@ -63,6 +67,7 @@
float i;
vector a, b, o;
entity e;
+ string tex;
o = pmove_org + '0 0 1' * getstati(STAT_VIEWHEIGHT);
makevectors(input_angles);
@@ -79,6 +84,16 @@
else
a = e.HookStart;
b = e.HookEnd;
- Draw_GrapplingHookLine(b, a, 8, o, v_forward, "particles/hookbeam", 0.5, '1 1 1');
+ if(e.team == COLOR_TEAM1)
+ tex = "particles/hook_red";
+ else if(e.team == COLOR_TEAM2)
+ tex = "particles/hook_blue";
+ else if(e.team == COLOR_TEAM3)
+ tex = "particles/hook_yellow";
+ else if(e.team == COLOR_TEAM4)
+ tex = "particles/hook_pink";
+ else
+ tex = "particles/hook_red";
+ Draw_GrapplingHookLine(b, a, 8, o, v_forward, tex, 0.25, '1 1 1');
}
}
More information about the nexuiz-commits
mailing list