r83 - trunk/basezym/progsqc

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Nov 15 20:42:29 EST 2007


Author: Vermeulen
Date: 2007-11-15 20:42:29 -0500 (Thu, 15 Nov 2007)
New Revision: 83

Modified:
   trunk/basezym/progsqc/actor.qc
   trunk/basezym/progsqc/inventory.qc
   trunk/basezym/progsqc/player.qc
Log:
Viewmodel now also changes with movement
This will need tweaking

Modified: trunk/basezym/progsqc/actor.qc
===================================================================
--- trunk/basezym/progsqc/actor.qc	2007-11-14 22:49:05 UTC (rev 82)
+++ trunk/basezym/progsqc/actor.qc	2007-11-16 01:42:29 UTC (rev 83)
@@ -460,7 +460,7 @@
 	if (self.weaponitem >= ITEMTYPE_ITEM1)
 	{
 	   Inventory_ModifyItem(self, self.weaponitem, 0 - mintofire, 0);
- 	   Item_Spawn(self.weaponitem,1,0,self.origin,'300 0 0',0,world);
+ 	   Item_Spawn(self.weaponitem,1,0,self.origin,'300 0 0',0,1,world);
 	}
 	else
 	{

Modified: trunk/basezym/progsqc/inventory.qc
===================================================================
--- trunk/basezym/progsqc/inventory.qc	2007-11-14 22:49:05 UTC (rev 82)
+++ trunk/basezym/progsqc/inventory.qc	2007-11-16 01:42:29 UTC (rev 83)
@@ -331,29 +331,8 @@
 			}
 			iteminfo_weapon_canreload = (iteminfo_ammo < iteminfo_ammomax && iteminfo_ammoinventory >= 1);
 			iteminfo_weapon_canfire1 = iteminfo_ammo >= iteminfo_ammo1minimumtofire;
-			if (iteminfo_ammo1flags & PROJECTILEFLAG_REMOTEDETONATE)
-			{
-				// one ammo type, but special altfire
-				// see if any remote detonate projectiles exist, and if so
-				// allow the secondary (and this also keeps the RPG usable
-				// while the projectiles exist)
-				e = find(world, classname, "projectile");
-				while (e)
-				{
-					if (e.lefty & PROJECTILEFLAG_REMOTEDETONATE)
-					if (e.realowner == character)
-					{
-						iteminfo_weapon_canfire2 = TRUE;
-						break;
-					}
-					e = find(e, classname, "projectile");
-				}
-			}
-			else
-			{
-				// has only one ammo type, but can fire it two ways
-				iteminfo_weapon_canfire2 = iteminfo_ammo >= iteminfo_ammo2minimumtofire;
-			}
+			iteminfo_weapon_canfire2 = iteminfo_ammo >= iteminfo_ammo2minimumtofire;
+	
 			// fteqcc bug:
 			// these work
 			iteminfo_weapon_canraise = iteminfo_weapon_canfire1 + iteminfo_weapon_canfire2 + iteminfo_weapon_canreload;
@@ -588,7 +567,7 @@
 };
 
 .float ispointable;
-void(float itemtype, float quantity, float ammo1, vector org, vector vel, float respawntim, entity own) Item_Spawn =
+void(float itemtype, float quantity, float ammo1, vector org, vector vel, float respawntim, float modelscale, entity own) Item_Spawn =
 {
 	Inventory_GetItemInfo(world, itemtype);
 	newmis = spawn();
@@ -597,7 +576,7 @@
 	newmis.classname = "item";
 	newmis.netname = strzone(iteminfo_name);
 	newmis.ispointable = TRUE;
-	newmis.solid = SOLID_BBOX;
+	newmis.solid = SOLID_TRIGGER;
 	newmis.movetype = MOVETYPE_BOUNCE;
 	newmis.velocity = vel;
 	newmis.angles = '25 0 0';
@@ -618,59 +597,59 @@
 	Inventory_ModifyItem(newmis, itemtype, quantity, ammo1);
 	
 	newmis.effects = newmis.effects | EF_FULLBRIGHT;
-	newmis.scale = 1.5;
+	newmis.scale = modelscale;
 };
 
 void() weapon_weap1 =
 {
- 	Item_Spawn(ITEMTYPE_WEAP1,1,100,self.origin,'0 0 0',10,world);
+ 	Item_Spawn(ITEMTYPE_WEAP1,1,100,self.origin,'0 0 0',10,1.5,world);
 }
 
 void() weapon_weap2 =
 {
- 	Item_Spawn(ITEMTYPE_WEAP2,1,100,self.origin,'0 0 0',10,world);
+ 	Item_Spawn(ITEMTYPE_WEAP2,1,100,self.origin,'0 0 0',10,1.5,world);
 }
 
 void() weapon_weap3 =
 {
- 	Item_Spawn(ITEMTYPE_WEAP3,1,100,self.origin,'0 0 0',10,world);
+ 	Item_Spawn(ITEMTYPE_WEAP3,1,100,self.origin,'0 0 0',10,1.5,world);
 }
 
 void() weapon_weap4 =
 {
- 	Item_Spawn(ITEMTYPE_WEAP4,1,100,self.origin,'0 0 0',10,world);
+ 	Item_Spawn(ITEMTYPE_WEAP4,1,100,self.origin,'0 0 0',10,1.5,world);
 }
 
 void() weapon_weap5 =
 {
- 	Item_Spawn(ITEMTYPE_WEAP5,1,100,self.origin,'0 0 0',10,world);
+ 	Item_Spawn(ITEMTYPE_WEAP5,1,100,self.origin,'0 0 0',10,1.5,world);
 }
 
 void() weapon_weap6 =
 {
- 	Item_Spawn(ITEMTYPE_WEAP6,1,100,self.origin,'0 0 0',10,world);
+ 	Item_Spawn(ITEMTYPE_WEAP6,1,100,self.origin,'0 0 0',10,1.5,world);
 }
 
 void() weapon_weap7 =
 {
- 	Item_Spawn(ITEMTYPE_WEAP7,1,100,self.origin,'0 0 0',10,world);
+ 	Item_Spawn(ITEMTYPE_WEAP7,1,100,self.origin,'0 0 0',10,1.5,world);
 }
 
 void() item_ammo1 =
 {
- 	Item_Spawn(ITEMTYPE_AMMO1,50,0,self.origin,'0 0 0',10,world);
+ 	Item_Spawn(ITEMTYPE_AMMO1,50,0,self.origin,'0 0 0',10,1,world);
 }
 void() item_ammo2 =
 {
- 	Item_Spawn(ITEMTYPE_AMMO2,50,0,self.origin,'0 0 0',10,world);
+ 	Item_Spawn(ITEMTYPE_AMMO2,50,0,self.origin,'0 0 0',10,1,world);
 }
 void() item_ammo3 =
 {
- 	Item_Spawn(ITEMTYPE_AMMO3,50,0,self.origin,'0 0 0',10,world);
+ 	Item_Spawn(ITEMTYPE_AMMO3,50,0,self.origin,'0 0 0',10,1,world);
 }
 void() item_ammo4 =
 {
- 	Item_Spawn(ITEMTYPE_AMMO4,50,0,self.origin,'0 0 0',10,world);
+ 	Item_Spawn(ITEMTYPE_AMMO4,50,0,self.origin,'0 0 0',10,1,world);
 }
 
 void() item_health1 =
@@ -682,7 +661,7 @@
 	newmis.classname = "Health";
 	newmis.netname = "Health";
 	newmis.ispointable = TRUE;
-	newmis.solid = SOLID_BBOX;
+	newmis.solid = SOLID_TRIGGER;
 	newmis.movetype = MOVETYPE_TOSS;
 	newmis.velocity = '0 0 0';
 	newmis.angles = '0 0 0';
@@ -707,7 +686,7 @@
 	newmis.classname = "Armor";
 	newmis.netname = "Armor";
 	newmis.ispointable = TRUE;
-	newmis.solid = SOLID_BBOX;
+	newmis.solid = SOLID_TRIGGER;
 	newmis.movetype = MOVETYPE_TOSS;
 	newmis.velocity = '0 0 0';
 	newmis.angles = '0 0 0';

Modified: trunk/basezym/progsqc/player.qc
===================================================================
--- trunk/basezym/progsqc/player.qc	2007-11-14 22:49:05 UTC (rev 82)
+++ trunk/basezym/progsqc/player.qc	2007-11-16 01:42:29 UTC (rev 83)
@@ -143,6 +143,35 @@
 		  		pc.actoranim_LEGS_IDLECR   = '239 8 15' + legsframesoffset;
 		  		pc.actoranim_LEGS_TURN     = '247 7 15' + legsframesoffset;
 		 }
+		 else if (pc.animationtype == 3)
+		 {
+	   	   	 	pc.actoranim_BOTH_DEATH1   = '0 24 25';
+		  		pc.actoranim_BOTH_DEAD1    = '23 1 25';
+		  		pc.actoranim_BOTH_DEATH2   = '24 52 25';
+		  		pc.actoranim_BOTH_DEAD2    = '75 1 25';
+		  		pc.actoranim_BOTH_DEATH3   = '76 17 25';
+		  		pc.actoranim_BOTH_DEAD3    = '92 1 25';
+		  		pc.actoranim_TORSO_GESTURE = '93 47 20';
+		  		pc.actoranim_TORSO_ATTACK  = '140 6 15';
+		  		pc.actoranim_TORSO_ATTACK2 = '146 6 15';
+		 		pc.actoranim_TORSO_DROP    = '152 5 20';
+		  		pc.actoranim_TORSO_RAISE   = '157 4 20';
+		  		pc.actoranim_TORSO_STAND   = '161 1 15';
+		  		pc.actoranim_TORSO_STAND2  = '162 1 15';
+		  		legsframesoffset = '-1 0 0' * (pc.actoranim_TORSO_STAND2_x + pc.actoranim_TORSO_STAND2_y - pc.actoranim_TORSO_GESTURE_x);
+		  		pc.actoranim_LEGS_WALKCR   = '163 10 20' + legsframesoffset;
+		  		pc.actoranim_LEGS_WALK     = '173 13 18' + legsframesoffset;
+		  		pc.actoranim_LEGS_RUN      = '186 11 18' + legsframesoffset;
+		  		pc.actoranim_LEGS_BACK     = '197 10 15' + legsframesoffset;
+		  		pc.actoranim_LEGS_SWIM     = '207 11 20' + legsframesoffset;
+		  		pc.actoranim_LEGS_JUMP     = '218 9 15' + legsframesoffset;
+		  		pc.actoranim_LEGS_LAND     = '228 1 15' + legsframesoffset;
+		  		pc.actoranim_LEGS_JUMPB    = '229 8 15' + legsframesoffset;
+		  		pc.actoranim_LEGS_LANDB    = '237 1 15' + legsframesoffset;
+		  		pc.actoranim_LEGS_IDLE     = '238 15 15' + legsframesoffset;
+		  		pc.actoranim_LEGS_IDLECR   = '253 9 15' + legsframesoffset;
+		  		pc.actoranim_LEGS_TURN     = '262 9 15' + legsframesoffset;
+		 }
 		 
 		 Inventory_Clear(pc);
 		 
@@ -440,6 +469,10 @@
 	
 	if (self.flags & FL_CLIENT) // should really be client side
 	{
+	   self.viewmodelchange_x = self.viewmodelchange_x - (self.velocity_x / 1000);
+	   self.viewmodelchange_y = self.viewmodelchange_y - (self.velocity_y / 2000);
+	   self.viewmodelchange_z = self.viewmodelchange_z - (self.velocity_z / 1000);
+	
 	   Inventory_GetItemInfo(self, self.weaponitem);
 	   self.viewmodeldiff = iteminfo_viewmodeloffset - self.viewmodelchange;
 	   self.viewmodelchange = self.viewmodelchange + self.viewmodeldiff * 0.1;




More information about the zymotic-commits mailing list