r90 - trunk/basezym/progsqc

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Dec 13 23:06:33 EST 2007


Author: vermeulen
Date: 2007-12-13 23:06:33 -0500 (Thu, 13 Dec 2007)
New Revision: 90

Modified:
   trunk/basezym/progsqc/actor.qc
   trunk/basezym/progsqc/damage.qc
   trunk/basezym/progsqc/inventory.qc
   trunk/basezym/progsqc/player.qc
Log:
Added angvelocity for projectiles
Exec mapname.cfg on load

Modified: trunk/basezym/progsqc/actor.qc
===================================================================
--- trunk/basezym/progsqc/actor.qc	2007-12-10 18:22:40 UTC (rev 89)
+++ trunk/basezym/progsqc/actor.qc	2007-12-14 04:06:33 UTC (rev 90)
@@ -424,6 +424,7 @@
 	local vector shotorg;
 	local vector shotdir;
 	local vector shotdamage;
+	local vector anglespeed;
 	local float shotdamagetype;
 	local float shotlifetime;
 	local float shotprojflags;
@@ -450,6 +451,7 @@
 		shotorg = muzzle2tagorigin; // overridden on hagar
 		shotdir = iteminfo_ammo2speeds;
 		shotdamage = iteminfo_ammo2damage;
+		anglespeed = iteminfo_ammo2angspeeds;
 		shotdamagetype = iteminfo_ammo2damagetype;
 		shotlifetime = iteminfo_ammo2lifetime;
 		shotprojflags = iteminfo_ammo2projflags;
@@ -474,6 +476,7 @@
 		shotorg = muzzle1tagorigin;
 		shotdir = iteminfo_ammo1speeds;
 		shotdamage = iteminfo_ammo1damage;
+		anglespeed = iteminfo_ammo1angspeeds;
 		shotdamagetype = iteminfo_ammo1damagetype;
 		shotlifetime = iteminfo_ammo1lifetime;
 		shotprojflags = iteminfo_ammo1projflags;
@@ -507,7 +510,7 @@
 	
 	while (numberof != 0)
 	{
-		  weapon_fireprojectile(shotmodel, shotorg, shotdir, shotdamage, shotdamagetype, shotlifetime, shotprojflags, shotfireflags, shotexplflags, shotfiresound, shotexplodesound, shotbouncesound, tracer, tracermodel, modelscale, projhealth, projmass, projcolormod);	
+		  weapon_fireprojectile(shotmodel, shotorg, shotdir, anglespeed, shotdamage, shotdamagetype, shotlifetime, shotprojflags, shotfireflags, shotexplflags, shotfiresound, shotexplodesound, shotbouncesound, tracer, tracermodel, modelscale, projhealth, projmass, projcolormod);	
 		  numberof = numberof - 1;
 	}
 };

Modified: trunk/basezym/progsqc/damage.qc
===================================================================
--- trunk/basezym/progsqc/damage.qc	2007-12-10 18:22:40 UTC (rev 89)
+++ trunk/basezym/progsqc/damage.qc	2007-12-14 04:06:33 UTC (rev 90)
@@ -588,7 +588,7 @@
 	}
 }
 
-void(string modelname, vector shotorg, vector shotvel, vector damage, float damagtype, float lifetime, float PROJFLAGs, float FIREFLAGs, float EXPLFLAGs, string firesound, string explodesound, string bouncesound, float tracer, string tracermodel, float modelscale, float projhealth, float projmass, vector projcolormod) weapon_fireprojectile =
+void(string modelname, vector shotorg, vector shotvel, vector avel, vector damage, float damagtype, float lifetime, float PROJFLAGs, float FIREFLAGs, float EXPLFLAGs, string firesound, string explodesound, string bouncesound, float tracer, string tracermodel, float modelscale, float projhealth, float projmass, vector projcolormod) weapon_fireprojectile =
 {
 	local float r; // templeofnoise
 	
@@ -600,6 +600,7 @@
  	newmis.damageinfo = damage;
 	shotvel = v_forward * shotvel_x + v_up * shotvel_y + shotvel_z * randomvec();
 	newmis.velocity = shotvel;
+	newmis.avelocity = avel;
  	newmis.angles = vectoangles(shotvel);
  	newmis.th_die = projectile_die;
 	newmis.th_pain = projectile_pain;

Modified: trunk/basezym/progsqc/inventory.qc
===================================================================
--- trunk/basezym/progsqc/inventory.qc	2007-12-10 18:22:40 UTC (rev 89)
+++ trunk/basezym/progsqc/inventory.qc	2007-12-14 04:06:33 UTC (rev 90)
@@ -113,6 +113,8 @@
 vector iteminfo_ammo2colormod;
 vector iteminfo_ammo1viewmodelpush;
 vector iteminfo_ammo2viewmodelpush;
+vector iteminfo_ammo1angspeeds;
+vector iteminfo_ammo2angspeeds;
 float iteminfo_ammo1noprojectile;
 float iteminfo_ammo2noprojectile;
 
@@ -178,6 +180,7 @@
 	iteminfo_ammo1minimumtofire = 0;
 	iteminfo_ammo1damagetype = DAMAGETYPE_UNKNOWN;
 	iteminfo_ammo1damage = '0 0 0';
+	iteminfo_ammo1angspeeds = '0 0 0';
 	iteminfo_ammo1speeds = '0 0 0';
 	iteminfo_ammo1lifetime = 10;
 	iteminfo_ammo1projflags = PROJFLAG_ANYIMPACT;
@@ -200,6 +203,7 @@
 	iteminfo_ammo2minimumtofire = 0;
 	iteminfo_ammo2damagetype = DAMAGETYPE_UNKNOWN;
 	iteminfo_ammo2damage = '0 0 0';
+	iteminfo_ammo2angspeeds = '0 0 0';
 	iteminfo_ammo2speeds = '0 0 0';
 	iteminfo_ammo2lifetime = 10;
 	iteminfo_ammo2projflags = PROJFLAG_ANYIMPACT;
@@ -278,6 +282,7 @@
 		
 		iteminfo_ammo1damage = stov(cvar_string(wname,"_ammo1damage"));
 		iteminfo_ammo1speeds = stov(cvar_string(wname,"_ammo1speeds"));
+		iteminfo_ammo1angspeeds = stov(cvar_string(wname,"_ammo1angspeeds"));
 		iteminfo_ammo1model = cvar_string(wname,"_ammo1model");
 		iteminfo_ammo1firesound = cvar_string(wname,"_ammo1firesound");
 		//iteminfo_ammo1explodesound = strzone(cvar_string(wname,"_ammo1explodesound"));
@@ -303,6 +308,7 @@
 		
 		iteminfo_ammo2damage = stov(cvar_string(wname,"_ammo2damage"));
 		iteminfo_ammo2speeds = stov(cvar_string(wname,"_ammo2speeds"));
+		iteminfo_ammo2angspeeds = stov(cvar_string(wname,"_ammo2angspeeds"));
 		iteminfo_ammo2model = cvar_string(wname,"_ammo2model");
 		iteminfo_ammo2firesound = cvar_string(wname,"_ammo2firesound");
 		//iteminfo_ammo2explodesound = strzone(cvar_string(wname,"_ammo2explodesound"));

Modified: trunk/basezym/progsqc/player.qc
===================================================================
--- trunk/basezym/progsqc/player.qc	2007-12-10 18:22:40 UTC (rev 89)
+++ trunk/basezym/progsqc/player.qc	2007-12-14 04:06:33 UTC (rev 90)
@@ -341,6 +341,11 @@
 		spot = find(world, classname, name);
 	}
 	if (!spot)
+	{
+		name = "info_player_team1";
+		spot = find(world, classname, name);
+	}
+	if (!spot)
 		error ("No startpoint found\n");
 
 	r = random() * 100;
@@ -377,6 +382,8 @@
 	self.v_angle = self.angles_x * '-1 0 0' + self.angles_y * '0 1 0';
 	self.nextthink = 0;
 	
+	stuffcmd(self, strcat("exec maps/", mapname, ".cfg\n"));
+	
 	self.team = cvar("g_playerteam");
 	//self.classnum = cvar("g_startclass");
 	




More information about the zymotic-commits mailing list