r4322 - in trunk/data: gfx models/weapons qcsrc/client qcsrc/common qcsrc/server textures
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Sep 3 15:18:48 EDT 2008
Author: div0
Date: 2008-09-03 15:18:48 -0400 (Wed, 03 Sep 2008)
New Revision: 4322
Added:
trunk/data/gfx/inv_weapon10.tga
trunk/data/models/weapons/g_minstanex.md3
trunk/data/models/weapons/v_minstanex.md3
trunk/data/models/weapons/w_minstanex.zym
trunk/data/textures/nex.tga
trunk/data/textures/nex_bump.tga
trunk/data/textures/nex_gloss.tga
trunk/data/textures/nex_glow.tga
trunk/data/textures/nex_pants.tga
trunk/data/textures/nex_shirt.tga
Modified:
trunk/data/qcsrc/client/Main.qc
trunk/data/qcsrc/client/View.qc
trunk/data/qcsrc/client/main.qh
trunk/data/qcsrc/client/sbar.qc
trunk/data/qcsrc/common/constants.qh
trunk/data/qcsrc/server/cl_client.qc
trunk/data/qcsrc/server/cl_weapons.qc
trunk/data/qcsrc/server/cl_weaponsystem.qc
trunk/data/qcsrc/server/w_minstanex.qc
Log:
use the old Nex model and old Nex shot origin; make csqc aware of the weapon impulses (see sbar_hudselector 1 HUD)
Added: trunk/data/gfx/inv_weapon10.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/gfx/inv_weapon10.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/models/weapons/g_minstanex.md3
===================================================================
(Binary files differ)
Property changes on: trunk/data/models/weapons/g_minstanex.md3
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/models/weapons/v_minstanex.md3
===================================================================
(Binary files differ)
Property changes on: trunk/data/models/weapons/v_minstanex.md3
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/models/weapons/w_minstanex.zym
===================================================================
(Binary files differ)
Property changes on: trunk/data/models/weapons/w_minstanex.zym
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/data/qcsrc/client/Main.qc
===================================================================
--- trunk/data/qcsrc/client/Main.qc 2008-09-03 18:43:11 UTC (rev 4321)
+++ trunk/data/qcsrc/client/Main.qc 2008-09-03 19:18:48 UTC (rev 4322)
@@ -626,10 +626,11 @@
void Net_ReadInit()
{
+ float i;
csqc_revision = ReadShort();
maxclients = ReadByte();
- minstagib = ReadByte();
-
+ for(i = 0; i < 24; ++i)
+ weaponimpulse[i] = ReadByte() - 1;
CSQC_CheckRevision();
}
Modified: trunk/data/qcsrc/client/View.qc
===================================================================
--- trunk/data/qcsrc/client/View.qc 2008-09-03 18:43:11 UTC (rev 4321)
+++ trunk/data/qcsrc/client/View.qc 2008-09-03 19:18:48 UTC (rev 4322)
@@ -94,7 +94,7 @@
zoomspeed = 3.5;
zoomdir = button_zoom;
- if(activeweapon == 7 && !minstagib)
+ if(activeweapon == WEP_NEX)
zoomdir += button_attack2;
if(spectatee_status > 0 || isdemo())
{
Modified: trunk/data/qcsrc/client/main.qh
===================================================================
--- trunk/data/qcsrc/client/main.qh 2008-09-03 18:43:11 UTC (rev 4321)
+++ trunk/data/qcsrc/client/main.qh 2008-09-03 19:18:48 UTC (rev 4322)
@@ -118,8 +118,9 @@
float spectatorbutton_zoom;
float button_attack2;
float activeweapon;
-float minstagib;
float current_viewzoom;
float zoomin_effect;
float ignore_plus_zoom;
float ignore_minus_zoom;
+
+float weaponimpulse[24];
Modified: trunk/data/qcsrc/client/sbar.qc
===================================================================
--- trunk/data/qcsrc/client/sbar.qc 2008-09-03 18:43:11 UTC (rev 4321)
+++ trunk/data/qcsrc/client/sbar.qc 2008-09-03 19:18:48 UTC (rev 4322)
@@ -27,10 +27,23 @@
MapVote_Draw();
}
+float weaponspace[10];
+void Sbar_DrawWeapon_Clear()
+{
+ float idx;
+ for(idx = 0; idx < 10; ++idx)
+ weaponspace[idx] = 0;
+}
void Sbar_DrawWeapon(float nr, float fade, float active)
{
vector pos, vsize, color;
- float value;
+ float value, idx, imp, sp;
+
+ imp = weaponimpulse[nr];
+ if(imp == 0)
+ idx = 9;
+ else
+ idx = imp - 1;
value = (active) ? 1 : 0.6;
color_x = color_y = color_z = value;
@@ -39,9 +52,12 @@
{
// width = 300, height = 100
const float w_width = 32, w_height = 12, w_space = 2, font_size = 8;
+
+ sp = weaponspace[idx] + 1;
+ weaponspace[idx] = sp;
- pos_x = (vid_conwidth - w_width * 9) * 0.5 + w_width * nr;
- pos_y = (vid_conheight - w_height);
+ pos_x = (vid_conwidth - w_width * 9) * 0.5 + w_width * idx;
+ pos_y = (vid_conheight - w_height * sp);
pos_z = 0;
vsize_x = w_width;
vsize_y = w_height;
@@ -52,8 +68,7 @@
vsize_x = font_size;
vsize_y = font_size;
vsize_z = 0;
- drawstring(pos, ftos(nr+1), vsize, '1 1 0', sbar_alpha_fg, 0);
-
+ drawstring(pos, ftos(imp), vsize, '1 1 0', sbar_alpha_fg, 0);
}
else
{
@@ -1412,8 +1427,10 @@
fade = bound(0.7, fade, 1);
x = 1.0;
- for(i = WEP_FIRST; i <= WEP_LAST; ++i)
+ Sbar_DrawWeapon_Clear();
+ for(i = 1; i <= 24; ++i)
{
+ if(weaponimpulse[i-1] >= 0)
if(stat_weapons & x)
{
Sbar_DrawWeapon(i-1, fade, (i == activeweapon));
@@ -1497,8 +1514,10 @@
fade = 3 - 2 * (time - weapontime);
x = 1.0;
+ Sbar_DrawWeapon_Clear();
for(i = WEP_FIRST; i <= WEP_LAST; ++i)
{
+ if(weaponimpulse[i-1] >= 0)
if(stat_weapons & x)
{
Sbar_DrawWeapon(i-1, fade, (i == activeweapon));
Modified: trunk/data/qcsrc/common/constants.qh
===================================================================
--- trunk/data/qcsrc/common/constants.qh 2008-09-03 18:43:11 UTC (rev 4321)
+++ trunk/data/qcsrc/common/constants.qh 2008-09-03 19:18:48 UTC (rev 4322)
@@ -15,7 +15,8 @@
// Revision 14: laser
// Revision 15: zoom
// Revision 16: multi-weapons
-#define CSQC_REVISION 16
+// Revision 17: multi-weaponimpulses
+#define CSQC_REVISION 17
// probably put these in common/
// so server/ and client/ can be synced better
Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc 2008-09-03 18:43:11 UTC (rev 4321)
+++ trunk/data/qcsrc/server/cl_client.qc 2008-09-03 19:18:48 UTC (rev 4322)
@@ -771,6 +771,7 @@
*/
void SendCSQCInfo(void)
{
+ float i;
if(clienttype(self) != CLIENTTYPE_REAL)
return;
msg_entity = self;
@@ -778,7 +779,8 @@
WriteByte(MSG_ONE, TE_CSQC_INIT);
WriteShort(MSG_ONE, CSQC_REVISION);
WriteByte(MSG_ONE, maxclients);
- WriteByte(MSG_ONE, g_minstagib);
+ for(i = 1; i <= 24; ++i)
+ WriteByte(MSG_ONE, (get_weaponinfo(i)).impulse + 1);
}
/*
Modified: trunk/data/qcsrc/server/cl_weapons.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weapons.qc 2008-09-03 18:43:11 UTC (rev 4321)
+++ trunk/data/qcsrc/server/cl_weapons.qc 2008-09-03 19:18:48 UTC (rev 4322)
@@ -451,15 +451,15 @@
void RegisterWeapons()
{
// %weaponaddpoint
- register_weapon(WEP_LASER, w_laser, 0, 1, 1, "laser", "laser", "Laser");
- register_weapon(WEP_SHOTGUN, w_shotgun, IT_SHELLS, 2, 1, "shotgun", "shotgun", "Shotgun");
- register_weapon(WEP_UZI, w_uzi, IT_NAILS, 3, 1, "uzi", "uzi", "Machine Gun");
- register_weapon(WEP_GRENADE_LAUNCHER, w_glauncher, IT_ROCKETS, 4, 1, "gl", "grenadelauncher", "Mortar");
- register_weapon(WEP_ELECTRO, w_electro, IT_CELLS, 5, 1, "electro", "electro", "Electro");
- register_weapon(WEP_CRYLINK, w_crylink, IT_CELLS, 6, 1, "crylink", "crylink", "Crylink");
- register_weapon(WEP_NEX, w_nex, IT_CELLS, 7, 1, "nex", "nex", "Nex");
- register_weapon(WEP_HAGAR, w_hagar, IT_ROCKETS, 8, 1, "hagar", "hagar", "Hagar");
- register_weapon(WEP_ROCKET_LAUNCHER, w_rlauncher, IT_ROCKETS, 9, 1, "rl", "rocketlauncher", "Rocket Launcher");
- register_weapon(WEP_PORTO, w_porto, IT_SUPERWEAPON, 0, 0, "porto" , "porto", "Port-O-Launch");
- register_weapon(WEP_MINSTANEX, w_minstanex, IT_CELLS, 7, 0, "nex", "minstanex", "MinstaNex");
+ register_weapon(WEP_LASER, w_laser, 0, 1, 1, "laser", "laser", "Laser");
+ register_weapon(WEP_SHOTGUN, w_shotgun, IT_SHELLS, 2, 1, "shotgun", "shotgun", "Shotgun");
+ register_weapon(WEP_UZI, w_uzi, IT_NAILS, 3, 1, "uzi", "uzi", "Machine Gun");
+ register_weapon(WEP_GRENADE_LAUNCHER, w_glauncher, IT_ROCKETS, 4, 1, "gl", "grenadelauncher", "Mortar");
+ register_weapon(WEP_ELECTRO, w_electro, IT_CELLS, 5, 1, "electro", "electro", "Electro");
+ register_weapon(WEP_CRYLINK, w_crylink, IT_CELLS, 6, 1, "crylink", "crylink", "Crylink");
+ register_weapon(WEP_NEX, w_nex, IT_CELLS, 7, 1, "nex", "nex", "Nex");
+ register_weapon(WEP_HAGAR, w_hagar, IT_ROCKETS, 8, 1, "hagar", "hagar", "Hagar");
+ register_weapon(WEP_ROCKET_LAUNCHER, w_rlauncher, IT_ROCKETS, 9, 1, "rl", "rocketlauncher", "Rocket Launcher");
+ register_weapon(WEP_PORTO, w_porto, IT_SUPERWEAPON, 0, 0, "porto" , "porto", "Port-O-Launch");
+ register_weapon(WEP_MINSTANEX, w_minstanex, IT_CELLS, 7, 0, "minstanex", "minstanex", "MinstaNex");
}
Modified: trunk/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weaponsystem.qc 2008-09-03 18:43:11 UTC (rev 4321)
+++ trunk/data/qcsrc/server/cl_weaponsystem.qc 2008-09-03 19:18:48 UTC (rev 4322)
@@ -620,7 +620,7 @@
dummy_weapon_info.mdl = "";
dummy_weapon_info.model = "";
dummy_weapon_info.spawnflags = 0;
- dummy_weapon_info.impulse = 0;
+ dummy_weapon_info.impulse = -1;
}
entity get_weaponinfo(float id)
{
Modified: trunk/data/qcsrc/server/w_minstanex.qc
===================================================================
--- trunk/data/qcsrc/server/w_minstanex.qc 2008-09-03 18:43:11 UTC (rev 4321)
+++ trunk/data/qcsrc/server/w_minstanex.qc 2008-09-03 19:18:48 UTC (rev 4322)
@@ -3,7 +3,7 @@
float flying;
flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
- W_SetupShot (self, '25 4 -4', TRUE, 5, "weapons/nexfire.wav");
+ W_SetupShot (self, '25 8 -4', TRUE, 5, "weapons/nexfire.wav");
yoda = 0;
FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, 1000, 800, WEP_MINSTANEX);
@@ -16,7 +16,7 @@
pointparticles(particleeffectnum("nex_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
// beam effect
- trailparticles(world, particleeffectnum("nex_beam"), w_shotorg, trace_endpos);
+ trailparticles(world, particleeffectnum("TE_TEI_G3"), w_shotorg, trace_endpos);
// flash and burn the wall
if (trace_ent.solid == SOLID_BSP && !(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT))
pointparticles(particleeffectnum("nex_impact"), trace_endpos - w_shotdir * 6, '0 0 0', 1);
Added: trunk/data/textures/nex.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/nex.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/nex_bump.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/nex_bump.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/nex_gloss.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/nex_gloss.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/nex_glow.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/nex_glow.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/nex_pants.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/nex_pants.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/nex_shirt.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/nex_shirt.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
More information about the nexuiz-commits
mailing list