mirror of
https://git.code.sf.net/p/quake/prozac-qfcc
synced 2024-11-10 07:11:51 +00:00
A person who wishes to remain anonymous contributed this. It's a tweak for
the discharge on the lightning gun. If you read the code it's fairly obvious what it does - sustains a sane amount of damage over a longer period of time, you won't discharge the entire amount over 100 all at once anymore. Makes it impossible to do instant kills obviously, but makes it better IMHO. Tim McGrath (Hikaru/Misty)
This commit is contained in:
parent
d714395ec3
commit
1e27af318b
1 changed files with 15 additions and 12 deletions
27
weapons.qc
27
weapons.qc
|
@ -1915,23 +1915,28 @@ void() W_FireLightning =
|
|||
#ifdef BIGLIGHT
|
||||
//We do this by capping the maximum ammo at 100, and using all
|
||||
//cells above that in one tremendous shot
|
||||
if (self.ammo_cells > 100) {
|
||||
excess = self.ammo_cells - 100;
|
||||
self.ammo_cells = 100;
|
||||
}
|
||||
else {
|
||||
excess = 0;
|
||||
self.ammo_cells = self.ammo_cells - 0.75;
|
||||
if (self.ammo_cells > 300) {
|
||||
excess = 22;
|
||||
self.ammo_cells -= 8;
|
||||
} else if (self.ammo_cells > 200) {
|
||||
excess = 18;
|
||||
self.ammo_cells -= 4;
|
||||
} else if (self.ammo_cells > 100) {
|
||||
excess = 14;
|
||||
self.ammo_cells -= 2;
|
||||
} else {
|
||||
excess = 10;
|
||||
self.ammo_cells -= 1;
|
||||
}
|
||||
#else
|
||||
//Or this method, which consumes cells at a rate to ensure we run out
|
||||
//In a few seconds, no matter what. But resupplying is a bitch.
|
||||
excess = 0;
|
||||
self.ammo_cells = self.ammo_cells - ceil(self.maxammo_cells / 30);
|
||||
if (self.ammo_cells < 0) self.ammo_cells = 0;
|
||||
if (self.ammo_cells < 0)
|
||||
self.ammo_cells = 0;
|
||||
#endif
|
||||
self.currentammo = self.ammo_cells;
|
||||
|
||||
|
||||
org = self.origin + '0 0 16';
|
||||
|
||||
|
@ -1974,10 +1979,8 @@ void() W_FireLightning =
|
|||
//WK Either way of firing the gun, we handle it here
|
||||
//WK2 - Tone it down a LOT
|
||||
if (excess) {
|
||||
sprint(self,PRINT_HIGH,"You discharge your excess cells\n");
|
||||
LightningDamage (self.origin, trace_endpos + v_forward*4, self, excess);
|
||||
}
|
||||
else
|
||||
} else
|
||||
//WK 30. Lowered damage to make it a $2200 weapon
|
||||
LightningDamage (self.origin, trace_endpos + v_forward*4, self, 12);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue