Module dpmod: Change committed

havoc at icculus.org havoc at icculus.org
Wed Jul 16 08:16:55 EDT 2003


Commiter   : havoc
CVSROOT    : /cvs/cvsroot/twilight
Module     : dpmod
Commit time: 2003-07-16 12:16:55 UTC

Log message:

moved damagescale code to T_Damage and made it more clear that it is for players only by naming it playerdamagescale
coop setting no longer scales monster health per say, but instead damage received from players, and thus migrates to T_Damage as well, this means coop setting can change during a level
bullet speeds raised a bit
sv_maxvelocity raised to 100000 (approximately mach 15 I think?)

Modified files:
     default.cfg qc/gibcomments.qc qc/item_sigil.qc qc/item_weapons.qc
     qc/m_boss.qc qc/m_demon.qc qc/m_dog.qc qc/m_enforcer.qc
     qc/m_fish.qc qc/m_hknight.qc qc/m_knight.qc qc/m_ogre.qc
     qc/m_shalrath.qc qc/m_shambler.qc qc/m_soldier.qc qc/m_tarbaby.qc
     qc/m_wizard.qc qc/mine.qc qc/mode_management.qc qc/t_damage.qc
     qc/w_dbshotgun.qc qc/w_grapple.qc qc/w_grenade.qc
     qc/w_lightning.qc qc/w_nailgun.qc qc/w_oldplasmarifle.qc
     qc/w_pistol.qc qc/w_plasmarifle.qc qc/w_plasmawave.qc
     qc/w_rocket.qc qc/w_shotgun.qc qc/w_supernailgun.qc qc/world.qc

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

Index: dpmod/default.cfg
diff -u dpmod/default.cfg:1.1.1.1 dpmod/default.cfg:1.2
--- dpmod/default.cfg:1.1.1.1	Thu Sep 19 14:54:48 2002
+++ dpmod/default.cfg	Wed Jul 16 08:16:45 2003
@@ -118,7 +118,9 @@
 
 teamplay "0?Dark Places - No Teamplay"
 
-sv_maxvelocity 10000 // normally 2000, but I wanted much faster shots :)
+// normally 2000, but I wanted much faster shots :)
+// (this is about mach 14 or something)
+sv_maxvelocity 100000
 
 // this is the keys config menu for darkplaces mod
 menu_clearkeyconfig
Index: dpmod/qc/gibcomments.qc
diff -u dpmod/qc/gibcomments.qc:1.1.1.1 dpmod/qc/gibcomments.qc:1.2
--- dpmod/qc/gibcomments.qc:1.1.1.1	Thu Sep 19 15:07:45 2002
+++ dpmod/qc/gibcomments.qc	Wed Jul 16 08:16:45 2003
@@ -1,25 +1,25 @@
 
 void() gibcomment_precache =
 {
-        /*
-        // gib comments (most lines are by Lord Havoc,
-        //               and all performed by Lord Havoc)
-        precache_sound("speech/gib/awesome.wav");
-        precache_sound("speech/gib/cool.wav");
-        precache_sound("speech/gib/gibsjust.wav");
-        precache_sound("speech/gib/groovy.wav");
-        precache_sound("speech/gib/hehehmes.wav");
-        precache_sound("speech/gib/lookbetr.wav");
-        precache_sound("speech/gib/mmmgibs.wav");
-        precache_sound("speech/gib/niceday.wav");
-        precache_sound("speech/gib/whatames.wav");
-        precache_sound("speech/gib/whoa.wav");
-        precache_sound("speech/gib/xtrachnk.wav");
-        // these lines were submitted by Terrorist
-        precache_sound("speech/gib/aisle12.wav");
-        precache_sound("speech/gib/scrapeof.wav");
-        precache_sound("speech/gib/needamop.wav");
-        */
+	/*
+	// gib comments (most lines are by Lord Havoc,
+	//               and all performed by Lord Havoc)
+	precache_sound("speech/gib/awesome.wav"); // awesome
+	precache_sound("speech/gib/cool.wav"); // cool
+	precache_sound("speech/gib/gibsjust.wav"); // gibs, just the way I like 'em
+	precache_sound("speech/gib/groovy.wav"); // groovy
+	precache_sound("speech/gib/hehehmes.wav"); // heheh, messy
+	precache_sound("speech/gib/lookbetr.wav"); // you look better dead
+	precache_sound("speech/gib/mmmgibs.wav"); // mmm... gibs...
+	precache_sound("speech/gib/niceday.wav"); // nice day for some gibbing
+	precache_sound("speech/gib/whatames.wav"); // what a mess
+	precache_sound("speech/gib/whoa.wav"); // whoa
+	precache_sound("speech/gib/xtrachnk.wav"); // extra chunky
+	// these lines were submitted by Terrorist
+	precache_sound("speech/gib/aisle12.wav"); // cleanup in aisle 12
+	precache_sound("speech/gib/scrapeof.wav"); // scrape him off the wall
+	precache_sound("speech/gib/needamop.wav"); // I need a mop
+	*/
 };
 
 // .float  dogibcomment;
@@ -33,7 +33,7 @@
         // chance of comment goes up with more gibs
         // note that this number includes how long they were seen
         c = floor(random()*20);
-        if (e.seengibs < c)     
+        if (e.seengibs < c)
                 return;
         */
         /*
Index: dpmod/qc/item_sigil.qc
diff -u dpmod/qc/item_sigil.qc:1.1.1.1 dpmod/qc/item_sigil.qc:1.2
--- dpmod/qc/item_sigil.qc:1.1.1.1	Thu Sep 19 15:07:31 2002
+++ dpmod/qc/item_sigil.qc	Wed Jul 16 08:16:45 2003
@@ -6,8 +6,6 @@
 ===============================================================================
 */
 
-float   monsterhealthscale;
-
 void() sigil_touch =
 {
 	// local entity    stemp, head;
@@ -69,7 +67,7 @@
 		precache_model2 ("progs/end4.mdl");
 		setmodel (self, "progs/end4.mdl");
 	}
-	
+
 	self.touch = sigil_touch;
 	setsize (self, '-16 -16 -24', '16 16 32');
 	StartItem ();
Index: dpmod/qc/item_weapons.qc
diff -u dpmod/qc/item_weapons.qc:1.6 dpmod/qc/item_weapons.qc:1.7
--- dpmod/qc/item_weapons.qc:1.6	Sat Jul 12 06:02:55 2003
+++ dpmod/qc/item_weapons.qc	Wed Jul 16 08:16:45 2003
@@ -78,13 +78,16 @@
 	activator = other;
 	SUB_UseTargets();				// fire all targets / killtargets
 
-	// remove it in single player, or setup for respawning in deathmatch
-	self.model = "";
-	self.solid = SOLID_NOT;
-	self.think = SUB_regen;
-	self.nextthink = time + RESPAWNTIME_WEAPON;
-	if (!itemrespawn)
-		remove(self);
+	if (deathmatch != 2)
+	{
+		// remove it in single player, or setup for respawning in deathmatch
+		self.model = "";
+		self.solid = SOLID_NOT;
+		self.think = SUB_regen;
+		self.nextthink = time + RESPAWNTIME_WEAPON;
+		if (!itemrespawn)
+			remove(self);
+	}
 };
 
 float(entity player, entity item) item_weapon_pickupeval =
Index: dpmod/qc/m_boss.qc
diff -u dpmod/qc/m_boss.qc:1.1.1.1 dpmod/qc/m_boss.qc:1.2
--- dpmod/qc/m_boss.qc:1.1.1.1	Thu Sep 19 15:07:27 2002
+++ dpmod/qc/m_boss.qc	Wed Jul 16 08:16:45 2003
@@ -12,7 +12,7 @@
 $scale 5
 
 $frame rise1 rise2 rise3 rise4 rise5 rise6 rise7 rise8 rise9 rise10
-$frame rise11 rise12 rise13 rise14 rise15 rise16 rise17 
+$frame rise11 rise12 rise13 rise14 rise15 rise16 rise17
 
 $frame walk1 walk2 walk3 walk4 walk5 walk6 walk7 walk8
 $frame walk9 walk10 walk11 walk12 walk13 walk14 walk15
@@ -27,11 +27,11 @@
 $frame attack23
 
 $frame shocka1 shocka2 shocka3 shocka4 shocka5 shocka6 shocka7 shocka8
-$frame shocka9 shocka10 
+$frame shocka9 shocka10
 
 $frame shockb1 shockb2 shockb3 shockb4 shockb5 shockb6
 
-$frame shockc1 shockc2 shockc3 shockc4 shockc5 shockc6 shockc7 shockc8 
+$frame shockc1 shockc2 shockc3 shockc4 shockc5 shockc6 shockc7 shockc8
 $frame shockc9 shockc10
 
 void(vector org, float bodydamage, float armordamage, vector vel, float damgtype) chthonbleedfunc =
@@ -215,11 +215,11 @@
 	local vector org, vec, d;
 	local float t, shotspeed;
 
-	shotspeed = (400*monsterhealthscale);
+	shotspeed = 400;
 	if (shotspeed > 1000)
 		shotspeed = 1000;
 
-	//offang = vectoangles (self.enemy.origin - self.origin); 
+	//offang = vectoangles (self.enemy.origin - self.origin);
 	//makevectors (offang);
 	//vectorvectors (self.enemy.origin - self.origin);
 	makevectors (self.angles);
Index: dpmod/qc/m_demon.qc
diff -u dpmod/qc/m_demon.qc:1.2 dpmod/qc/m_demon.qc:1.3
--- dpmod/qc/m_demon.qc:1.2	Fri Nov 15 07:59:54 2002
+++ dpmod/qc/m_demon.qc	Wed Jul 16 08:16:45 2003
@@ -134,7 +134,7 @@
 
 	if (random()*200 > damage)
 		return;		// didn't flinch
-		
+
 	demon1_pain1 ();
 };
 
@@ -384,7 +384,7 @@
 	setsize (self, '-32 -32 -24', '32 32 24');
 	if (!self.health)
 		self.health = MH_DEMON;
-	self.health = self.health * monsterhealthscale;
+	self.health = self.health;
 	self.bodyhealth = self.health + MB_DEMON;
 	self.bleedratio = 1; // demons are alive, and thus bleeding matters
 
Index: dpmod/qc/m_dog.qc
diff -u dpmod/qc/m_dog.qc:1.2 dpmod/qc/m_dog.qc:1.3
--- dpmod/qc/m_dog.qc:1.2	Thu Feb 20 03:49:38 2003
+++ dpmod/qc/m_dog.qc	Wed Jul 16 08:16:45 2003
@@ -381,7 +381,7 @@
 	setsize (self, '-16 -16 -24', '16 16 12');
 	if (!self.health)
 		self.health = MH_DOG;
-	self.health = self.health * monsterhealthscale;
+	self.health = self.health;
 	self.bodyhealth = self.health + MB_DOG;
 	self.bleedratio = 0.75; // hardwired chemical enhanced dogs
 
Index: dpmod/qc/m_enforcer.qc
diff -u dpmod/qc/m_enforcer.qc:1.5 dpmod/qc/m_enforcer.qc:1.6
--- dpmod/qc/m_enforcer.qc:1.5	Sat Jul 12 06:02:55 2003
+++ dpmod/qc/m_enforcer.qc	Wed Jul 16 08:16:45 2003
@@ -393,7 +393,7 @@
 	setsize (self, '-16 -16 -24', '16 16 24');
 	if (!self.health)
 		self.health = MH_ENFORCER;
-	self.health = self.health * monsterhealthscale;
+	self.health = self.health;
 	self.bodyhealth = self.health + MB_ENFORCER;
 	self.bleedratio = 0.25; // not much health damage due to armor suit
 	self.radsuit_finished = 99999999;
Index: dpmod/qc/m_fish.qc
diff -u dpmod/qc/m_fish.qc:1.1.1.1 dpmod/qc/m_fish.qc:1.2
--- dpmod/qc/m_fish.qc:1.1.1.1	Thu Sep 19 15:07:55 2002
+++ dpmod/qc/m_fish.qc	Wed Jul 16 08:16:45 2003
@@ -1,22 +1,22 @@
 $cd id1/models/fish
 $origin 0 0 24
-$base base		
+$base base
 $skin skin
 
-$frame attack1 attack2 attack3 attack4 attack5 attack6 
-$frame attack7 attack8 attack9 attack10 attack11 attack12 attack13 
-$frame attack14 attack15 attack16 attack17 attack18 
-
-$frame death1 death2 death3 death4 death5 death6 death7 
-$frame death8 death9 death10 death11 death12 death13 death14 death15 
-$frame death16 death17 death18 death19 death20 death21 
-
-$frame swim1 swim2 swim3 swim4 swim5 swim6 swim7 swim8 
-$frame swim9 swim10 swim11 swim12 swim13 swim14 swim15 swim16 swim17 
-$frame swim18 
+$frame attack1 attack2 attack3 attack4 attack5 attack6
+$frame attack7 attack8 attack9 attack10 attack11 attack12 attack13
+$frame attack14 attack15 attack16 attack17 attack18
+
+$frame death1 death2 death3 death4 death5 death6 death7
+$frame death8 death9 death10 death11 death12 death13 death14 death15
+$frame death16 death17 death18 death19 death20 death21
+
+$frame swim1 swim2 swim3 swim4 swim5 swim6 swim7 swim8
+$frame swim9 swim10 swim11 swim12 swim13 swim14 swim15 swim16 swim17
+$frame swim18
 
-$frame pain1 pain2 pain3 pain4 pain5 pain6 pain7 pain8 
-$frame pain9 
+$frame pain1 pain2 pain3 pain4 pain5 pain6 pain7 pain8
+$frame pain9
 
 void() swimmonster_start;
 
@@ -201,7 +201,7 @@
 	setsize (self, '-16 -16 -24', '16 16 16');
 	if (!self.health)
 		self.health = MH_ROTFISH;
-	self.health = self.health * monsterhealthscale;
+	self.health = self.health;
 	self.bodyhealth = self.health + MB_ROTFISH;
 	self.candrown = 0;
 	self.bleedratio = 0.5; // rotfish are animated dead
Index: dpmod/qc/m_hknight.qc
diff -u dpmod/qc/m_hknight.qc:1.2 dpmod/qc/m_hknight.qc:1.3
--- dpmod/qc/m_hknight.qc:1.2	Thu Feb 20 03:51:54 2003
+++ dpmod/qc/m_hknight.qc	Wed Jul 16 08:16:45 2003
@@ -43,9 +43,9 @@
 $frame smash1 smash2 smash3 smash4 smash5 smash6 smash7 smash8 smash9 smash10
 $frame smash11
 
-$frame w_attack1 w_attack2 w_attack3 w_attack4 w_attack5 w_attack6 w_attack7 
+$frame w_attack1 w_attack2 w_attack3 w_attack4 w_attack5 w_attack6 w_attack7
 $frame w_attack8 w_attack9 w_attack10 w_attack11 w_attack12 w_attack13 w_attack14
-$frame w_attack15 w_attack16 w_attack17 w_attack18 w_attack19 w_attack20 
+$frame w_attack15 w_attack16 w_attack17 w_attack18 w_attack19 w_attack20
 $frame w_attack21 w_attack22
 
 $frame magicc1 magicc2 magicc3 magicc4 magicc5 magicc6 magicc7 magicc8
@@ -66,7 +66,7 @@
 */
 float() HellKnightCheckAttack =
 {
-	local vector	spot1, spot2;	
+	local vector	spot1, spot2;
 	local entity	targ;
 	local float		chance;
 
@@ -585,7 +585,7 @@
 		self.pain_finished = time + 1;
 		return;
 	}
-	
+
 	if ((random()*30 > damage) )
 		return;		// didn't flinch
 
@@ -791,7 +791,7 @@
 	setsize (self, '-16 -16 -24', '16 16 32');
 	if (!self.health)
 		self.health = MH_HELLKNIGHT;
-	self.health = self.health * monsterhealthscale;
+	self.health = self.health;
 	self.bodyhealth = self.health + MB_HELLKNIGHT;
 	self.bleedratio = 0.25; // not much health damage due to armor
 	// fire immunity
Index: dpmod/qc/m_knight.qc
diff -u dpmod/qc/m_knight.qc:1.1.1.1 dpmod/qc/m_knight.qc:1.2
--- dpmod/qc/m_knight.qc:1.1.1.1	Thu Sep 19 15:08:08 2002
+++ dpmod/qc/m_knight.qc	Wed Jul 16 08:16:45 2003
@@ -128,12 +128,12 @@
 void() knight_attack =
 {
 	local float		len;
-	
+
         if (self.health < 1)
                 return;
 // decide if now is a good swing time
 	len = vlen(self.enemy.origin+self.enemy.view_ofs - (self.origin+self.view_ofs));
-	
+
 	if (len<80)
 		knight_atk1 ();
 	else
@@ -166,7 +166,7 @@
 		return;
 
 	r = random();
-	
+
 	sound (self, CHAN_VOICE, "knight/khurt.wav", 1, ATTN_NORM);
 	if (r < 0.85)
 	{
@@ -178,7 +178,7 @@
 		knight_painb1 ();
 		self.pain_finished = time + 1;
 	}
-	
+
 };
 
 //===========================================================================
@@ -298,7 +298,7 @@
 	setsize (self, '-16 -16 -24', '16 16 24');
 	if (!self.health)
 		self.health = MH_KNIGHT;
-	self.health = self.health * monsterhealthscale;
+	self.health = self.health;
 	self.bodyhealth = self.health + MB_KNIGHT;
 	self.bleedratio = 0.5; // not much health damage due to armor
 
Index: dpmod/qc/m_ogre.qc
diff -u dpmod/qc/m_ogre.qc:1.5 dpmod/qc/m_ogre.qc:1.6
--- dpmod/qc/m_ogre.qc:1.5	Sat Jul 12 06:02:55 2003
+++ dpmod/qc/m_ogre.qc	Wed Jul 16 08:16:45 2003
@@ -497,7 +497,7 @@
 	setsize (self, '-32 -32 -24', '32 32 32');
 	if (self.health < 1)
 		self.health = MH_OGRE;
-	self.health = self.health * monsterhealthscale;
+	self.health = self.health;
 	self.bodyhealth = self.health + MB_OGRE;
 	self.bleedratio = 0.5; // not much health damage due to armor
 
Index: dpmod/qc/m_shalrath.qc
diff -u dpmod/qc/m_shalrath.qc:1.1.1.1 dpmod/qc/m_shalrath.qc:1.2
--- dpmod/qc/m_shalrath.qc:1.1.1.1	Thu Sep 19 15:07:59 2002
+++ dpmod/qc/m_shalrath.qc	Wed Jul 16 08:16:45 2003
@@ -14,7 +14,7 @@
 $frame attack1 attack2 attack3 attack4 attack5 attack6 attack7 attack8
 $frame attack9 attack10 attack11
 
-$frame pain1 pain2 pain3 pain4 pain5 
+$frame pain1 pain2 pain3 pain4 pain5
 
 $frame death1 death2 death3 death4 death5 death6 death7
 
@@ -259,7 +259,7 @@
 	setsize (self, '-32 -32 -24', '32 32 32');
 	if (!self.health)
 		self.health = MH_SHALRATH;
-	self.health = self.health * monsterhealthscale;
+	self.health = self.health;
 	self.bodyhealth = self.health + MB_SHALRATH;
 	self.bleedratio = 0.75; // alive but tough
 
Index: dpmod/qc/m_shambler.qc
diff -u dpmod/qc/m_shambler.qc:1.2 dpmod/qc/m_shambler.qc:1.3
--- dpmod/qc/m_shambler.qc:1.2	Thu Feb 20 03:47:08 2003
+++ dpmod/qc/m_shambler.qc	Wed Jul 16 08:16:45 2003
@@ -8,32 +8,32 @@
 
 $cd id1/models/shams
 $origin 0 0 24
-$base base		
+$base base
 $skin base
 
 $frame stand1 stand2 stand3 stand4 stand5 stand6 stand7 stand8 stand9
 $frame stand10 stand11 stand12 stand13 stand14 stand15 stand16 stand17
 
-$frame walk1 walk2 walk3 walk4 walk5 walk6 walk7 
+$frame walk1 walk2 walk3 walk4 walk5 walk6 walk7
 $frame walk8 walk9 walk10 walk11 walk12
 
 $frame	run1 run2 run3 run4 run5 run6
 
-$frame smash1 smash2 smash3 smash4 smash5 smash6 smash7 
+$frame smash1 smash2 smash3 smash4 smash5 smash6 smash7
 $frame smash8 smash9 smash10 smash11 smash12
 
-$frame swingr1 swingr2 swingr3 swingr4 swingr5 
+$frame swingr1 swingr2 swingr3 swingr4 swingr5
 $frame swingr6 swingr7 swingr8 swingr9
 
-$frame swingl1 swingl2 swingl3 swingl4 swingl5 
+$frame swingl1 swingl2 swingl3 swingl4 swingl5
 $frame swingl6 swingl7 swingl8 swingl9
 
-$frame magic1 magic2 magic3 magic4 magic5 
+$frame magic1 magic2 magic3 magic4 magic5
 $frame magic6 magic7 magic8 magic9 magic10 magic11 magic12
 
 $frame pain1 pain2 pain3 pain4 pain5 pain6
 
-$frame death1 death2 death3 death4 death5 death6 
+$frame death1 death2 death3 death4 death5 death6
 $frame death7 death8 death9 death10 death11
 
 void() sham_stand1	=[	$stand1,	sham_stand2	] {ai_stand();};
@@ -534,7 +534,7 @@
 	setsize (self, '-32 -32 -24', '32 32 64');
 	if (!self.health)
 		self.health = MH_SHAMBLER;
-	self.health = self.health * monsterhealthscale;
+	self.health = self.health;
 	self.max_health = self.health;
 	self.bodyhealth = self.health + MB_SHAMBLER;
 	self.bleedratio = 0; // shamblers are animated dead, no bleeding
Index: dpmod/qc/m_soldier.qc
diff -u dpmod/qc/m_soldier.qc:1.6 dpmod/qc/m_soldier.qc:1.7
--- dpmod/qc/m_soldier.qc:1.6	Sat Jul 12 06:02:55 2003
+++ dpmod/qc/m_soldier.qc	Wed Jul 16 08:16:45 2003
@@ -492,7 +492,7 @@
 	setsize (self, '-16 -16 -24', '16 16 32');
 	if (self.health < 1)
 		self.health = MH_GRUNT;
-	self.health = self.health * monsterhealthscale;
+	self.health = self.health;
 	self.bodyhealth = self.health + MB_GRUNT;
 	self.bleedratio = 0.75; // hardwired zombie, bleeding means less
 
Index: dpmod/qc/m_tarbaby.qc
diff -u dpmod/qc/m_tarbaby.qc:1.2 dpmod/qc/m_tarbaby.qc:1.3
--- dpmod/qc/m_tarbaby.qc:1.2	Sat Jul 12 07:42:31 2003
+++ dpmod/qc/m_tarbaby.qc	Wed Jul 16 08:16:45 2003
@@ -246,7 +246,7 @@
 	setsize (self, '-16 -16 -24', '16 16 32');
 	if (self.health < 1)
 		self.health = MH_TARBABY;
-	self.health = self.health * monsterhealthscale;
+	self.health = self.health;
 	self.bodyhealth = 1000000000; // avoid a gib message
 	self.bleedratio = 0; // no blood to lose
 
Index: dpmod/qc/m_wizard.qc
diff -u dpmod/qc/m_wizard.qc:1.2 dpmod/qc/m_wizard.qc:1.3
--- dpmod/qc/m_wizard.qc:1.2	Thu Feb 20 03:42:18 2003
+++ dpmod/qc/m_wizard.qc	Wed Jul 16 08:16:45 2003
@@ -8,7 +8,7 @@
 
 $cd id1/models/a_wizard
 $origin 0 0 24
-$base wizbase	
+$base wizbase
 $skin wizbase
 
 $frame hover1 hover2 hover3 hover4 hover5 hover6 hover7 hover8
@@ -34,7 +34,7 @@
 */
 float()	WizardCheckAttack =
 {
-	local vector	spot1, spot2;	
+	local vector	spot1, spot2;
 	local entity	targ;
 	local float		chance;
 
@@ -50,9 +50,9 @@
 		}
 		return FALSE;
 	}
-		
+
 	targ = self.enemy;
-	
+
 // see if any entities are in the way of the shot
 	spot1 = self.origin + self.view_ofs;
 	spot2 = targ.origin + targ.view_ofs;
@@ -68,7 +68,7 @@
 		}
 		return FALSE;
 	}
-			
+
 	if (enemy_range == RANGE_MELEE)
 		chance = 0.9;
 	else if (enemy_range == RANGE_NEAR)
@@ -100,7 +100,7 @@
 			wiz_side1 ();
 		}
 	}
-	
+
 	return FALSE;
 };
 
@@ -370,7 +370,7 @@
 	setsize (self, '-16 -16 -24', '16 16 32');
 	if (self.health < 1)
 		self.health = MH_WIZARD;
-	self.health = self.health * monsterhealthscale;
+	self.health = self.health;
 	self.bodyhealth = self.health + MB_WIZARD;
 	self.bleedratio = 0.5; // magical, bleeding matters less
 
Index: dpmod/qc/mine.qc
diff -u dpmod/qc/mine.qc:1.7 dpmod/qc/mine.qc:1.8
--- dpmod/qc/mine.qc:1.7	Wed Apr  9 23:24:30 2003
+++ dpmod/qc/mine.qc	Wed Jul 16 08:16:45 2003
@@ -44,7 +44,7 @@
 		v_x = 0 - v_x;
 		makevectors(v);
 		shotorg = self.origin;
-		FireBullets(self.owner, self, -1, 4, self.dmg / 4, self.dmg / 4, 0, 0, v_forward * 7000, 0.05, "LASERTRIPMINEDIRECT", DT_NAIL, self.obitfunc1);
+		FireBullets(self.owner, self, -1, 4, self.dmg / 4, self.dmg / 4, 0, 0, v_forward * 10000, 0.05, "LASERTRIPMINEDIRECT", DT_NAIL, self.obitfunc1);
 		Explosion(self.origin, self.owner, self.dmg, self.dmg2, "LASERTRIPMINEBLAST", '0 0 0', self.effects & EF_BLUE, self.obitfunc1);
 	}
 	else if (self.lefty == 3)
Index: dpmod/qc/mode_management.qc
diff -u dpmod/qc/mode_management.qc:1.4 dpmod/qc/mode_management.qc:1.5
--- dpmod/qc/mode_management.qc:1.4	Sat Jul 12 06:02:55 2003
+++ dpmod/qc/mode_management.qc	Wed Jul 16 08:16:45 2003
@@ -303,7 +303,7 @@
 	mode_shirtmustmatchpants = deathmatch >= DM_TEAM_MODS_START && deathmatch < DM_TEAM_MODS_END;
 	spawnteams();
 
-	itemrespawn = (deathmatch && deathmatch != 2) || coop;
+	itemrespawn = deathmatch || cvar("coop");
 
 	// don't spawn any monsters until 15 seconds
 	spawnchecktime = 15;
Index: dpmod/qc/t_damage.qc
diff -u dpmod/qc/t_damage.qc:1.5 dpmod/qc/t_damage.qc:1.6
--- dpmod/qc/t_damage.qc:1.5	Tue Mar 11 14:21:25 2003
+++ dpmod/qc/t_damage.qc	Wed Jul 16 08:16:45 2003
@@ -1,4 +1,3 @@
-float   damagescale;
 .void() knockedloosefunc; // called when kinetically disturbed
 .float  forcescale; // used for damage force calculations (shambler has lower forcescale than player for instance)
 
@@ -13,7 +12,11 @@
 .float  health; // if this goes below 1 the thing is dead
 .float  bodyhealth; // used for gibbing
 
-float   monsterdamagescale; // set in world.qc when level starts
+// adjustable monster damage settings
+float   monsterdamagescale;
+float   monsterresistancescale;
+// adjustable player damage settings
+float   playerdamagescale;
 
 void(entity targ, entity attacker, string dmsg, float dtype, void(entity t, entity a, string m, float dtyp) obitfunc) ClientObituary;
 
@@ -189,11 +192,45 @@
 		if (targ.damagemodifier)
 			ratio = ratio * targ.damagemodifier(targ, healthdamage, damage, damgtype, dethtype);
 
+		if (targ.flags & FL_MONSTER) ratio = ratio * monsterresistancescale;
 		if (targ.resist_bullet   ) if (damgtype & DTF_RESIST_BULLET   ) ratio = ratio * targ.resist_bullet;
 		if (targ.resist_explosive) if (damgtype & DTF_RESIST_EXPLOSIVE) ratio = ratio * targ.resist_explosive;
 		if (targ.resist_energy   ) if (damgtype & DTF_RESIST_ENERGY   ) ratio = ratio * targ.resist_energy;
 		if (targ.resist_fire     ) if (damgtype & DTF_RESIST_FIRE     ) ratio = ratio * targ.resist_fire;
 
+		// only scales damage done by players
+		if (attacker.classname == "player")
+		{
+			ratio = ratio * playerdamagescale;
+			if (targ.classname == "player")
+			{
+				if (targ.items & IT_INVULNERABILITY)
+				{
+					if (targ != attacker)
+						ratio = ratio * 0.33;
+					else
+						ratio = 0;
+				}
+			}
+			// only scales player damage to monsters
+			else if (targ.flags & FL_MONSTER)
+				ratio = ratio * monsterdamagescale;
+		}
+		else if (targ.items & IT_INVULNERABILITY)
+			ratio = 0;
+
+//		// check for quad damage powerup on the attacker
+//		if (attacker.items & IT_QUAD)
+//			ratio = ratio * 4;
+
+		if (targ.team > 0)
+		if (targ.team == attacker.team)
+		if (teamplay == 1 || teamplay == 3)
+		if (targ != attacker || teamplay == 1)
+			ratio = 0;
+		if (targ.flags & FL_GODMODE)
+			ratio = 0;
+
 		// apply resistances
 		healthdamage = healthdamage * ratio;
 		damage = damage * ratio;
@@ -209,54 +246,38 @@
 		// how much bleed damage 'matters'
 		ratio = (ratio - 1) * targ.bleedratio + 1;
 
-		if (targ.classname == "player") // only protects players from damage
-		if (attacker.flags & FL_MONSTER)
-			damage = damage * monsterdamagescale;
-
-		if (targ.items & IT_INVULNERABILITY)
-		{
-			if (targ != attacker && targ.classname == "player" && attacker.classname == "player")
-				damage = damage * 0.33;
-			else
-				damage = 0;
-		}
-
-//		// check for quad damage powerup on the attacker
-//		if (attacker.items & IT_QUAD)
-//			damage = damage * 4;
-
 		// save damage based on the target's armor level
+		take = damage; // body damage
 		save = 0;
 		if (damgtype & DTF_ARMOR)
+		{
 			save = targ.armortype * damage;
-		if (targ.team > 0)
-		if (targ.team == attacker.team)
-		if (teamplay == 1 || teamplay == 3)
-		if (targ != attacker || teamplay == 1)
-			save = 0;
-		if (targ.flags & FL_GODMODE)
-			save = 0;
-
-		if (save > targ.armorvalue)
-			save = targ.armorvalue;
-		targ.armorvalue = targ.armorvalue - save;
-		take = damage - save; // body damage
-		if (take < 0)
+			if (save >= 0.1)
+			{
+				if (save > targ.armorvalue)
+					save = targ.armorvalue;
+				targ.armorvalue = targ.armorvalue - save;
+				take = take - save;
+			}
+			else
+				save = 0;
+		}
+		if (take < 0.1)
 			take = 0;
-
-		if (take < 0.01)
-		if (save < 0.01)
+		if (take == 0)
+		if (save == 0)
 			return; // no damage to do
 
 		htake = take * ratio; // health damage
 		if (htake < 0.01) htake = 0.01;
 
-		if (targ.bleedfunc) // telefrag doesn't cause bleeding
+		if (targ.bleedfunc)
 		{
 			self = targ;
 			self.bleedfunc(damgpoint, take, save, force, damgtype);
 			self = oldself;
 		}
+
 		// moved below bleedfunc for sake of showing the correct armortype
 		if (targ.armorvalue < 1)
 		{
@@ -264,6 +285,7 @@
 			targ.armortype = 0;     // lost all armor
 			targ.items = targ.items - (targ.items & (IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3));
 		}
+
 		// add to the damage total for clients, which will be sent as a single
 		// message at the end of the frame
 		// FIXME: remove after combining shotgun blasts?
Index: dpmod/qc/w_dbshotgun.qc
diff -u dpmod/qc/w_dbshotgun.qc:1.11 dpmod/qc/w_dbshotgun.qc:1.12
--- dpmod/qc/w_dbshotgun.qc:1.11	Sat Jul 12 06:02:55 2003
+++ dpmod/qc/w_dbshotgun.qc	Wed Jul 16 08:16:45 2003
@@ -105,11 +105,11 @@
 	self.wfiretime = time;
 	w_muzzleflash(v, 4);
 	if (explosive)
-		FireBullets(self, self, 1, 1, 0, 0, DBSHOTGUNEXPLOSIVESLUG * damagescale, 80, shotdir * 5000, spreadboost, "SHOTGUNEXPLOSIVESLUG", DT_SHOTGUN, obitfunc);
+		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 * damagescale, DBSHOTGUNBUCKSHOT * 0.1 * damagescale, 0, 0, shotdir * 6000, spreadboost + 0.03, "SHOTGUN", DT_SHOTGUN, obitfunc);
-		FireBullets(self, self, 0, 5, DBSHOTGUNBUCKSHOT * 0.1 * damagescale, DBSHOTGUNBUCKSHOT * 0.1 * damagescale, 0, 0, shotdir * 6000, spreadboost + 0.03, "SHOTGUN", DT_SHOTGUN, obitfunc);
+		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);
 	}
 	shotorg = v;
 };
@@ -163,11 +163,11 @@
 	self.wfiretime = time;
 	w_muzzleflash(v, 2);
 	if (explosive)
-		FireBullets(self, self, 1, 1, 0, 0, DBSHOTGUNEXPLOSIVESLUG * damagescale, 80, shotdir * 5000, spreadboost, "SHOTGUNEXPLOSIVESLUG", DT_SHOTGUN, obitfunc);
+		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 * damagescale, DBSHOTGUNBUCKSHOT * 0.1 * damagescale, 0, 0, shotdir * 6000, spreadboost + 0.03, "SHOTGUN", DT_SHOTGUN, obitfunc);
-		FireBullets(self, self, 0, 5, DBSHOTGUNBUCKSHOT * 0.1 * damagescale, DBSHOTGUNBUCKSHOT * 0.1 * damagescale, 0, 0, shotdir * 6000, spreadboost + 0.03, "SHOTGUN", DT_SHOTGUN, obitfunc);
+		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);
 	}
 	shotorg = v;
 };
Index: dpmod/qc/w_grapple.qc
diff -u dpmod/qc/w_grapple.qc:1.4 dpmod/qc/w_grapple.qc:1.5
--- dpmod/qc/w_grapple.qc:1.4	Sun Jun  8 04:02:48 2003
+++ dpmod/qc/w_grapple.qc	Wed Jul 16 08:16:45 2003
@@ -49,9 +49,9 @@
 	{
 		self.cnt2 = time + 0.1;
 		if (self.owner.items & IT_QUAD)
-			T_Damage(self.enemy, self, self.owner, 20 * damagescale, 20 * damagescale, "GRAPPLE", DT_CUT, self.origin, '0 0 0', Obituary_Grapple);
+			T_Damage(self.enemy, self, self.owner, 20, 20, "GRAPPLE", DT_CUT, self.origin, '0 0 0', Obituary_Grapple);
 		else
-			T_Damage(self.enemy, self, self.owner, 5 * damagescale, 5 * damagescale, "GRAPPLE", DT_CUT, self.origin, '0 0 0', Obituary_Grapple);
+			T_Damage(self.enemy, self, self.owner, 5, 5, "GRAPPLE", DT_CUT, self.origin, '0 0 0', Obituary_Grapple);
 	}
 	if (self.owner.items & IT_QUAD)
 		self.effects = self.effects | EF_BLUE;
@@ -117,9 +117,9 @@
 //	if (self.enemy != world)
 //		self.enemy.axhitme = TRUE;
 	if (self.owner.items & IT_QUAD)
-		T_Damage(self.enemy, self, self.owner, 240 * damagescale, 240 * damagescale, "GRAPPLEIMPACT", DT_CUT, self.origin, '0 0 0', Obituary_Grapple);
+		T_Damage(self.enemy, self, self.owner, 240, 240, "GRAPPLEIMPACT", DT_CUT, self.origin, '0 0 0', Obituary_Grapple);
 	else
-		T_Damage(self.enemy, self, self.owner, 60 * damagescale, 60 * damagescale, "GRAPPLEIMPACT", DT_CUT, self.origin, '0 0 0', Obituary_Grapple);
+		T_Damage(self.enemy, self, self.owner, 60, 60, "GRAPPLEIMPACT", DT_CUT, self.origin, '0 0 0', Obituary_Grapple);
 	if (self.enemy.solid == SOLID_NOT) // gibbed, keep going
 	{
 		self.dest = self.velocity;
Index: dpmod/qc/w_grenade.qc
diff -u dpmod/qc/w_grenade.qc:1.10 dpmod/qc/w_grenade.qc:1.11
--- dpmod/qc/w_grenade.qc:1.10	Sat Jul 12 06:02:55 2003
+++ dpmod/qc/w_grenade.qc	Wed Jul 16 08:16:45 2003
@@ -57,8 +57,8 @@
 	self.wfiretime = time;
 	Inventory_AdjustQuantity(self, "rockets", -1);
 	w_muzzleflash(shotorg, 5);
-	//LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200 + self.velocity, self, 150 * damagescale, 200, GRENADE_IMPACT | GRENADE_IMMUNETODAMAGE, 25, "GRENADE", Obituary_Grenade);
-	LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200, self, 150 * damagescale, 120, GRENADE_IMPACT | GRENADE_IMMUNETODAMAGE, 25, "GRENADE", Obituary_Grenade);
+	//LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200 + self.velocity, self, 150, 200, GRENADE_IMPACT | GRENADE_IMMUNETODAMAGE, 25, "GRENADE", Obituary_Grenade);
+	LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200, self, 150, 120, GRENADE_IMPACT | GRENADE_IMMUNETODAMAGE, 25, "GRENADE", Obituary_Grenade);
 };
 
 /*
@@ -69,7 +69,7 @@
 	self.wfiretime = time;
 	Inventory_AdjustQuantity(self, "rockets", -1);
 	w_muzzleflash(shotorg, 5);
-	LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200, self, 150 * damagescale, 120, GRENADE_DETONATABLE | GRENADE_DETONATEONCREATURE, 60, "PIPEBOMB", Obituary_Grenade);
+	LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200, self, 150, 120, GRENADE_DETONATABLE | GRENADE_DETONATEONCREATURE, 60, "PIPEBOMB", Obituary_Grenade);
 };
 */
 
@@ -79,7 +79,7 @@
 	self.wfiretime = time;
 	Inventory_AdjustQuantity(self, "rockets", -1);
 	w_muzzleflash(shotorg, 3);
-	LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200, self, 100 * damagescale, 150, GRENADE_PROXIMITY, 5, "GRENADE", Obituary_Grenade);
+	LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200, self, 100, 150, GRENADE_PROXIMITY, 5, "GRENADE", Obituary_Grenade);
 };
 */
 
@@ -89,7 +89,7 @@
 	self.wfiretime = time;
 	Inventory_AdjustQuantity(self, "rockets", -1);
 	w_muzzleflash(shotorg, 3);
-	LaunchMine(shotorg, shotdir * 1000 + v_up * 200, self, 120 * damagescale, 120, 50 * damagescale, 20 * damagescale, MINE_DETONATABLE, 60, "STICKYGRENADE", Obituary_Grenade);
+	LaunchMine(shotorg, shotdir * 1000 + v_up * 200, self, 120, 120, 50, 20, MINE_DETONATABLE, 60, "STICKYGRENADE", Obituary_Grenade);
 };
 */
 
Index: dpmod/qc/w_lightning.qc
diff -u dpmod/qc/w_lightning.qc:1.3 dpmod/qc/w_lightning.qc:1.4
--- dpmod/qc/w_lightning.qc:1.3	Sat Jul 12 06:02:55 2003
+++ dpmod/qc/w_lightning.qc	Wed Jul 16 08:16:45 2003
@@ -126,7 +126,7 @@
 	self.wframe = self.wframe + 1;
 	if (self.wframe >= 3)
 		self.wframe = 1;
-	W_BeamDamage(self, self, shotorg, shotorg + shotdir * 100000, cells * 30 * damagescale, cells * 15 * damagescale, "LIGHTNING", DT_LIGHTNING, Obituary_Lightning);
+	W_BeamDamage(self, self, shotorg, shotorg + shotdir * 100000, cells * 30, cells * 15, "LIGHTNING", DT_LIGHTNING, Obituary_Lightning);
 
 	traceline(shotorg, shotorg + shotdir * 100000, TRUE, self);
 	te_lightning2(self, shotorg, trace_endpos);
Index: dpmod/qc/w_nailgun.qc
diff -u dpmod/qc/w_nailgun.qc:1.9 dpmod/qc/w_nailgun.qc:1.10
--- dpmod/qc/w_nailgun.qc:1.9	Sat Jul 12 06:02:55 2003
+++ dpmod/qc/w_nailgun.qc	Wed Jul 16 08:16:45 2003
@@ -42,7 +42,7 @@
 		}
 
 		w_muzzleflash(shotorg, 1);
-		FireBullets(self, self, 4, 1, 15 * damagescale, 15 * damagescale, 0, 0, shotdir * 7000, 0.025, "NAILGUN", DT_NAIL, Obituary_Nailgun);
+		FireBullets(self, self, 4, 1, 15, 15, 0, 0, shotdir * 15000, 0.025, "NAILGUN", DT_NAIL, Obituary_Nailgun);
 		shotorg = v;
 	}
 };
@@ -83,8 +83,8 @@
 	self.wfiretime = time;
 	Inventory_AdjustQuantity(self, "rockets", -1);
 	w_muzzleflash(shotorg, 1);
-	//LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200, self, 80 * damagescale, 300, GRENADE_IMPACT, 2.5, "NAILGUNGRENADE", Obituary_NailgunGrenade);
-	LaunchMine(shotorg, shotdir * 1000 + v_up * 200, self, 200 * damagescale, 70, 20 * damagescale, 10 * damagescale, MINE_LASERTRIP, 60, "LASERTRIPMINE", Obituary_NailgunMine);
+	//LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200, self, 80, 300, GRENADE_IMPACT, 2.5, "NAILGUNGRENADE", Obituary_NailgunGrenade);
+	LaunchMine(shotorg, shotdir * 1000 + v_up * 200, self, 200, 70, 20, 10, MINE_LASERTRIP, 60, "LASERTRIPMINE", Obituary_NailgunMine);
 };
 
 
Index: dpmod/qc/w_oldplasmarifle.qc
diff -u dpmod/qc/w_oldplasmarifle.qc:1.3 dpmod/qc/w_oldplasmarifle.qc:1.4
--- dpmod/qc/w_oldplasmarifle.qc:1.3	Sat Jul 12 06:02:55 2003
+++ dpmod/qc/w_oldplasmarifle.qc	Wed Jul 16 08:16:45 2003
@@ -20,8 +20,8 @@
 	self.wfiretime = time;
 	dir = shotdir + randomvec() * 0.03;
 	w_muzzleflash(shotorg, 1);
-	//FireBullets(self, self, shotorg, 4, 1, 30 * damagescale, 30 * damagescale, dir * 10000, 0, "PLASMARIFLE", DT_NAIL, Obituary_PlasmaRifle);
-	FirePlasma(self, shotorg, dir, 30 * damagescale, 45, '0 0 0', "PLASMARIFLE", Obituary_PlasmaRifle);
+	//FireBullets(self, self, shotorg, 4, 1, 30, 30, dir * 10000, 0, "PLASMARIFLE", DT_NAIL, Obituary_PlasmaRifle);
+	FirePlasma(self, shotorg, dir, 30, 45, '0 0 0', "PLASMARIFLE", Obituary_PlasmaRifle);
 };
 
 void() W_PlasmaRifleFireHighPower =
@@ -29,7 +29,7 @@
 	Inventory_AdjustQuantity(self, "cells", 0 - self.wload);
 	self.wfiretime = time;
 	//FireBullets(self, self, shotorg, 4, 1, self.wload * 30, self.wload * 30, dir * 10000, 0, "PLASMARIFLE", DT_NAIL, Obituary_PlasmaRifle);
-	FirePlasma(self, shotorg, shotdir, self.wload * 30 * damagescale, 105, '0 0 0', "PLASMARIFLE", Obituary_PlasmaRifle);
+	FirePlasma(self, shotorg, shotdir, self.wload * 30, 105, '0 0 0', "PLASMARIFLE", Obituary_PlasmaRifle);
 	self.wload = 0;
 };
 
Index: dpmod/qc/w_pistol.qc
diff -u dpmod/qc/w_pistol.qc:1.8 dpmod/qc/w_pistol.qc:1.9
--- dpmod/qc/w_pistol.qc:1.8	Sun Jun  8 04:02:48 2003
+++ dpmod/qc/w_pistol.qc	Wed Jul 16 08:16:45 2003
@@ -21,7 +21,7 @@
 	w_muzzleflash(shotorg, 1);
 	ang = self.v_angle;ang_x = 0 - ang_x;
 	ejectcasing(shotorg, v_right * 150 + v_up * 50, 50, ang, '0 250 0', 100, 0);
-	FireBullets(self, self, 4, 1, 35 * damagescale, 35 * damagescale, 0, 0, shotdir * 7000, 0, "PISTOL", DT_NAIL, Obituary_Pistol);
+	FireBullets(self, self, 4, 1, 35, 35, 0, 0, shotdir * 12000, 0, "PISTOL", DT_NAIL, Obituary_Pistol);
 };
 
 void() w_pistoldrop1;
Index: dpmod/qc/w_plasmarifle.qc
diff -u dpmod/qc/w_plasmarifle.qc:1.11 dpmod/qc/w_plasmarifle.qc:1.12
--- dpmod/qc/w_plasmarifle.qc:1.11	Sat Jul 12 06:02:55 2003
+++ dpmod/qc/w_plasmarifle.qc	Wed Jul 16 08:16:45 2003
@@ -53,7 +53,7 @@
 			self.plasmabarrel = 0;
 			v = v_right * -1.4 + v_up * -1.4;
 		}
-		FirePlasma(self, shotorg + v, (shotdir + v * 0.005) * 5000, damagepercell * cells * damagescale, r, "PLASMARIFLE", Obituary_PlasmaRifle);
+		FirePlasma(self, shotorg + v, (shotdir + v * 0.005) * 25000, damagepercell * cells, r, "PLASMARIFLE", Obituary_PlasmaRifle);
 	}
 };
 
@@ -68,9 +68,9 @@
 	self.wfiretime = time;
 	d = self.woverload * 20;
 	r = 120;
-	v = v_up    *  2                    ;FirePlasma(self, shotorg + v, (shotdir + v * 0.005) * 10000, d * damagescale, r, "PLASMARIFLE", Obituary_PlasmaRifle);
-	v = v_right *  1.414 + v_up * -1.414;FirePlasma(self, shotorg + v, (shotdir + v * 0.005) * 10000, d * damagescale, r, "PLASMARIFLE", Obituary_PlasmaRifle);
-	v = v_right * -1.414 + v_up * -1.414;FirePlasma(self, shotorg + v, (shotdir + v * 0.005) * 10000, d * damagescale, r, "PLASMARIFLE", Obituary_PlasmaRifle);
+	v = v_up    *  2                    ;FirePlasma(self, shotorg + v, (shotdir + v * 0.005) * 10000, d, r, "PLASMARIFLE", Obituary_PlasmaRifle);
+	v = v_right *  1.414 + v_up * -1.414;FirePlasma(self, shotorg + v, (shotdir + v * 0.005) * 10000, d, r, "PLASMARIFLE", Obituary_PlasmaRifle);
+	v = v_right * -1.414 + v_up * -1.414;FirePlasma(self, shotorg + v, (shotdir + v * 0.005) * 10000, d, r, "PLASMARIFLE", Obituary_PlasmaRifle);
 };
 */
 
Index: dpmod/qc/w_plasmawave.qc
diff -u dpmod/qc/w_plasmawave.qc:1.3 dpmod/qc/w_plasmawave.qc:1.4
--- dpmod/qc/w_plasmawave.qc:1.3	Sat Jul 12 06:02:55 2003
+++ dpmod/qc/w_plasmawave.qc	Wed Jul 16 08:16:45 2003
@@ -53,7 +53,7 @@
 		cells = 10;
 	self.wfiretime = time;
 	Inventory_AdjustQuantity(self, "cells", 0 - cells);
-	FirePlasmaBall(self, shotorg, shotdir * 1000, cells * 20 * damagescale, 120, "PLASMAWAVE", Obituary_PlasmaWaveShot);
+	FirePlasmaBall(self, shotorg, shotdir * 1000, cells * 20, 120, "PLASMAWAVE", Obituary_PlasmaWaveShot);
 };
 
 void() W_PlasmaWaveFireWave =
@@ -67,7 +67,7 @@
 		cells = 50;
 	self.wfiretime = time;
 	Inventory_AdjustQuantity(self, "cells", 0 - cells);
-	FirePlasmaBall(self, shotorg, shotdir * 1000, cells * 15 * damagescale, 300, "PLASMAWAVE", Obituary_PlasmaWaveShot);
+	FirePlasmaBall(self, shotorg, shotdir * 1000, cells * 15, 300, "PLASMAWAVE", Obituary_PlasmaWaveShot);
 	*/
 	local float cells, shots, damage;
 	local vector ang;
@@ -82,7 +82,7 @@
 	shots = ceil(cells / 5);
 	if (shots > 12)
 		shots = 12;
-	damage = cells * 20 * damagescale / shots;
+	damage = cells * 20 / shots;
 	ang = self.v_angle - (shots * '0 3 0');
 	while (shots > 0)
 	{
Index: dpmod/qc/w_rocket.qc
diff -u dpmod/qc/w_rocket.qc:1.10 dpmod/qc/w_rocket.qc:1.11
--- dpmod/qc/w_rocket.qc:1.10	Sat Jul 12 06:02:55 2003
+++ dpmod/qc/w_rocket.qc	Wed Jul 16 08:16:45 2003
@@ -100,7 +100,7 @@
 	self.flags = self.flags - (self.flags & FL_ONGROUND);
 	Inventory_AdjustQuantity(self, "rockets", -1);
 	w_muzzleflash(shotorg, 2);
-	LaunchMissile(shotorg, shotdir * 5000, self, 100 * damagescale, 100, "ROCKET", Obituary_Rocket);
+	LaunchMissile(shotorg, shotdir * 5000, self, 100, 100, "ROCKET", Obituary_Rocket);
 };
 
 void() W_RocketFireTripleSpiral =
@@ -112,18 +112,18 @@
 	self.velocity = self.velocity - shotdir * 450;
 	Inventory_AdjustQuantity(self, "rockets", -1);
 	w_muzzleflash(shotorg, 4);
-	LaunchMissile(shotorg, shotdir * 3000, self, 100 * damagescale, 100, "ROCKET", Obituary_Rocket);
+	LaunchMissile(shotorg, shotdir * 3000, self, 100, 100, "ROCKET", Obituary_Rocket);
 	spiralmissile_orbitentity = newmis;
 	if (Inventory_Quantity(self, "rockets") < 1)
 		return;
 	Inventory_AdjustQuantity(self, "rockets", -1);
 	w_muzzleflash(shotorg + v_right * 8, 4);
-	LaunchSpiralMissile(shotorg, shotdir, self, 100 * damagescale, 100, "ROCKET", Obituary_Rocket, -12);
+	LaunchSpiralMissile(shotorg, shotdir, self, 100, 100, "ROCKET", Obituary_Rocket, -12);
 	if (Inventory_Quantity(self, "rockets") < 1)
 		return;
 	Inventory_AdjustQuantity(self, "rockets", -1);
 	w_muzzleflash(shotorg - v_right * 8, 4);
-	LaunchSpiralMissile(shotorg, shotdir, self, 100 * damagescale, 100, "ROCKET", Obituary_Rocket, 12);
+	LaunchSpiralMissile(shotorg, shotdir, self, 100, 100, "ROCKET", Obituary_Rocket, 12);
 };
 
 void() w_rocketdrop1;
Index: dpmod/qc/w_shotgun.qc
diff -u dpmod/qc/w_shotgun.qc:1.10 dpmod/qc/w_shotgun.qc:1.11
--- dpmod/qc/w_shotgun.qc:1.10	Sat Jul 12 06:02:55 2003
+++ dpmod/qc/w_shotgun.qc	Wed Jul 16 08:16:45 2003
@@ -24,11 +24,11 @@
 	Inventory_AdjustQuantity(self, "shells", -1);
 	w_muzzleflash(shotorg, 2);
 	if (fireexplosive)
-		FireBullets(self, self, 1, 1, SHOTGUNEXPLOSIVESLUG * 0.2 * damagescale, SHOTGUNEXPLOSIVESLUG * 0.2 * damagescale, SHOTGUNEXPLOSIVESLUG * 0.8 * damagescale, 80, shotdir * 5000, 0, "SHOTGUNEXPLOSIVESLUG", DT_SHOTGUN, Obituary_Shotgun);
+		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 * damagescale, SHOTGUNBUCKSHOT * 0.1 * damagescale, 0, 0, shotdir * 6000, 0.05, "SHOTGUN", DT_SHOTGUN, Obituary_Shotgun);
-		FireBullets(self, self, 0, 5, SHOTGUNBUCKSHOT * 0.1 * damagescale, SHOTGUNBUCKSHOT * 0.1 * damagescale, 0, 0, shotdir * 6000, 0.05, "SHOTGUN", DT_SHOTGUN, Obituary_Shotgun);
+		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);
 	}
 	self.wload = -1;
 };
Index: dpmod/qc/w_supernailgun.qc
diff -u dpmod/qc/w_supernailgun.qc:1.9 dpmod/qc/w_supernailgun.qc:1.10
--- dpmod/qc/w_supernailgun.qc:1.9	Sat Jul 12 06:02:55 2003
+++ dpmod/qc/w_supernailgun.qc	Wed Jul 16 08:16:45 2003
@@ -31,7 +31,7 @@
 		w_muzzleflash(shotorg, 1);
 		ang = self.v_angle;ang_x = 0 - ang_x;
 		ejectcasing(shotorg, v_right * 200 + v_up * 50, 50, ang, '0 50 0', 100, 0);
-		FireBullets(self, self, 4, 1, 15 * damagescale, 15 * damagescale, 0, 0, shotdir * 7000, 0.05, "SUPERNAILGUN", DT_NAIL, Obituary_SuperNailgun);
+		FireBullets(self, self, 4, 1, 15, 15, 0, 0, shotdir * 12000, 0.05, "SUPERNAILGUN", DT_NAIL, Obituary_SuperNailgun);
 	}
 	shotorg = v;
 };
@@ -83,7 +83,7 @@
 		a = Inventory_Quantity(self, "rockets");
 	Inventory_AdjustQuantity(self, "rockets", 0 - a);
 	w_muzzleflash(shotorg, 3);
-	LaunchMine(shotorg, shotdir * 1000 + v_up * 200, self, a * 100 * damagescale, a * 100 + 50, 20 * damagescale, 10 * damagescale, MINE_PROXIMITY, 60, "PROXIMITYMINE", Obituary_ProximityMine);
+	LaunchMine(shotorg, shotdir * 1000 + v_up * 200, self, a * 100, a * 100 + 50, 20, 10, MINE_PROXIMITY, 60, "PROXIMITYMINE", Obituary_ProximityMine);
 };
 
 void() w_snailgundrop1;
Index: dpmod/qc/world.qc
diff -u dpmod/qc/world.qc:1.2 dpmod/qc/world.qc:1.3
--- dpmod/qc/world.qc:1.2	Thu Feb 20 04:04:45 2003
+++ dpmod/qc/world.qc	Wed Jul 16 08:16:45 2003
@@ -1,15 +1,12 @@
 
 float maxclients; // how many player slots there actually are
 entity modechecker;
-float monsterdamagescale;
-float monsterhealthscale; // set based on coop
 
 .float dmgtime;
 .float candrown;
 .float drown_finished;
 
 void() player_precache;
-void() skillupdate;
 void() damagescaleupdate;
 
 entity lastspawn;
@@ -414,7 +411,7 @@
 
 	// 3 CANDLE (first variety)
 	lightstyle(3, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg");
-	
+
 	// 4 FAST STROBE
 	lightstyle(4, "mamamamamama");
 
@@ -446,7 +443,6 @@
 
 	precache_sound ("player/udeath.wav");		// gib death
 
-	skillupdate();
 	damagescaleupdate();
 
 	modesetup();
@@ -713,26 +709,22 @@
 	}
 };
 
-void() skillupdate =
+void() damagescaleupdate =
 {
+	local float f;
 	skill = cvar("skill");
 	// skill 0 =  25%
 	// skill 1 =  50%
 	// skill 2 =  75%
 	// skill 3 = 100%
 	monsterdamagescale = (skill + 1) / 4;
-	monsterhealthscale = coop; // 1 = 1x, and so on up
-	if (monsterhealthscale < 0.1) // 0 also means 1
-		monsterhealthscale = 1;
-};
-
-void() damagescaleupdate =
-{
-	damagescale = (cvar("temp1") & 127) * 0.05;
-	if (damagescale < 0.1)
-		damagescale = 1.0; // 20 - default scale
-	if (damagescale > 6.0)
-		damagescale = 6.0; // 120
+	f = cvar("coop"); // 1 = 1x health, and so on up
+	if (f < 0.1)
+		f = 1;
+	monsterresistancescale = 1 / f;
+	playerdamagescale = (cvar("temp1") & 127) * 0.05;
+	if (playerdamagescale < 0.1)
+		playerdamagescale = 1.0; // 20 - default scale
 	// 100% is pretty realistic damage
 	// (does lack all the vital organs and other details though...)
 	// 10% is basically Quake damage (pitiful)


More information about the twilight-commits mailing list