Module dpmod: Change committed

havoc at icculus.org havoc at icculus.org
Sun Jul 27 03:01:29 EDT 2003


Commiter   : havoc
CVSROOT    : /cvs/cvsroot/twilight
Module     : dpmod
Commit time: 2003-07-27 07:01:29 UTC

Log message:

removed explosive slugs from the shotguns (and explosive shell ammo is gone as well)

Modified files:
     qc/client.qc qc/inventory.qc qc/item_ammo.qc qc/item_weapons.qc
     qc/w_dbshotgun.qc qc/w_shotgun.qc

------=MIME.c5e278f80715b735f96c7570d9e775e0
Content-Type: text/plain; name="dpmod.20030727.070129.havoc.diff"
Content-Disposition: attachment; filename="dpmod.20030727.070129.havoc.diff"
Content-Transfer-Encoding: 8bit

Index: dpmod/qc/client.qc
diff -u dpmod/qc/client.qc:1.10 dpmod/qc/client.qc:1.11
--- dpmod/qc/client.qc:1.10	Fri Jul 18 15:08:39 2003
+++ dpmod/qc/client.qc	Sun Jul 27 03:01:18 2003
@@ -145,7 +145,6 @@
 	parm7 = STARTSP_AMMO_CELLS;
 	parm8 = STARTSP_WEAPON; // selected weapon
 	parm9 = 0; // armortype * 100
-	parm10 = STARTSP_AMMO_XSHELLS;
 };
 
 void() SetChangeParms =
@@ -168,7 +167,6 @@
 	parm7 = Inventory_Quantity(self, "cells");
 	parm8 = self.weapon;
 	parm9 = self.armortype * 100;
-	parm10 = Inventory_Quantity(self, "xshells");
 };
 
 void() DecodeLevelParms =
Index: dpmod/qc/inventory.qc
diff -u dpmod/qc/inventory.qc:1.3 dpmod/qc/inventory.qc:1.4
--- dpmod/qc/inventory.qc:1.3	Sun Jul 27 02:19:17 2003
+++ dpmod/qc/inventory.qc	Sun Jul 27 03:01:18 2003
@@ -143,13 +143,6 @@
 	item.count1 = AMMOMAX_CELLS;
 	//item.bulkbase = 0;
 	//item.bulkpercount = 0.1;
-
-	item = ItemClass_Register("xshells");
-	setmodel(item, "progs/backpack.mdl");
-	setsize(item, '-16 -16 -24', '16 16 8');
-	item.count1 = AMMOMAX_XSHELLS;
-	//item.bulkbase = 0;
-	//item.bulkpercount = 0.1;
 };
 
 entity(string name) ItemClass_FindByName =
@@ -719,20 +712,6 @@
 		}
 	}
 	return Inventory_Quantity(character, name);
-*/
-	/*
-	if (name == "shells")
-		return (character.ammo_shells = bound(0, character.ammo_shells + n, AMMOMAX_SHELLS));
-	if (name == "nails")
-		return (character.ammo_nails = bound(0, character.ammo_nails + n, AMMOMAX_NAILS));
-	if (name == "rockets")
-		return (character.ammo_rockets = bound(0, character.ammo_rockets + n, AMMOMAX_ROCKETS));
-	if (name == "cells")
-		return (character.ammo_cells = bound(0, character.ammo_cells + n, AMMOMAX_CELLS));
-	if (name == "xshells")
-		return (character.ammo_xshells = bound(0, character.ammo_xshells + n, AMMOMAX_XSHELLS));
-	*/
-/*
 };
 */
 
@@ -740,20 +719,6 @@
 float(entity character, string name, float n) Inventory_SetQuantity =
 {
 	return Inventory_AdjustQuantityAllByName(character, name, n - Inventory_QuantityAllByName(character, name));
-*/
-	/*
-	if (name == "shells")
-		return (character.ammo_shells = bound(0, n, AMMOMAX_SHELLS));
-	if (name == "nails")
-		return (character.ammo_nails = bound(0, n, AMMOMAX_NAILS));
-	if (name == "rockets")
-		return (character.ammo_rockets = bound(0, n, AMMOMAX_ROCKETS));
-	if (name == "cells")
-		return (character.ammo_cells = bound(0, n, AMMOMAX_CELLS));
-	if (name == "xshells")
-		return (character.ammo_xshells = bound(0, n, AMMOMAX_XSHELLS));
-	*/
-/*
 };
 */
 
Index: dpmod/qc/item_ammo.qc
diff -u dpmod/qc/item_ammo.qc:1.5 dpmod/qc/item_ammo.qc:1.6
--- dpmod/qc/item_ammo.qc:1.5	Sat Jul 12 06:02:55 2003
+++ dpmod/qc/item_ammo.qc	Sun Jul 27 03:01:19 2003
@@ -77,12 +77,10 @@
 float(entity player, entity item) item_nails_pickupeval = {if (Inventory_Quantity(player, "nails") < AMMOMAX_NAILS) return (AMMOMAX_NAILS - Inventory_Quantity(player, "nails")) * (AMMOMAX_NAILS - Inventory_Quantity(player, "nails")) * item.dmg;else return 0;};
 float(entity player, entity item) item_rockets_pickupeval = {if (Inventory_Quantity(player, "rockets") < AMMOMAX_ROCKETS) return (AMMOMAX_ROCKETS - Inventory_Quantity(player, "rockets")) * (AMMOMAX_ROCKETS - Inventory_Quantity(player, "rockets")) * item.dmg;else return 0;};
 float(entity player, entity item) item_cells_pickupeval = {if (Inventory_Quantity(player, "cells") < AMMOMAX_CELLS) return (AMMOMAX_CELLS - Inventory_Quantity(player, "cells")) * (AMMOMAX_CELLS - Inventory_Quantity(player, "cells")) * item.dmg;else return 0;};
-//float(entity player, entity item) item_xshells_pickupeval = {if (Inventory_Quantity(player, "xshells") < AMMOMAX_XSHELLS) return (AMMOMAX_XSHELLS - Inventory_Quantity(player, "xshells")) * (AMMOMAX_XSHELLS - Inventory_Quantity(player, "xshells")) * item.dmg;else return 0;};
 
 /*QUAKED item_shells (0 .5 .8) (0 0 0) (32 32 32)
 */
 
-//float spawnxshells;
 void() item_shells =
 {
 	self.touch = ammo_touch;
@@ -111,18 +109,6 @@
 	self.havocpickup = TRUE;
 	self.dmg = 60 * self.aflag / (AMMOMAX_SHELLS * AMMOMAX_SHELLS);
 	self.pickupevalfunc = item_shells_pickupeval;
-
-	/*
-	spawnxshells = spawnxshells + 1;
-	if (spawnxshells & 1)
-	{
-		self.ammo_typestring = "xshells";
-		self.weapon = 5;
-		self.netname = "You got some shotgun explosive slugs\n";
-		self.dmg = 110 * self.aflag / (AMMOMAX_XSHELLS * AMMOMAX_XSHELLS);
-		self.pickupevalfunc = item_xshells_pickupeval;
-	}
-	*/
 
 	StartItem ();
 };
Index: dpmod/qc/item_weapons.qc
diff -u dpmod/qc/item_weapons.qc:1.7 dpmod/qc/item_weapons.qc:1.8
--- dpmod/qc/item_weapons.qc:1.7	Wed Jul 16 08:16:45 2003
+++ dpmod/qc/item_weapons.qc	Sun Jul 27 03:01:19 2003
@@ -26,7 +26,6 @@
 	if ((Inventory_Quantity(other, "nails") >= AMMOMAX_NAILS  ) || (Inventory_Quantity(self, "nails") < 1))
 	if ((Inventory_Quantity(other, "rockets") >= AMMOMAX_ROCKETS) || (Inventory_Quantity(self, "rockets") < 1))
 	if ((Inventory_Quantity(other, "cells") >= AMMOMAX_CELLS  ) || (Inventory_Quantity(self, "cells") < 1))
-	if ((Inventory_Quantity(other, "xshells") >= AMMOMAX_XSHELLS) || (Inventory_Quantity(self, "xshells") < 1))
 		return; // would gain no ammo or weapon
 
 	// if the player was using their best weapon, change up to the new one if better
@@ -42,7 +41,6 @@
 		if (Inventory_Quantity(self, "nails")) if (Inventory_Quantity(other, "nails") < Inventory_Quantity(self, "nails")) Inventory_SetQuantity(other, "nails", Inventory_Quantity(self, "nails")); else Inventory_AdjustQuantity(other, "nails", AMMOWEAPONOVERFLOW_NAILS);
 		if (Inventory_Quantity(self, "rockets")) if (Inventory_Quantity(other, "rockets") < Inventory_Quantity(self, "rockets")) Inventory_SetQuantity(other, "rockets", Inventory_Quantity(self, "rockets")); else Inventory_AdjustQuantity(other, "rockets", AMMOWEAPONOVERFLOW_ROCKETS);
 		if (Inventory_Quantity(self, "cells")) if (Inventory_Quantity(other, "cells") < Inventory_Quantity(self, "cells")) Inventory_SetQuantity(other, "cells", Inventory_Quantity(self, "cells")); else Inventory_AdjustQuantity(other, "cells", AMMOWEAPONOVERFLOW_CELLS);
-		if (Inventory_Quantity(self, "xshells")) if (Inventory_Quantity(other, "xshells") < Inventory_Quantity(self, "xshells")) Inventory_SetQuantity(other, "xshells", Inventory_Quantity(self, "xshells")); else Inventory_AdjustQuantity(other, "xshells", AMMOWEAPONOVERFLOW_XSHELLS);
 	}
 	else
 	{
@@ -50,7 +48,6 @@
 		Inventory_AdjustQuantity(other, "nails", Inventory_Quantity(self, "nails"));
 		Inventory_AdjustQuantity(other, "rockets", Inventory_Quantity(self, "rockets"));
 		Inventory_AdjustQuantity(other, "cells", Inventory_Quantity(self, "cells"));
-		Inventory_AdjustQuantity(other, "xshells", Inventory_Quantity(self, "xshells"));
 	}
 
 	if (other.flags & FL_CLIENT)
@@ -121,13 +118,10 @@
 	if (Inventory_Quantity(item, "cells"))
 	if (Inventory_Quantity(player, "cells") < AMMOMAX_CELLS)
 		f = f + (AMMOMAX_CELLS - Inventory_Quantity(player, "cells")) * (AMMOMAX_CELLS - Inventory_Quantity(player, "cells")) * 30 * Inventory_Quantity(item, "cells") / (AMMOMAX_CELLS * AMMOMAX_CELLS);
-	if (Inventory_Quantity(item, "xshells"))
-	if (Inventory_Quantity(player, "xshells") < AMMOMAX_XSHELLS)
-		f = f + (AMMOMAX_XSHELLS - Inventory_Quantity(player, "xshells")) * (AMMOMAX_XSHELLS - Inventory_Quantity(player, "xshells")) * 110 * Inventory_Quantity(item, "xshells") / (AMMOMAX_XSHELLS * AMMOMAX_XSHELLS);
 	return f;
 };
 
-void(string wmdl, float w, float shells, float nails, float rockets, float cells, float xshells, string name) weapon_spawnhandler =
+void(string wmdl, float w, float shells, float nails, float rockets, float cells, string name) weapon_spawnhandler =
 {
 	self.havocpickup = TRUE;
 	self.pickupevalfunc = item_weapon_pickupeval;
@@ -142,19 +136,16 @@
 		if (nails) nails = 99999;
 		if (rockets) rockets = 99999;
 		if (cells) cells = 99999;
-		if (xshells) xshells = 99999;
 	}
 	*/
 	Inventory_SetQuantity(self, "shells", shells);
 	Inventory_SetQuantity(self, "nails", nails);
 	Inventory_SetQuantity(self, "rockets", rockets);
 	Inventory_SetQuantity(self, "cells", cells);
-	Inventory_SetQuantity(self, "xshells", xshells);
 //	self.havocrating = self.havocrating + Inventory_Quantity(self, "shells") * 60;
 //	self.havocrating = self.havocrating + Inventory_Quantity(self, "nails") * 15;
 //	self.havocrating = self.havocrating + Inventory_Quantity(self, "rockets") * 120;
 //	self.havocrating = self.havocrating + Inventory_Quantity(self, "cells") * 30;
-//	self.havocrating = self.havocrating + Inventory_Quantity(self, "xshells") * 110;
 	self.touch = weapon_touch;
 	setsize (self, '-16 -16 0', '16 16 32');
 	StartItem ();
@@ -162,26 +153,26 @@
 
 /*QUAKED weapon_supershotgun (0 .5 .8) (-16 -16 0) (16 16 32)
 */
-void() weapon_supershotgun    = {weapon_spawnhandler("progs/g_shot.mdl" , IT_WEAPON3,  30,   0,   0,   0,   0, "You got the Super Shotgun!\n");};
+void() weapon_supershotgun    = {weapon_spawnhandler("progs/g_shot.mdl" , IT_WEAPON3,  30,   0,   0,   0, "You got the Super Shotgun!\n");};
 
 /*QUAKED weapon_nailgun (0 .5 .8) (-16 -16 0) (16 16 32)
 */
-void() weapon_nailgun         = {weapon_spawnhandler("progs/g_nail.mdl" , IT_WEAPON4,   0,  50,   0,   0,   0, "You got the Nailgun!\n");};
+void() weapon_nailgun         = {weapon_spawnhandler("progs/g_nail.mdl" , IT_WEAPON4,   0,  50,   0,   0, "You got the Nailgun!\n");};
 
 /*QUAKED weapon_supernailgun (0 .5 .8) (-16 -16 0) (16 16 32)
 */
-void() weapon_supernailgun    = {weapon_spawnhandler("progs/g_nail2.mdl", IT_WEAPON5,   0,  50,   0,   0,   0, "You got the Super Nailgun!\n");};
+void() weapon_supernailgun    = {weapon_spawnhandler("progs/g_nail2.mdl", IT_WEAPON5,   0,  50,   0,   0, "You got the Super Nailgun!\n");};
 
 /*QUAKED weapon_grenadelauncher (0 .5 .8) (-16 -16 0) (16 16 32)
 */
-void() weapon_grenadelauncher = {weapon_spawnhandler("progs/g_rock.mdl" , IT_WEAPON6,   0,   0,  10,   0,   0, "You got the Proximity Grenade Launcher!\n");};
+void() weapon_grenadelauncher = {weapon_spawnhandler("progs/g_rock.mdl" , IT_WEAPON6,   0,   0,  10,   0, "You got the Proximity Grenade Launcher!\n");};
 
 /*QUAKED weapon_rocketlauncher (0 .5 .8) (-16 -16 0) (16 16 32)
 */
-void() weapon_rocketlauncher  = {weapon_spawnhandler("progs/g_rock2.mdl", IT_WEAPON7,   0,   0,  10,   0,   0, "You got the Rocket Launcher!\n");};
+void() weapon_rocketlauncher  = {weapon_spawnhandler("progs/g_rock2.mdl", IT_WEAPON7,   0,   0,  10,   0, "You got the Rocket Launcher!\n");};
 
 /*QUAKED weapon_lightning (0 .5 .8) (-16 -16 0) (16 16 32)
 */
-void() weapon_lightning       = {weapon_spawnhandler("progs/g_light.mdl" , IT_WEAPON8 | IT_WEAPON9 | IT_WEAPON10,   0,   0,   0,  20,   0, "You got the Plasma Gun!\n");};
-//void() weapon_lightning       = {weapon_spawnhandler("progs/g_light.mdl" , IT_WEAPON8 | IT_WEAPON9,   0,   0,   0,  50,   0, "You got the Plasma Gun!\n");};
+void() weapon_lightning       = {weapon_spawnhandler("progs/g_light.mdl" , IT_WEAPON8 | IT_WEAPON9 | IT_WEAPON10,   0,   0,   0,  20, "You got the Plasma Gun!\n");};
+//void() weapon_lightning       = {weapon_spawnhandler("progs/g_light.mdl" , IT_WEAPON8 | IT_WEAPON9,   0,   0,   0,  50, "You got the Plasma Gun!\n");};
 
Index: dpmod/qc/w_dbshotgun.qc
diff -u dpmod/qc/w_dbshotgun.qc:1.12 dpmod/qc/w_dbshotgun.qc:1.13
--- dpmod/qc/w_dbshotgun.qc:1.12	Wed Jul 16 08:16:45 2003
+++ dpmod/qc/w_dbshotgun.qc	Sun Jul 27 03:01:19 2003
@@ -1,5 +1,5 @@
 
-void(entity targ, entity attacker, string dmsg, float dtype) Obituary_DBShotgunSingle_Buckshot =
+void(entity targ, entity attacker, string dmsg, float dtype) Obituary_DBShotgunSingle =
 {
 	if (dtype == DTYPE_PLAYER)
 	{
@@ -12,33 +12,10 @@
 		Obituary_Fallback(targ, attacker, dmsg, dtype);
 };
 
-void(entity targ, entity attacker, string dmsg, float dtype) Obituary_DBShotgunSingle_Explosive =
+void(entity targ, entity attacker, string dmsg, float dtype) Obituary_DBShotgunDouble =
 {
 	if (dtype == DTYPE_PLAYER)
 	{
-		if (targ.bodyhealth < 1)
-		{
-			deathstring1 = targ.netname;
-			deathstring2 = " was blown apart by an explosive slug from ";
-			deathstring3 = attacker.netname;
-			deathstring4 = "";
-		}
-		else
-		{
-			deathstring1 = targ.netname;
-			deathstring2 = " met an explosive slug from ";
-			deathstring3 = attacker.netname;
-			deathstring4 = "";
-		}
-	}
-	else
-		Obituary_Fallback(targ, attacker, dmsg, dtype);
-};
-
-void(entity targ, entity attacker, string dmsg, float dtype) Obituary_DBShotgunDouble_Buckshot =
-{
-	if (dtype == DTYPE_PLAYER)
-	{
 		deathstring1 = targ.netname;
 		deathstring2 = " took both barrels from ";
 		deathstring3 = attacker.netname;
@@ -48,37 +25,12 @@
 		Obituary_Fallback(targ, attacker, dmsg, dtype);
 };
 
-void(entity targ, entity attacker, string dmsg, float dtype) Obituary_DBShotgunDouble_Explosive =
-{
-	if (dtype == DTYPE_PLAYER)
-	{
-		if (targ.bodyhealth < 1)
-		{
-			deathstring1 = targ.netname;
-			deathstring2 = " was blown apart by two explosive slugs from ";
-			deathstring3 = attacker.netname;
-			deathstring4 = "";
-		}
-		else
-		{
-			deathstring1 = targ.netname;
-			deathstring2 = " took two explosive slugs from ";
-			deathstring3 = attacker.netname;
-			deathstring4 = "";
-		}
-	}
-	else
-		Obituary_Fallback(targ, attacker, dmsg, dtype);
-};
+float DBSHOTGUN = 50;
 
-float DBSHOTGUNBUCKSHOT = 50;
-float DBSHOTGUNEXPLOSIVESLUG = 50;
-
 .float shotgunshells;
 
 /*
-.float shotgunmode;
-void(void(entity t, entity a, string m, float dtyp) obitfunc, float spreadboost, float explosive) W_DBShotgunFireShell =
+void(void(entity t, entity a, string m, float dtyp) obitfunc, float spreadboost) W_DBShotgunFireShell =
 {
 	local vector v;
 
@@ -94,50 +46,27 @@
 		shotorg = shotorg + v_right;
 	}
 	self.wload = self.wload - 1;
-*/
-	/*
-	if (self.shotgunmode)
-		Inventory_AdjustQuantity(self, "xshells", -1);
-	else
-	*/
-/*
-		Inventory_AdjustQuantity(self, "shells", -1);
+	Inventory_AdjustQuantity(self, "shells", -1);
 	self.wfiretime = time;
 	w_muzzleflash(v, 4);
-	if (explosive)
-		FireBullets(self, self, 1, 1, 0, 0, DBSHOTGUNEXPLOSIVESLUG, 80, shotdir * 5000, spreadboost, "SHOTGUNEXPLOSIVESLUG", DT_SHOTGUN, obitfunc);
-	else
-	{
-		FireBullets(self, self, 1, 5, DBSHOTGUNBUCKSHOT * 0.1, DBSHOTGUNBUCKSHOT * 0.1, 0, 0, shotdir * 6000, spreadboost + 0.03, "SHOTGUN", DT_SHOTGUN, obitfunc);
-		FireBullets(self, self, 0, 5, DBSHOTGUNBUCKSHOT * 0.1, DBSHOTGUNBUCKSHOT * 0.1, 0, 0, shotdir * 6000, spreadboost + 0.03, "SHOTGUN", DT_SHOTGUN, obitfunc);
-	}
+	FireBullets(self, self, 1, 5, DBSHOTGUN * 0.1, DBSHOTGUN * 0.1, 0, 0, shotdir * 6000, spreadboost + 0.03, "SHOTGUN", DT_SHOTGUN, obitfunc);
+	FireBullets(self, self, 0, 5, DBSHOTGUN * 0.1, DBSHOTGUN * 0.1, 0, 0, shotdir * 6000, spreadboost + 0.03, "SHOTGUN", DT_SHOTGUN, obitfunc);
 	shotorg = v;
 };
-
-void() W_DBShotgunSingleFireCode_Buckshot =
-{
-	W_DBShotgunFireShell(Obituary_DBShotgunSingle_Buckshot, 0, FALSE);
-};
 
-void() W_DBShotgunSingleFireCode_Explosive =
+void() W_DBShotgunSingleFireCode =
 {
-	W_DBShotgunFireShell(Obituary_DBShotgunSingle_Explosive, 0, TRUE);
+	W_DBShotgunFireShell(Obituary_DBShotgunSingle, 0, FALSE);
 };
 
-void() W_DBShotgunDoubleFireCode_Buckshot =
+void() W_DBShotgunDoubleFireCode =
 {
 	while (self.wload > 0)
-		W_DBShotgunFireShell(Obituary_DBShotgunDouble_Buckshot, 0, FALSE);
+		W_DBShotgunFireShell(Obituary_DBShotgunDouble, 0, FALSE);
 };
-
-void() W_DBShotgunDoubleFireCode_Explosive =
-{
-	while (self.wload > 0)
-		W_DBShotgunFireShell(Obituary_DBShotgunDouble_Explosive, 0, TRUE);
-};
 */
 
-void(void(entity t, entity a, string m, float dtyp) obitfunc, float spreadboost, float explosive) W_DBShotgunGatlingFireShell =
+void(void(entity t, entity a, string m, float dtyp) obitfunc, float spreadboost) W_DBShotgunGatlingFireShell =
 {
 	local vector v;
 
@@ -154,32 +83,19 @@
 		self.shotgunshells = self.shotgunshells + 2;
 		shotorg = shotorg + v_right;
 	}
-	/*
-	if (self.shotgunmode)
-		Inventory_AdjustQuantity(self, "xshells", -1);
-	else
-	*/
-		Inventory_AdjustQuantity(self, "shells", -1);
+	Inventory_AdjustQuantity(self, "shells", -1);
 	self.wfiretime = time;
 	w_muzzleflash(v, 2);
-	if (explosive)
-		FireBullets(self, self, 1, 1, 0, 0, DBSHOTGUNEXPLOSIVESLUG, 80, shotdir * 5000, spreadboost, "SHOTGUNEXPLOSIVESLUG", DT_SHOTGUN, obitfunc);
-	else
-	{
-		FireBullets(self, self, 1, 5, DBSHOTGUNBUCKSHOT * 0.1, DBSHOTGUNBUCKSHOT * 0.1, 0, 0, shotdir * 6000, spreadboost + 0.03, "SHOTGUN", DT_SHOTGUN, obitfunc);
-		FireBullets(self, self, 0, 5, DBSHOTGUNBUCKSHOT * 0.1, DBSHOTGUNBUCKSHOT * 0.1, 0, 0, shotdir * 6000, spreadboost + 0.03, "SHOTGUN", DT_SHOTGUN, obitfunc);
-	}
+	FireBullets(self, self, 1, 5, DBSHOTGUN * 0.1, DBSHOTGUN * 0.1, 0, 0, shotdir * 6000, spreadboost + 0.03, "SHOTGUN", DT_SHOTGUN, obitfunc);
+	FireBullets(self, self, 0, 5, DBSHOTGUN * 0.1, DBSHOTGUN * 0.1, 0, 0, shotdir * 6000, spreadboost + 0.03, "SHOTGUN", DT_SHOTGUN, obitfunc);
 	shotorg = v;
 };
 
-void(float fireexplosive) W_DBShotgunGatlingFireCode =
+void() W_DBShotgunGatlingFireCode =
 {
 	W_Hostile();
 	sound(self, CHAN_WEAPON, "weapons/shotgn2.wav", 1, ATTN_NORM);
-	if (fireexplosive)
-		W_DBShotgunGatlingFireShell(Obituary_DBShotgunSingle_Explosive, 0, TRUE);
-	else
-		W_DBShotgunGatlingFireShell(Obituary_DBShotgunSingle_Buckshot, 0, FALSE);
+	W_DBShotgunGatlingFireShell(Obituary_DBShotgunSingle, 0);
 };
 
 
@@ -195,35 +111,8 @@
 	if (widle(w_dbshotgundrop1))
 		return;
 
-	/*
-	if (self.shotgunmode)
-	{
-		swapmode = Inventory_Quantity(self, "xshells") < 1 && Inventory_Quantity(self, "shells") >= 1;
-		otherammo = Inventory_Quantity(self, "shells") >= 1;
-	}
-	else
-	{
-		swapmode = Inventory_Quantity(self, "shells") < 1 && Inventory_Quantity(self, "xshells") >= 1;
-		otherammo = Inventory_Quantity(self, "xshells") >= 1;
-	}
-
-	if (otherammo)
-	if (self.button5 || swapmode)
 	if (time > self.attack_finished)
 	{
-		self.shotgunmode = !self.shotgunmode;
-		self.wload = 0;
-		sound(self, CHAN_AUTO, "weapons/bsgload.wav", 1, ATTN_STATIC);
-		self.attack_finished = time + 1;
-		if (self.shotgunmode)
-			sprint(self, "Ammo: Explosive slugs\n");
-		else
-			sprint(self, "Ammo: Buckshot\n");
-	}
-	*/
-
-	if (time > self.attack_finished)
-	{
 		if (self.shotgunshells)
 		{
 			sound(self, CHAN_AUTO, "weapons/bsgload.wav", 1, ATTN_STATIC);
@@ -233,23 +122,17 @@
 			if (self.shotgunshells & 2) ejectcasing (v + v_right * -1, '0 0 0', 30, ang, '0 0 0', 150, 1);
 			self.shotgunshells = 0;
 		}
-		if (self.button0 || self.button3)
+		if (self.button0)
 		if (Inventory_Quantity(self, "shells") > 0)
 		if (W_ShotsToFire(0.2))
-			W_DBShotgunGatlingFireCode(self.button3);
+			W_DBShotgunGatlingFireCode();
 	}
 
 	/*
 	if (self.wload > 0)
 	{
 		if (self.button0)
-			//W_GenericSlowFireCode("weapons/shotgn2.wav", 0.2, W_DBShotgunSingleFireCode_Buckshot);
-			//W_GenericSlowFireCode("weapons/shotgn2.wav", 0.2, W_DBShotgunDoubleFireCode_Buckshot);
-			W_GenericSlowFireCode("weapons/shotgn2.wav", 0.2, W_DBShotgunSingleFireCode_Buckshot);
-		else if (self.button3)
-			//W_GenericSlowFireCode("weapons/shotgn2.wav", 0.2, W_DBShotgunDoubleFireCode_Buckshot);
-			//W_GenericSlowFireCode("weapons/shotgn2.wav", 0.2, W_DBShotgunDoubleFireCode_Explosive);
-			W_GenericSlowFireCode("weapons/shotgn2.wav", 0.2, W_DBShotgunSingleFireCode_Explosive);
+			W_GenericSlowFireCode("weapons/shotgn2.wav", 0.2, W_DBShotgunSingleFireCode);
 	}
 	else
 	{
@@ -267,28 +150,12 @@
 			}
 			else
 			{
-	*/
-				/*
-				if (self.shotgunmode)
+				if (Inventory_Quantity(self, "shells") >= 1)
 				{
-					if (Inventory_Quantity(self, "xshells") >= 1)
-					{
-						self.wload = min(Inventory_Quantity(self, "xshells"), 2);
-						self.attack_finished = time + 0.2;
-						sound(self, CHAN_AUTO, "weapons/bsgload.wav", 1, ATTN_STATIC);
-					}
+					self.wload = min(Inventory_Quantity(self, "shells"), 2);
+					self.attack_finished = time + 0.2;
+					sound(self, CHAN_AUTO, "weapons/bsgload.wav", 1, ATTN_STATIC);
 				}
-				else
-				*/
-	/*
-				{
-					if (Inventory_Quantity(self, "shells") >= 1)
-					{
-						self.wload = min(Inventory_Quantity(self, "shells"), 2);
-						self.attack_finished = time + 0.2;
-						sound(self, CHAN_AUTO, "weapons/bsgload.wav", 1, ATTN_STATIC);
-					}
-				}
 			}
 		}
 	}
@@ -318,16 +185,8 @@
 };
 
 float() w_dbshotgunrating = {return genericweaponrating(0, 250, 175);};
-void() w_dbshotgunsetup =
-{
-	/*
-	if (self.shotgunmode)
-		wset(IT_WEAPON3, IT_SHELLS, Inventory_Quantity(self, "xshells"), VWEP_SUPER_SHOTGUN, "progs/v_dpshot2.mdl");
-	else
-	*/
-		wset(IT_WEAPON3, IT_SHELLS, Inventory_Quantity(self, "shells"), VWEP_SUPER_SHOTGUN, "progs/v_dpshot2.mdl");
-};
-float(float request) setweapon3 = {return weapongeneric(IT_WEAPON3, Inventory_Quantity(self, "shells") >= 1/* || Inventory_Quantity(self, "xshells") >= 1*/, request, w_dbshotgunsetup, w_dbshotgun, w_dbshotgunraise1, w_directaim, w_dbshotgunrating, "Double Barrel Shotgun");};
+void() w_dbshotgunsetup = {wset(IT_WEAPON3, IT_SHELLS, Inventory_Quantity(self, "shells"), VWEP_SUPER_SHOTGUN, "progs/v_dpshot2.mdl");};
+float(float request) setweapon3 = {return weapongeneric(IT_WEAPON3, Inventory_Quantity(self, "shells") >= 1, request, w_dbshotgunsetup, w_dbshotgun, w_dbshotgunraise1, w_directaim, w_dbshotgunrating, "Double Barrel Shotgun");};
 
 void() w_dbshotgunraise1 = {self.wload = 0;self.shotgunshells = 0;wraise(9, w_dbshotgunraise2, 0.1);};
 void() w_dbshotgunraise2 = {wraise(8, w_dbshotgun, 0.1);};
Index: dpmod/qc/w_shotgun.qc
diff -u dpmod/qc/w_shotgun.qc:1.11 dpmod/qc/w_shotgun.qc:1.12
--- dpmod/qc/w_shotgun.qc:1.11	Wed Jul 16 08:16:45 2003
+++ dpmod/qc/w_shotgun.qc	Sun Jul 27 03:01:19 2003
@@ -12,24 +12,17 @@
 		Obituary_Fallback(targ, attacker, dmsg, dtype);
 };
 
-float SHOTGUNBUCKSHOT = 50;
-float SHOTGUNEXPLOSIVESLUG = 50;
+float SHOTGUN = 50;
 
-.float shotgunmode;
-void(float fireexplosive) W_SingleShotgunFireCode =
+void() W_SingleShotgunFireCode =
 {
 	W_Hostile();
 	sound(self, CHAN_WEAPON, "weapons/shotgn2.wav", 1, ATTN_NORM);
 	self.wfiretime = time;
 	Inventory_AdjustQuantity(self, "shells", -1);
 	w_muzzleflash(shotorg, 2);
-	if (fireexplosive)
-		FireBullets(self, self, 1, 1, SHOTGUNEXPLOSIVESLUG * 0.2, SHOTGUNEXPLOSIVESLUG * 0.2, SHOTGUNEXPLOSIVESLUG * 0.8, 80, shotdir * 5000, 0, "SHOTGUNEXPLOSIVESLUG", DT_SHOTGUN, Obituary_Shotgun);
-	else
-	{
-		FireBullets(self, self, 1, 5, SHOTGUNBUCKSHOT * 0.1, SHOTGUNBUCKSHOT * 0.1, 0, 0, shotdir * 6000, 0.05, "SHOTGUN", DT_SHOTGUN, Obituary_Shotgun);
-		FireBullets(self, self, 0, 5, SHOTGUNBUCKSHOT * 0.1, SHOTGUNBUCKSHOT * 0.1, 0, 0, shotdir * 6000, 0.05, "SHOTGUN", DT_SHOTGUN, Obituary_Shotgun);
-	}
+	FireBullets(self, self, 1, 5, SHOTGUN * 0.1, SHOTGUN * 0.1, 0, 0, shotdir * 6000, 0.05, "SHOTGUN", DT_SHOTGUN, Obituary_Shotgun);
+	FireBullets(self, self, 0, 5, SHOTGUN * 0.1, SHOTGUN * 0.1, 0, 0, shotdir * 6000, 0.05, "SHOTGUN", DT_SHOTGUN, Obituary_Shotgun);
 	self.wload = -1;
 };
 
@@ -43,28 +36,14 @@
 	if (widle(w_shotgundrop1))
 		return;
 
-	/*
-	if (self.button5)
-	if (time > self.attack_finished)
-	{
-		self.shotgunmode = !self.shotgunmode;
-		sound(self, CHAN_AUTO, "weapons/bsgload.wav", 1, ATTN_STATIC);
-		self.attack_finished = time + 1;
-		if (self.shotgunmode)
-			sprint(self, "Ammo: Explosive slugs\n");
-		else
-			sprint(self, "Ammo: Buckshot\n");
-	}
-	*/
-
 	if (self.wload > Inventory_Quantity(self, "shells"))
 		self.wload = Inventory_Quantity(self, "shells");
 
-	if (self.button0 || self.button3)
+	if (self.button0)
 	{
 		if (self.wload >= 1) // is it loaded?
 		if (W_ShotsToFire(0.3))
-			W_SingleShotgunFireCode(self.button3);
+			W_SingleShotgunFireCode();
 	}
 
 	if (self.wload < 1 && time > self.attack_finished)


More information about the twilight-commits mailing list