*** empty log message ***

This commit is contained in:
Finny Merrill 2004-02-17 00:14:14 +00:00
parent 91ada067c3
commit 6703c3fffd
3 changed files with 56 additions and 42 deletions

View File

@ -244,7 +244,7 @@ void() EMPGrenadeExplode =
//CH Slice gave idea of an emp gren getting rated based on blast so i added.. //CH Slice gave idea of an emp gren getting rated based on blast so i added..
total_exp = 0; total_exp = 0;
local float range = 300; local float range = 300;
local float dmg = 0.3; local float dmg = 0.8;
local float numcells = 0; local float numcells = 0;
local float numrockets = 0; local float numrockets = 0;
@ -278,6 +278,7 @@ void() EMPGrenadeExplode =
dist = vlen(self.origin - te.origin); dist = vlen(self.origin - te.origin);
mult = 0.90 - (0.75 * dist / range) + (0.10 * random()); mult = 0.90 - (0.75 * dist / range) + (0.10 * random());
mult *= dmg; mult *= dmg;
numshells = numcells = numrockets = numgren1 = numgren2 = expsize = 0;
if (IsBuilding(te)) if (IsBuilding(te))
{ {
@ -323,8 +324,9 @@ void() EMPGrenadeExplode =
else if (te.classname == "ammobox") else if (te.classname == "ammobox")
{ {
expsize = 0; expsize = 0;
expsize = expsize + (te.ammo_rockets * 5); expsize = expsize + (te.ammo_rockets * 3);
expsize = expsize + (te.ammo_cells * 1.4); expsize = expsize + (te.ammo_cells * 1.5);
expsize += expsize * te.ammo_shells / 500;
if (expsize > 0) if (expsize > 0)
{ {
@ -333,8 +335,8 @@ void() EMPGrenadeExplode =
// Damage player and explode // Damage player and explode
deathmsg = DMSG_GREN_EMP; deathmsg = DMSG_GREN_EMP;
total_exp = total_exp + expsize; total_exp = total_exp + expsize;
if (expsize > 300) //CH so they are not too powerfull //WK was 500 if (expsize > 500)
expsize = 300; expsize = 500;
T_RadiusDamage(te, self.owner, expsize, te); T_RadiusDamage(te, self.owner, expsize, te);
@ -370,10 +372,7 @@ void() EMPGrenadeExplode =
numrockets = te.ammo_rockets; numrockets = te.ammo_rockets;
if (te.weapons_carried & WEAP_SPANNER && te.classname == "player") if (te.weapons_carried & WEAP_SPANNER && te.classname == "player")
{ numcells = 0;
if (numcells > (te.maxammo_cells - 200))
numcells = te.maxammo_cells - 200;
}
} }
numcells = floor(numcells); numcells = floor(numcells);
@ -381,7 +380,7 @@ void() EMPGrenadeExplode =
expsize = 0; expsize = 0;
// calculate explosion size // calculate explosion size
expsize = numcells * 1.5 + numrockets * 5; // ouch, this hurts expsize = numcells * 1.5 + numrockets * 3; // ouch, this hurts
if (te.classname == "player") if (te.classname == "player")
{ {
@ -418,22 +417,22 @@ void() EMPGrenadeExplode =
//WK Make players not explode radially! GR why not? //WK Make players not explode radially! GR why not?
if (te.touch != BackpackTouch) if (te.touch != BackpackTouch)
{ {
T_RadiusDamage(te, self.owner, expsize, te); T_RadiusDamage(te, self.owner, expsize / 2, te);
deathmsg = DMSG_GREN_EMP; deathmsg = DMSG_GREN_EMP;
TF_T_Damage (te, te, self.owner, 2 * expsize / 3, 0, TF_TD_IGNOREARMOUR); TF_T_Damage (te, te, self.owner, expsize, 0, TF_TD_EXPLOSION);
TF_T_Damage (te, te, self.owner, expsize / 3, 0, TF_TD_EXPLOSION);
// Remove ammo // Remove ammo
te.ammo_cells -= numcells; te.ammo_cells -= numcells;
te.ammo_rockets -= numrockets; te.ammo_rockets -= numrockets;
te.ammo_shells -= numshells;
if (te.classname == "player") if (te.classname == "player")
{ {
if (te.tp_grenades_1 == GR_TYPE_MIRV) if (te.tp_grenades_1 == GR_TYPE_MIRV)
te.no_grenades_1 -= 3 * mult; te.no_grenades_1 -= numgren1;
if (te.tp_grenades_2 == GR_TYPE_MIRV) if (te.tp_grenades_2 == GR_TYPE_MIRV)
te.no_grenades_2 -= 3 * mult; te.no_grenades_2 -= numgren2;
// Update console // Update console
oldself = self; oldself = self;

View File

@ -19,7 +19,7 @@ firings get shunted through here.
// Prototypes // Prototypes
void() bubble_bob; void() bubble_bob;
void() W_FireAssaultCannon; void(float num) W_FireAssaultCannon;
void() W_FireLightAssault; void() W_FireLightAssault;
void() Throw_Grapple; void() Throw_Grapple;
@ -602,6 +602,10 @@ void() player_assaultcannonup1 =[$nailatt1, player_assaultcannonup2 ]
sound (self, CHAN_WEAPON, "weapons/asscan1.wav", 1, ATTN_NORM); sound (self, CHAN_WEAPON, "weapons/asscan1.wav", 1, ATTN_NORM);
SuperDamageSound(); SuperDamageSound();
if (self.heat > 7) {
W_FireAssaultCannon (self.heat);
sound (self, CHAN_WEAPON, "weapons/asscan2.wav", 1, ATTN_NORM);
}
Attack_Finished(0.1); Attack_Finished(0.1);
if (self.heat != 2 && self.heat != 4) if (self.heat != 2 && self.heat != 4)
@ -613,7 +617,7 @@ void() player_assaultcannonup1 =[$nailatt1, player_assaultcannonup2 ]
} }
self.heat = self.heat + 1; self.heat = self.heat + 1;
if (self.heat >= 7) if (self.heat >= 10)
{ {
self.heat = 0; self.heat = 0;
player_assaultcannon1(); player_assaultcannon1();
@ -638,6 +642,10 @@ void() player_assaultcannonup2 =[$nailatt1, player_assaultcannonup1 ]
} }
SuperDamageSound(); SuperDamageSound();
if (self.heat > 4) {
sound (self, CHAN_WEAPON, "weapons/asscan2.wav", 1, ATTN_NORM);
W_FireAssaultCannon (self.heat);
}
Attack_Finished(0.1); Attack_Finished(0.1);
if (self.heat != 2 && self.heat != 4 && self.heat != 7) if (self.heat != 2 && self.heat != 4 && self.heat != 7)
@ -651,8 +659,9 @@ void() player_assaultcannonup2 =[$nailatt1, player_assaultcannonup1 ]
} }
self.heat = self.heat + 1; self.heat = self.heat + 1;
if (self.heat >= 13) if (self.heat >= 10)
{ {
sound (self, CHAN_AUTO, "weapons/asscan4.wav", 1, ATTN_NORM);
self.heat = 0; self.heat = 0;
player_assaultcannon1(); player_assaultcannon1();
} }
@ -669,7 +678,7 @@ void() player_assaultcannon1 =[$nailatt1, player_assaultcannon2 ]
if ((!self.button0) || (self.ammo_shells < 1) || intermission_running) if ((!self.button0) || (self.ammo_shells < 1) || intermission_running)
{ {
stuffcmd(self, "v_idlescale 0\n"); // stuffcmd(self, "v_idlescale 0\n"); // GR NO
// Let him/her walk again // Let him/her walk again
self.tfstate &= ~TFSTATE_ASSAULTCANNON; self.tfstate &= ~TFSTATE_ASSAULTCANNON;
TeamFortress_SetSpeed(self); TeamFortress_SetSpeed(self);
@ -685,7 +694,7 @@ void() player_assaultcannon1 =[$nailatt1, player_assaultcannon2 ]
else else
self.weaponframe = 2; self.weaponframe = 2;
SuperDamageSound(); SuperDamageSound();
W_FireAssaultCannon(); W_FireAssaultCannon(7);
// Shake the screen // Shake the screen
// Not with idlescale -GR // Not with idlescale -GR
@ -700,8 +709,8 @@ void() player_assaultcannon1 =[$nailatt1, player_assaultcannon2 ]
#else #else
local vector off = self.v_angle; local vector off = self.v_angle;
off_x -= (random () * 2) + 2; off_x -= (random () + 0.5);
off_y -= (random () * 2) - 1; off_y -= ((random () * 0.6) - 0.3);
msg_entity = self; msg_entity = self;
WriteByte (MSG_ONE, SVC_SETANGLE); WriteByte (MSG_ONE, SVC_SETANGLE);
@ -726,12 +735,13 @@ void() player_assaultcannon2 =[$nailatt2, player_assaultcannon1 ]
return; return;
} }
if (self.weaponframe == 2) self.weaponframe++;
self.weaponframe = 4; if (self.weaponframe == 4)
else
self.weaponframe = 2; self.weaponframe = 2;
else
self.weaponframe = 4;
SuperDamageSound(); SuperDamageSound();
W_FireAssaultCannon(); W_FireAssaultCannon(7);
// increase the heat of the cannon // increase the heat of the cannon
self.heat = self.heat + 0.1; self.heat = self.heat + 0.1;
@ -739,8 +749,8 @@ void() player_assaultcannon2 =[$nailatt2, player_assaultcannon1 ]
// Not with idlescale // Not with idlescale
#if 0 #if 0
stuffcmd(self, "v_idlescale 0\n"); stuffcmd(self, "v_idlescale 0\n");
stuffcmd(self, "bf\n");
#endif #endif
stuffcmd (self, "bf\n");
Attack_Finished(0.1); Attack_Finished(0.1);
}; };
@ -749,7 +759,7 @@ void() player_assaultcannon2 =[$nailatt2, player_assaultcannon1 ]
void() player_assaultcannondown1 =[$nailatt1, player_assaultcannondown1 ] void() player_assaultcannondown1 =[$nailatt1, player_assaultcannondown1 ]
{ {
if (self.count == 1) if (self.count == 1)
sound (self, CHAN_WEAPON, "weapons/asscan3.wav", 1, ATTN_NORM); sound (self, CHAN_AUTO, "weapons/asscan3.wav", 1, ATTN_NORM);
if (self.count >= 15) { if (self.count >= 15) {
self.heat = 0; self.heat = 0;

View File

@ -1080,17 +1080,6 @@ void (float damage, vector dir) TraceAttack =
} else { } else {
puff_org = org; puff_org = org;
puff_count++; puff_count++;
msg_entity = self;
WriteByte (MSG_ONE, SVC_TEMPENTITY);
WriteByte (MSG_ONE, TE_GUNSHOT);
WriteByte (MSG_ONE, 1.0);
WriteCoord (MSG_ONE, trace_endpos_x);
WriteCoord (MSG_ONE, trace_endpos_y);
WriteCoord (MSG_ONE, trace_endpos_z);
if (trace_ent.classname == "force_field") { //- OfN - Makes field explosion b4 removing it if (trace_ent.classname == "force_field") { //- OfN - Makes field explosion b4 removing it
FieldExplosion(trace_ent,trace_endpos,trace_ent); FieldExplosion(trace_ent,trace_endpos,trace_ent);
PutFieldWork(trace_ent); PutFieldWork(trace_ent);
@ -1110,6 +1099,17 @@ void(float shotcount, vector dir, vector spread) FireBullets =
{ {
local vector direction; local vector direction;
local vector src; local vector src;
local string st = infokey (NIL, "numpuffs");
local float puffdiv = 0;
if (st)
puffdiv = stof (st) - 1;
if (puffdiv <= 0)
puffdiv = 0;
else
puffdiv = shotcount / puffdiv;
makevectors (self.v_angle); makevectors (self.v_angle);
src = self.origin + v_forward * 10; src = self.origin + v_forward * 10;
@ -1127,6 +1127,11 @@ void(float shotcount, vector dir, vector spread) FireBullets =
else else
TraceAttack (6, direction); //WK 4 TraceAttack (6, direction); //WK 4
if (puffdiv) {
if (shotcount % puffdiv == 0)
Multi_Finish (TRUE);
}
shotcount--; shotcount--;
} }
ApplyMultiDamage (); ApplyMultiDamage ();
@ -1432,7 +1437,7 @@ void() W_FireAutoRifle =
TeamFortress : W_FireAssaultCannon TeamFortress : W_FireAssaultCannon
================ ================
*/ */
void() W_FireAssaultCannon = void(float num) W_FireAssaultCannon =
{ {
local vector dir; local vector dir;
@ -1441,7 +1446,7 @@ void() W_FireAssaultCannon =
self.currentammo = self.ammo_shells = self.ammo_shells - 1; self.currentammo = self.ammo_shells = self.ammo_shells - 1;
dir = aim (self, 100000); dir = aim (self, 100000);
deathmsg = DMSG_ASSAULTCANNON; deathmsg = DMSG_ASSAULTCANNON;
FireBullets (7, dir, '0.06 0.06 0'); FireBullets (num, dir, '0.01 0.01 0' * num);
}; };
/* /*