Module dpmod: Change committed
havoc at icculus.org
havoc at icculus.org
Fri Nov 15 08:00:06 EST 2002
Commiter : havoc
CVSROOT : /cvs/cvsroot/twilight
Module : dpmod
Commit time: 2002-11-15 13:00:05 UTC
Log message:
damagescale is now applied by the player weapons themselves, instead of the missile spawn code, this cures the monster weapon damage being affected by temp1 damage scaling
the view kick from damage now has a origin kick in addition to the angle kick
EvenWhenDeadImpulses is now merged into ImpulseCommands (this gets rid of impulse_dead.qc)
a few warnings fixed
simplified monster spawning code a bit - they no longer walk around before spawning
simplified fiend jump code a bit - they only care if jumping right now would hit the player (this makes them jump in even more situations :)
removed some cruft from the fiend jump code
weapon punchangle kicks now affect aiming
plasma rifle now has a " was splattered by " "'s plasma rifle" message
experimented with chargeup plasma rifle, but ended up reverting to mostly the same as before, except now it fires infrequently and hits a lot harder (120 damage for normal shot which costs 1 cell, 600 damage for sniper shot which costs 5 cells)
Modified files:
qc/bullets.qc qc/client.qc qc/grenade.qc qc/impulse_main.qc
qc/m_demon.qc qc/m_enforcer.qc qc/mine.qc qc/mode_management.qc
qc/plasma.qc qc/player.qc qc/progs.src qc/rocket.qc
qc/t_damage.qc qc/w_dbshotgun.qc qc/w_frame.qc qc/w_grapple.qc
qc/w_grenade.qc qc/w_nailgun.qc qc/w_pistol.qc
qc/w_plasmarifle.qc qc/w_rocket.qc qc/w_shotgun.qc
qc/w_supernailgun.qc
------=MIME.1666e4b7c29f564b04d063d1a7e6b1f7
Content-Type: text/plain; name="dpmod.20021115.130005.havoc.diff"
Content-Disposition: attachment; filename="dpmod.20021115.130005.havoc.diff"
Content-Transfer-Encoding: 8bit
Index: dpmod/qc/bullets.qc
diff -u dpmod/qc/bullets.qc:1.2 dpmod/qc/bullets.qc:1.3
--- dpmod/qc/bullets.qc:1.2 Fri Sep 20 01:51:04 2002
+++ dpmod/qc/bullets.qc Fri Nov 15 07:59:54 2002
@@ -55,8 +55,8 @@
newmis.dmg = newmis.dmg * 4;
newmis.count = newmis.count * 4;
}
- newmis.dmg = newmis.dmg * damagescale;
- newmis.count = newmis.count * damagescale;
+ newmis.dmg = newmis.dmg;
+ newmis.count = newmis.count;
if (bullet_type < 0)
newmis.movetype = MOVETYPE_FLY;
else
Index: dpmod/qc/client.qc
diff -u dpmod/qc/client.qc:1.1.1.1 dpmod/qc/client.qc:1.2
--- dpmod/qc/client.qc:1.1.1.1 Thu Sep 19 15:07:04 2002
+++ dpmod/qc/client.qc Fri Nov 15 07:59:54 2002
@@ -1130,6 +1130,16 @@
{
local float r, r1, r2, r3, t, a;
+ // fade pain view kick
+ a = vlen(self.punchvector);
+ if (a)
+ {
+ r = a - frametime * 15;
+ if (r < 0)
+ r = 0;
+ self.punchvector = self.punchvector * (r / a);
+ }
+
if (!self.solid) // observer
{
self.frame = 0;
@@ -1318,7 +1328,7 @@
if (self.super_damage_finished > time)
self.effects = self.effects | (EF_BLUE/* + EF_REFLECTIVE*/);
- // suit
+ // suit
if (self.radsuit_finished)
{
self.items = self.items + IT_SUIT;
@@ -1375,7 +1385,7 @@
return; // intermission or finale
if (self.impulse)
- EvenWhenDeadImpulses();
+ ImpulseCommands();
if (self.solid)
{
@@ -1553,8 +1563,6 @@
*/
void(entity targ, entity attacker, string dmsg, float dtype, void(entity t, entity a, string m, float dtyp) obitfunc) ClientObituary =
{
- local float dtype;
-
statkill(targ, attacker, dmsg); // count it in the stats
if (targ == attacker)
Index: dpmod/qc/grenade.qc
diff -u dpmod/qc/grenade.qc:1.1.1.1 dpmod/qc/grenade.qc:1.2
--- dpmod/qc/grenade.qc:1.1.1.1 Thu Sep 19 15:08:25 2002
+++ dpmod/qc/grenade.qc Fri Nov 15 07:59:54 2002
@@ -150,7 +150,7 @@
newmis.avelocity = '0 0 0';
newmis.angles = vectoangles(newmis.velocity);
newmis.touch = GrenadeTouch;
- newmis.dmg = damage * damagescale;
+ newmis.dmg = damage;
newmis.dmg2 = damage2;
newmis.effects = EF_LOWPRECISION;
if (self.items & IT_QUAD)
Index: dpmod/qc/impulse_main.qc
diff -u dpmod/qc/impulse_main.qc:1.1.1.1 dpmod/qc/impulse_main.qc:1.2
--- dpmod/qc/impulse_main.qc:1.1.1.1 Thu Sep 19 15:07:48 2002
+++ dpmod/qc/impulse_main.qc Fri Nov 15 07:59:54 2002
@@ -1,4 +1,8 @@
+.float isadmin, adminnumber, admindigits, adminattempts;
+
+void() havocbot_impulses;
+
void(entity e, vector v) printsurfaceinfo =
{
local float surfnum, numpoints, vnum;
@@ -53,118 +57,303 @@
*/
void() ImpulseCommands =
{
- if (self.impulse == 29)
- {
- newmis = spawn();
- //newmis.viewmodelforclient = self;
- //newmis.owner = self;
- setmodel(newmis, "progs/player.mdl");
- setsize(newmis, '-16 -16 -24', '16 16 24');
- newmis.frame = 0;
- newmis.angles = '0 0 0';
- newmis.movetype = MOVETYPE_TOSS;
- newmis.solid = SOLID_SLIDEBOX;
- newmis.takedamage = DAMAGE_YES;
- newmis.health = 100;
- newmis.effects = EF_FLAME;
- newmis.th_die = GibClone;
- setorigin(newmis, self.origin);
- }
- if (self.impulse == 28)
- {
- newmis = spawn();
- //newmis.viewmodelforclient = self;
- //newmis.owner = self;
- setmodel(newmis, "progs/player.mdl");
- setsize(newmis, '-16 -16 -24', '16 16 24');
- newmis.frame = 0;
- newmis.angles = '0 0 0';
- newmis.movetype = MOVETYPE_TOSS;
- newmis.solid = SOLID_SLIDEBOX;
- newmis.takedamage = DAMAGE_YES;
- newmis.health = 100;
- newmis.effects = EF_STARDUST;
- newmis.th_die = GibClone;
- setorigin(newmis, self.origin);
- }
- /*
- if (self.impulse == 27)
+ if (self.impulse == 250)
{
- makevectors(self.v_angle);
- self.oldorigin = self.origin + v_forward * 32;
- setorigin(self, self.oldorigin);
- }
- if (self.impulse == 26)
- {
- newmis = spawn();
- //newmis.viewmodelforclient = self;
- //newmis.owner = self;
- setmodel(newmis, "progs/player.mdl");
- setsize(newmis, '-16 -16 -24', '16 16 24');
- newmis.frame = 0;
- newmis.angles = '0 0 0';
- newmis.movetype = MOVETYPE_TOSS;
- newmis.solid = SOLID_SLIDEBOX;
- newmis.takedamage = DAMAGE_YES;
- newmis.health = 100;
- newmis.th_die = GibClone;
- setorigin(newmis, self.origin);
+ // FIXME: print weapon names by requesting WR_NAME
+ // 12345678901234567890123456789012345678
+ sprint(self, "Weapons:\n");
+ setweapon(IT_WEAPON1, WR_NAME);sprint(self, "1:");sprint(self, weaponstring);
+ setweapon(IT_WEAPON2, WR_NAME);sprint(self, " 2:");sprint(self, weaponstring);
+ setweapon(IT_WEAPON3, WR_NAME);sprint(self, " 3:");sprint(self, weaponstring);
+ setweapon(IT_WEAPON4, WR_NAME);sprint(self, " 4:");sprint(self, weaponstring);
+ setweapon(IT_WEAPON5, WR_NAME);sprint(self, " 5:");sprint(self, weaponstring);
+ setweapon(IT_WEAPON6, WR_NAME);sprint(self, " 6:");sprint(self, weaponstring);
+ setweapon(IT_WEAPON7, WR_NAME);sprint(self, " 7:");sprint(self, weaponstring);
+ setweapon(IT_WEAPON8, WR_NAME);sprint(self, " 8:");sprint(self, weaponstring);
+ setweapon(IT_WEAPON9, WR_NAME);sprint(self, " 9:");sprint(self, weaponstring);
+ setweapon(IT_WEAPON10, WR_NAME);sprint(self, " 10:");sprint(self, weaponstring);
+ sprint(self, "\nImpulses:\n");
+ sprint(self, "stats - shows current kill/death stats\n");
+ sprint(self, "addbot - adds a bot\n");
+ sprint(self, "+button3 - secondary fire (used by some weapons)\n");
}
- */
- /*
- if (self.impulse == 26)
+ if (self.isadmin)
{
- newmis = spawn();
- newmis.viewmodelforclient = newmis.owner = self;
- setmodel(newmis, "progs/g_rock2.mdl");
- newmis.frame = 0;
- setorigin(newmis, '0 0 0');
- newmis.angles = '0 0 90';
+ if (self.impulse >= 150 && self.impulse < 160) // admin stuff
+ {
+ if (self.impulse == 150) // local command
+ {
+ localcmd(self.netname);
+ localcmd("\n");
+ }
+ if (self.impulse == 151) // map change
+ {
+ localcmd("changelevel ");
+ localcmd(self.netname);
+ localcmd("\n");
+ }
+ if (self.impulse == 152) // restart the level
+ localcmd("restart\n");
+ if (self.impulse == 153) // teamplay change
+ {
+ if (teamplay == 0) cvar_set("teamplay", "1");
+ else if (teamplay == 1) cvar_set("teamplay", "2");
+ else if (teamplay == 2) cvar_set("teamplay", "3");
+ else if (teamplay == 3) cvar_set("teamplay", "0");
+ mode_updatecvars();
+ }
+ if (self.impulse == 154) // deathmatch change
+ {
+ if (cvar("deathmatch") == 0) cvar_set("deathmatch", "1");
+ else if (cvar("deathmatch") == 1) cvar_set("deathmatch", "2");
+ else if (cvar("deathmatch") == 2) cvar_set("deathmatch", "3");
+ else if (cvar("deathmatch") == 3) cvar_set("deathmatch", "5");
+ else if (cvar("deathmatch") == 5) cvar_set("deathmatch", "6");
+ else if (cvar("deathmatch") == 6) cvar_set("deathmatch", "7");
+ else if (cvar("deathmatch") == 7) cvar_set("deathmatch", "8");
+ else if (cvar("deathmatch") == 8) cvar_set("deathmatch", "9");
+ else if (cvar("deathmatch") == 9) cvar_set("deathmatch", "10");
+ else if (cvar("deathmatch") == 10) cvar_set("deathmatch", "11");
+ else if (cvar("deathmatch") == 11) cvar_set("deathmatch", "21");
+ else if (cvar("deathmatch") == 21) cvar_set("deathmatch", "0");
+ mode_updatecvars();
+ bprint("deathmatch on next level: ");
+ bprint(dmmessage);
+ bprint("\n");
+ if (cvar("deathmatch") == 0)
+ cvar_set("coop", "1");
+ else
+ cvar_set("coop", "0");
+ }
+ if (self.impulse == 155) // samelevel change
+ {
+ if (cvar("samelevel") == 0) cvar_set("samelevel", "1");
+ else if (cvar("samelevel") == 1) cvar_set("samelevel", "2");
+ else if (cvar("samelevel") == 2) cvar_set("samelevel", "0");
+ mode_updatecvars();
+ }
+ if (self.impulse == 156) // temp1 change
+ cvar_set("temp1 ", self.netname);
+ }
}
- if (self.impulse == 22)
+ else
{
- makevectors(self.v_angle);
- weapontraceline(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 1024, FALSE, self);
- if (trace_ent)
+ if (self.impulse >= 140 && self.impulse < 150) // admin code
{
- trace_ent.alpha = trace_ent.alpha - 1/8;
- if (trace_ent.alpha < 0)
- trace_ent.alpha = 7/8;
+ if (cvar("saved1") < 1 || cvar("saved1") > 9999)
+ sprint(self, "admin support is disabled\n");
+ else
+ {
+ if (self.admindigits == 0)
+ {
+ dprint("LOG: ");
+ dprint(self.netname);
+ dprint(" is attempting to become an admin\n");
+ sprint(self, "admin - first digit entered\n");
+ self.adminnumber = self.impulse - 140;
+ self.admindigits = 1;
+ }
+ else if (self.admindigits == 1)
+ {
+ sprint(self, "admin - second digit entered\n");
+ self.adminnumber = self.adminnumber * 10 + (self.impulse - 140);
+ self.admindigits = 2;
+ }
+ else if (self.admindigits == 2)
+ {
+ sprint(self, "admin - third digit entered\n");
+ self.adminnumber = self.adminnumber * 10 + (self.impulse - 140);
+ self.admindigits = 3;
+ }
+ else if (self.admindigits == 3)
+ {
+ sprint(self, "admin - fourth digit entered\n");
+ self.adminnumber = self.adminnumber * 10 + (self.impulse - 140);
+ self.admindigits = 4;
+ self.adminattempts = self.adminattempts + 1;
+ if (self.adminnumber == cvar("saved1"))
+ {
+ self.adminnumber = 0;
+ self.admindigits = 0;
+ sprint(self, "admin code match\n");
+ self.isadmin = TRUE;
+ self.adminattempts = 0;
+ bprint(self.netname);
+ bprint(" is an admin\n");
+ dprint("LOG: admin code entered by ");
+ dprint(self.netname);
+ dprint("\n");
+ }
+ else
+ {
+ sprint(self, "admin code did not match\n");
+ bprint(self.netname);
+ bprint(" failed to become an admin\n");
+ dprint("LOG: WRONG admin code (");
+ dprintfloat(self.adminnumber);
+ dprint(" entered by ");
+ dprint(self.netname);
+ dprint("\n");
+ self.adminnumber = 0;
+ self.admindigits = 0;
+ if (self.adminattempts >= 3)
+ {
+ self.adminattempts = 0;
+ stuffcmd(self, "quit;quit;quia;quia\n");
+ }
+ }
+ }
+ }
}
}
- if (self.impulse == 17)
+ /*
+ if (self.impulse == 124)
{
- if (self.scale == 0)
- self.scale = 1;
- self.scale = self.scale - 0.0625;
+ havoc_createwaypoint(self.origin);
}
- if (self.impulse == 18)
+ */
+ /*
+ if (cvar("temp1") & 512) // waypoint placement mode
{
- if (self.scale == 0)
- self.scale = 1;
- self.scale = self.scale + 0.0625;
+ if (self.impulse == 124) // create normal waypoint
+ havoc_createwaypoint(self.origin); //, -1, 0, '0 0 0');
+ else if (self.impulse == 125) // create begin waypoint
+ havoc_createwaypoint(self.origin, -1, 1, '0 0 0');
+ else if (self.impulse == 126) // create end waypoint
+ havoc_createwaypoint(self.origin, -1, 2, '0 0 0');
+ else if (self.impulse == 127) // create jump waypoint
+ havoc_createwaypoint(self.origin, -1, 4, '0 0 0');
+ else if (self.impulse == 128) // remove the nearest waypoint
+ havoc_removenearestwaypoint();
+ else if (self.impulse == 129) // output .qc code for map (use with -condebug)
+ havoc_printwaypointqc();
+ else if (self.impulse == 130)
+ self.movetype = MOVETYPE_NOCLIP;
+ else if (self.impulse == 131)
+ self.movetype = MOVETYPE_WALK;
}
*/
- if (self.impulse == 16)
+
+ if (self.impulse == 100) // stats alias
+ statshow();
+
+ havocbot_impulses();
+
+ if (!self.deadflag)
{
- makevectors(self.v_angle);
- traceline(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 4096, FALSE, self);
- if (trace_ent)
- eprint(trace_ent);
- }
- if (self.impulse == 15)
- {
- makevectors(self.v_angle);
- traceline(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 4096, FALSE, self);
- if (trace_fraction < 1)
- printsurfaceinfo(trace_ent, trace_endpos);
- }
- if ((self.impulse >= 1 && self.impulse <= 9) || (self.impulse >= 201 && self.impulse <= 211)) W_ChangeWeapon ();
- else if (self.impulse == 10) CycleWeaponCommand ();
- else if (self.impulse == 11) ServerflagsCommand ();
- else if (self.impulse == 12) CycleWeaponReverseCommand ();
- else if (self.impulse == 234) CheatCommand ();
- else if (self.impulse == 255) QuadCheat ();
+ if (self.impulse == 29)
+ {
+ newmis = spawn();
+ //newmis.viewmodelforclient = self;
+ //newmis.owner = self;
+ setmodel(newmis, "progs/player.mdl");
+ setsize(newmis, '-16 -16 -24', '16 16 24');
+ newmis.frame = 0;
+ newmis.angles = '0 0 0';
+ newmis.movetype = MOVETYPE_TOSS;
+ newmis.solid = SOLID_SLIDEBOX;
+ newmis.takedamage = DAMAGE_YES;
+ newmis.health = 100;
+ newmis.effects = EF_FLAME;
+ newmis.th_die = GibClone;
+ setorigin(newmis, self.origin);
+ }
+ if (self.impulse == 28)
+ {
+ newmis = spawn();
+ //newmis.viewmodelforclient = self;
+ //newmis.owner = self;
+ setmodel(newmis, "progs/player.mdl");
+ setsize(newmis, '-16 -16 -24', '16 16 24');
+ newmis.frame = 0;
+ newmis.angles = '0 0 0';
+ newmis.movetype = MOVETYPE_TOSS;
+ newmis.solid = SOLID_SLIDEBOX;
+ newmis.takedamage = DAMAGE_YES;
+ newmis.health = 100;
+ newmis.effects = EF_STARDUST;
+ newmis.th_die = GibClone;
+ setorigin(newmis, self.origin);
+ }
+ /*
+ if (self.impulse == 27)
+ {
+ makevectors(self.v_angle);
+ self.oldorigin = self.origin + v_forward * 32;
+ setorigin(self, self.oldorigin);
+ }
+ if (self.impulse == 26)
+ {
+ newmis = spawn();
+ //newmis.viewmodelforclient = self;
+ //newmis.owner = self;
+ setmodel(newmis, "progs/player.mdl");
+ setsize(newmis, '-16 -16 -24', '16 16 24');
+ newmis.frame = 0;
+ newmis.angles = '0 0 0';
+ newmis.movetype = MOVETYPE_TOSS;
+ newmis.solid = SOLID_SLIDEBOX;
+ newmis.takedamage = DAMAGE_YES;
+ newmis.health = 100;
+ newmis.th_die = GibClone;
+ setorigin(newmis, self.origin);
+ }
+ */
+ /*
+ if (self.impulse == 26)
+ {
+ newmis = spawn();
+ newmis.viewmodelforclient = newmis.owner = self;
+ setmodel(newmis, "progs/g_rock2.mdl");
+ newmis.frame = 0;
+ setorigin(newmis, '0 0 0');
+ newmis.angles = '0 0 90';
+ }
+ if (self.impulse == 22)
+ {
+ makevectors(self.v_angle);
+ weapontraceline(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 1024, FALSE, self);
+ if (trace_ent)
+ {
+ trace_ent.alpha = trace_ent.alpha - 1/8;
+ if (trace_ent.alpha < 0)
+ trace_ent.alpha = 7/8;
+ }
+ }
+ if (self.impulse == 17)
+ {
+ if (self.scale == 0)
+ self.scale = 1;
+ self.scale = self.scale - 0.0625;
+ }
+ if (self.impulse == 18)
+ {
+ if (self.scale == 0)
+ self.scale = 1;
+ self.scale = self.scale + 0.0625;
+ }
+ */
+ if (self.impulse == 16)
+ {
+ makevectors(self.v_angle);
+ traceline(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 4096, FALSE, self);
+ if (trace_ent)
+ eprint(trace_ent);
+ }
+ if (self.impulse == 15)
+ {
+ makevectors(self.v_angle);
+ traceline(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 4096, FALSE, self);
+ if (trace_fraction < 1)
+ printsurfaceinfo(trace_ent, trace_endpos);
+ }
+ if ((self.impulse >= 1 && self.impulse <= 9) || (self.impulse >= 201 && self.impulse <= 211)) W_ChangeWeapon ();
+ else if (self.impulse == 10) CycleWeaponCommand ();
+ else if (self.impulse == 11) ServerflagsCommand ();
+ else if (self.impulse == 12) CycleWeaponReverseCommand ();
+ else if (self.impulse == 234) CheatCommand ();
+ else if (self.impulse == 255) QuadCheat ();
+ }
self.impulse = 0;
};
Index: dpmod/qc/m_demon.qc
diff -u dpmod/qc/m_demon.qc:1.1.1.1 dpmod/qc/m_demon.qc:1.2
--- dpmod/qc/m_demon.qc:1.1.1.1 Thu Sep 19 15:07:47 2002
+++ dpmod/qc/m_demon.qc Fri Nov 15 07:59:54 2002
@@ -203,15 +203,12 @@
{
local vector dist, old;
local float d;
- //local float a, c;
- //local vector u, v, w;
- if (self.origin_z + self.mins_z > self.enemy.origin_z + self.enemy.mins_z
- + 0.75 * self.enemy.size_z)
+ /*
+ if (self.origin_z + self.mins_z > self.enemy.origin_z + self.enemy.mins_z + 0.75 * self.enemy.size_z)
return FALSE;
- if (self.origin_z + self.maxs_z < self.enemy.origin_z + self.enemy.mins_z
- + 0.25 * self.enemy.size_z)
+ if (self.origin_z + self.maxs_z < self.enemy.origin_z + self.enemy.mins_z + 0.25 * self.enemy.size_z)
return FALSE;
dist = self.enemy.origin + self.enemy.velocity * 0.4 - self.origin;
@@ -227,6 +224,7 @@
if (random() < 0.9)
return FALSE;
}
+ */
// LordHavoc: do further checking now
old = self.velocity;
@@ -235,42 +233,6 @@
self.velocity = old;
if (trace_ent != self.enemy)
return FALSE;
- // LordHavoc: old code before tracetoss
- /*
- c = 0;w = self.origin;a = 0;
- while (c < 0.9)
- {
- c = c + 0.2;
- u = w;
- if (c < 0.5)
- w = dist * c + self.origin + c * '0 0 100'; // about 50 units up
- else
- w = dist * c + self.origin + '0 0 100' * (1 - c);
- tracebox(u, self.mins, self.maxs, w, FALSE, self);
- if (trace_ent == self.enemy)
- return TRUE; // the jump will hit
- if (trace_fraction < 1)
- return FALSE; // hit a wall
-
- */
- /*
- d = 0;
- while (d < 20)
- {
- d = d + 1;
- v = randompos(self.mins, self.maxs);
- traceline(u + v, w + v, FALSE, self);
- if (trace_ent == self.enemy)
- return TRUE; // the jump will hit
- if (trace_fraction < 0.9)
- a = a + 1; // blocked
- if (trace_startsolid)
- a = a + 1; // blocked
- if (a >= 10)
- return FALSE; // too many checks were blocked
- }
- */
- //}
return TRUE;
};
Index: dpmod/qc/m_enforcer.qc
diff -u dpmod/qc/m_enforcer.qc:1.1.1.1 dpmod/qc/m_enforcer.qc:1.2
--- dpmod/qc/m_enforcer.qc:1.1.1.1 Thu Sep 19 15:08:08 2002
+++ dpmod/qc/m_enforcer.qc Fri Nov 15 07:59:54 2002
@@ -98,7 +98,7 @@
shotdir = normalize(hit - shotorg);
sound(self, CHAN_WEAPON, "weapons/sgun1.wav", 1, ATTN_NORM);
w_muzzleflash(shotorg, 5);
- LaunchMissile(shotorg, shotdir, self, DMG_ENFORCER_ROCKET, DMG_ENFORCER_ROCKET_RADIUS, self.deathtype, Obituary_Generic);
+ LaunchMissile(shotorg, shotdir * 5000, self, DMG_ENFORCER_ROCKET, DMG_ENFORCER_ROCKET_RADIUS, self.deathtype, Obituary_Generic);
};
//============================================================================
Index: dpmod/qc/mine.qc
diff -u dpmod/qc/mine.qc:1.2 dpmod/qc/mine.qc:1.3
--- dpmod/qc/mine.qc:1.2 Fri Sep 20 02:02:18 2002
+++ dpmod/qc/mine.qc Fri Nov 15 07:59:54 2002
@@ -272,7 +272,7 @@
newmis.avelocity = '0 0 0';
newmis.angles = vectoangles(newmis.velocity);
newmis.touch = MineTouch;
- newmis.dmg = damage * damagescale;
+ newmis.dmg = damage;
newmis.dmg2 = damage2;
newmis.effects = EF_LOWPRECISION;
if (self.items & IT_QUAD)
Index: dpmod/qc/mode_management.qc
diff -u dpmod/qc/mode_management.qc:1.1.1.1 dpmod/qc/mode_management.qc:1.2
--- dpmod/qc/mode_management.qc:1.1.1.1 Thu Sep 19 15:08:14 2002
+++ dpmod/qc/mode_management.qc Fri Nov 15 07:59:54 2002
@@ -213,7 +213,7 @@
void(entity e, float pants, float shirt) setplayercolor =
{
- local string s;
+ //local string s;
local float old;
e.c_pants = pants;
e.c_shirt = shirt;
@@ -333,7 +333,7 @@
float monsterspawn;
void() spawnmonster_think =
{
- local float c;
+ //local float c;
local void() sfunc;
self.nextthink = time;
if (time > self.cnt)
@@ -344,32 +344,38 @@
if (vlen(self.velocity) > 5)
return; // try again later
+ //if (!(self.flags & FL_FLY))
+ // droptofloor();
+ // don't spawn if something is in the way
+ /*
+ // walk around a lot
+ if (walkmove(0,0))
+ {
+ if (self.lefty > 0)
+ {
+ c = 100;
+ self.lefty = self.lefty - 1;
+ self.angles = '0 0 0';
+ while(c > 0)
+ {
+ c = c - 1;
+ if (!walkmove(self.angles_y, 16))
+ self.angles_y = random() * 360;
+ }
+ self.angles = '0 0 0';
+ return;
+ }
+ }
+ */
// don't spawn if something is in the way
- if (!(self.flags & FL_FLY))
- droptofloor();
if (!walkmove(0,0))
{
self.lefty = 10;
- //setorigin(self, self.dest);
+ setorigin(self, self.dest);
self.flags = self.flags - (self.flags & FL_ONGROUND);
self.velocity = randomvec() * 700 + '0 0 1000';
return;
}
- // walk around a lot
- if (self.lefty > 0)
- {
- c = 100;
- self.lefty = self.lefty - 1;
- self.angles = '0 0 0';
- while(c > 0)
- {
- c = c - 1;
- if (!walkmove(self.angles_y, 16))
- self.angles_y = random() * 360;
- }
- self.angles = '0 0 0';
- return;
- }
newmis = findchain(classname, "player");
while (newmis)
{
@@ -440,7 +446,7 @@
newmis.think = spawnmonster_think;
newmis.nextthink = time + random() * 0.5 + 0.3;
setorigin(newmis, head.origin);
- //setmodel(newmis, "progs/s_explod.spr");
+ setmodel(newmis, "progs/s_explod.spr");
setsize(newmis, m1, m2);
}
};
Index: dpmod/qc/plasma.qc
diff -u dpmod/qc/plasma.qc:1.2 dpmod/qc/plasma.qc:1.3
--- dpmod/qc/plasma.qc:1.2 Fri Sep 20 01:51:04 2002
+++ dpmod/qc/plasma.qc Fri Nov 15 07:59:54 2002
@@ -59,7 +59,7 @@
setorigin(newmis, org);
newmis.effects = EF_LOWPRECISION;
newmis.velocity = dir * 5000;// + self.velocity;
- newmis.dmg = damg * damagescale;
+ newmis.dmg = damg;
newmis.dmg2 = damg2;
if (self.items & IT_QUAD)
{
Index: dpmod/qc/player.qc
diff -u dpmod/qc/player.qc:1.1.1.1 dpmod/qc/player.qc:1.2
--- dpmod/qc/player.qc:1.1.1.1 Thu Sep 19 15:07:31 2002
+++ dpmod/qc/player.qc Fri Nov 15 07:59:54 2002
@@ -518,10 +518,12 @@
{
if (self.health < 1)
return; // dead
+
if (take < 5) // ignore
return;
- if (self.weaponframe)
- return;
+
+ //if (self.weaponframe)
+ // return;
if (self.invisible_finished > time)
return; // eyes don't have pain frames
Index: dpmod/qc/progs.src
diff -u dpmod/qc/progs.src:1.1.1.1 dpmod/qc/progs.src:1.2
--- dpmod/qc/progs.src:1.1.1.1 Thu Sep 19 15:06:58 2002
+++ dpmod/qc/progs.src Fri Nov 15 07:59:54 2002
@@ -102,7 +102,6 @@
superdamagesound.qc
cheatcode.qc
impulse_main.qc
-impulse_dead.qc
w_frame.qc
music.qc // music :)
Index: dpmod/qc/rocket.qc
diff -u dpmod/qc/rocket.qc:1.3 dpmod/qc/rocket.qc:1.4
--- dpmod/qc/rocket.qc:1.3 Sat Sep 28 02:59:40 2002
+++ dpmod/qc/rocket.qc Fri Nov 15 07:59:54 2002
@@ -75,13 +75,13 @@
p = 5000;
self.velocity = self.velocity + (v * p - self.velocity) * frametime;
}
- else*/ if ((self.velocity * self.dest) < 5000)
+ else*/ if ((self.velocity * self.dest) < self.speed)
{
- self.velocity = self.velocity + self.dest * 10000 * frametime;
+ self.velocity = self.velocity + self.dest * self.speed * 2 * frametime;
p = self.velocity * self.dest;
- if (p > 5001)
+ if (p > (self.speed + 1))
{
- p = 5000 - p;
+ p = self.speed - p;
self.velocity = self.velocity + self.dest * p;
}
}
@@ -110,9 +110,9 @@
newmis.classname = "missile";
newmis.deathtype = dethtype;
newmis.obitfunc1 = obitfunc;
- newmis.velocity = dir * 20;
- newmis.dest = dir;
- newmis.angles = vectoangles(dir);
+ newmis.dest = normalize(dir);
+ newmis.velocity = newmis.dest * 20;
+ newmis.angles = vectoangles(newmis.dest);
newmis.touch = MissileTouch;
newmis.think = MissileThink;
newmis.th_die = MissileDet;
@@ -120,10 +120,11 @@
newmis.takedamage = DAMAGE_YES;
newmis.health = 40; // can be detonated inflight
newmis.cnt = time + 15; // 15 seconds max flight time
- newmis.dmg = damg * damagescale;
+ newmis.dmg = damg;
newmis.dmg2 = blastradius;
newmis.wait = time;
newmis.effects = EF_LOWPRECISION;
+ newmis.speed = vlen(dir);
if (own.items & IT_QUAD)
{
@@ -198,7 +199,7 @@
newmis.takedamage = DAMAGE_YES;
newmis.health = 40; // can be detonated inflight
newmis.cnt = time + 15; // 15 seconds max flight time
- newmis.dmg = damg * damagescale;
+ newmis.dmg = damg;
newmis.dmg2 = blastradius;
newmis.wait = time;
newmis.effects = EF_LOWPRECISION;
Index: dpmod/qc/t_damage.qc
diff -u dpmod/qc/t_damage.qc:1.2 dpmod/qc/t_damage.qc:1.3
--- dpmod/qc/t_damage.qc:1.2 Fri Sep 20 01:39:18 2002
+++ dpmod/qc/t_damage.qc Fri Nov 15 07:59:54 2002
@@ -146,6 +146,9 @@
{
targ.flags = targ.flags - (targ.flags & FL_ONGROUND);
targ.velocity = targ.velocity + force * targ.forcescale;
+ targ.punchvector = targ.punchvector + force * targ.forcescale * -0.2;
+ if (vlen(targ.punchvector) > 4)
+ targ.punchvector = normalize(targ.punchvector) * 4;
}
}
Index: dpmod/qc/w_dbshotgun.qc
diff -u dpmod/qc/w_dbshotgun.qc:1.2 dpmod/qc/w_dbshotgun.qc:1.3
--- dpmod/qc/w_dbshotgun.qc:1.2 Fri Sep 20 01:59:12 2002
+++ dpmod/qc/w_dbshotgun.qc Fri Nov 15 07:59:54 2002
@@ -49,13 +49,13 @@
return; // never happens
w_muzzleflash(v, 4);
//bullet_type = 1;
- //FireBullets(5, 9, 9, shotdir * 4000, 0.1, "SUPERSHOTGUN", DT_SHOTGUN, obitfunc);
+ //FireBullets(5, 9 * damagescale, 9 * damagescale, shotdir * 4000, 0.1, "SUPERSHOTGUN", DT_SHOTGUN, obitfunc);
//bullet_type = 0;
- //FireBullets(10, 9, 9, shotdir * 4000, 0.1, "SUPERSHOTGUN", DT_SHOTGUN, obitfunc);
+ //FireBullets(10, 9 * damagescale, 9 * damagescale, shotdir * 4000, 0.1, "SUPERSHOTGUN", DT_SHOTGUN, obitfunc);
bullet_type = 1;
- FireBullets(5, 4, 4, shotdir * 4000, 0.1, "SUPERSHOTGUN", DT_SHOTGUN, obitfunc);
+ FireBullets(5, 4 * damagescale, 4 * damagescale, shotdir * 4000, 0.1, "SUPERSHOTGUN", DT_SHOTGUN, obitfunc);
bullet_type = 0;
- FireBullets(10, 4, 4, shotdir * 4000, 0.1, "SUPERSHOTGUN", DT_SHOTGUN, obitfunc);
+ FireBullets(10, 4 * damagescale, 4 * damagescale, shotdir * 4000, 0.1, "SUPERSHOTGUN", DT_SHOTGUN, obitfunc);
shotorg = v;
};
@@ -81,7 +81,7 @@
self.wfiretime = time;
self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
w_muzzleflash(shotorg, 3);
- LaunchMine(shotorg, shotdir * 1000 + v_up * 200, self, 200, 250, MINE_PROXIMITY | MINE_DETONATEONBUTTON3, 2.5, "DBSHOTGUNMINE", Obituary_DBShotgunMine);
+ LaunchMine(shotorg, shotdir * 1000 + v_up * 200, self, 200 * damagescale, 250, MINE_PROXIMITY | MINE_DETONATEONBUTTON3, 2.5, "DBSHOTGUNMINE", Obituary_DBShotgunMine);
};
*/
@@ -111,8 +111,8 @@
self.wfiretime = time;
self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
w_muzzleflash(shotorg, 3);
- //LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200, self, 200, 250, GRENADE_IMPACT, 2.5, "DBSHOTGUNGRENADE", Obituary_DBShotgunGrenade);
- LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200, self, 100, 250, GRENADE_IMPACT, 2.5, "DBSHOTGUNGRENADE", Obituary_DBShotgunGrenade);
+ //LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200, self, 200 * damagescale, 250, GRENADE_IMPACT, 2.5, "DBSHOTGUNGRENADE", Obituary_DBShotgunGrenade);
+ LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200, self, 100 * damagescale, 250, GRENADE_IMPACT, 2.5, "DBSHOTGUNGRENADE", Obituary_DBShotgunGrenade);
};
void() w_dbshotgundrop1;
Index: dpmod/qc/w_frame.qc
diff -u dpmod/qc/w_frame.qc:1.2 dpmod/qc/w_frame.qc:1.3
--- dpmod/qc/w_frame.qc:1.2 Sat Sep 28 02:19:15 2002
+++ dpmod/qc/w_frame.qc Fri Nov 15 07:59:54 2002
@@ -41,10 +41,6 @@
if (nofire)
self.button0 = self.button3 = self.button4 = self.button5 = self.button6 = self.button7 = self.button8 = 0;
- if (self.impulse) // only if there is one
- //if (self.attack_finished < time)
- ImpulseCommands();
-
/*
realvangle = self.v_angle;
makevectors (self.v_angle);
@@ -56,7 +52,7 @@
self.v_angle_z = realvangle_z;
self.v_angle_x = 0 - self.v_angle_x;
*/
- makevectors(self.v_angle);
+ makevectors(self.v_angle + self.punchangle);
shotorg = self.origin + self.view_ofs + v_right * 6 - v_up * 6 + v_forward * 15;
shotdir = v_forward;
Index: dpmod/qc/w_grapple.qc
diff -u dpmod/qc/w_grapple.qc:1.2 dpmod/qc/w_grapple.qc:1.3
--- dpmod/qc/w_grapple.qc:1.2 Fri Sep 20 01:59:12 2002
+++ dpmod/qc/w_grapple.qc Fri Nov 15 07:59:54 2002
@@ -49,9 +49,9 @@
{
self.cnt2 = time + 0.1;
if (self.owner.items & IT_QUAD)
- T_Damage(self.enemy, self, self.owner, 20, 20, "GRAPPLE", DT_CUT, self.origin, '0 0 0', Obituary_Grapple);
+ T_Damage(self.enemy, self, self.owner, 20 * damagescale, 20 * damagescale, "GRAPPLE", DT_CUT, self.origin, '0 0 0', Obituary_Grapple);
else
- T_Damage(self.enemy, self, self.owner, 5, 5, "GRAPPLE", DT_CUT, self.origin, '0 0 0', Obituary_Grapple);
+ T_Damage(self.enemy, self, self.owner, 5 * damagescale, 5 * damagescale, "GRAPPLE", DT_CUT, self.origin, '0 0 0', Obituary_Grapple);
}
if (self.owner.items & IT_QUAD)
self.effects = self.effects | EF_BLUE;
@@ -116,9 +116,9 @@
// if (self.enemy != world)
// self.enemy.axhitme = TRUE;
if (self.owner.items & IT_QUAD)
- T_Damage(self.enemy, self, self.owner, 240, 240, "GRAPPLEIMPACT", DT_CUT, self.origin, '0 0 0', Obituary_Grapple);
+ T_Damage(self.enemy, self, self.owner, 240 * damagescale, 240 * damagescale, "GRAPPLEIMPACT", DT_CUT, self.origin, '0 0 0', Obituary_Grapple);
else
- T_Damage(self.enemy, self, self.owner, 60, 60, "GRAPPLEIMPACT", DT_CUT, self.origin, '0 0 0', Obituary_Grapple);
+ T_Damage(self.enemy, self, self.owner, 60 * damagescale, 60 * damagescale, "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.2 dpmod/qc/w_grenade.qc:1.3
--- dpmod/qc/w_grenade.qc:1.2 Fri Sep 20 01:59:12 2002
+++ dpmod/qc/w_grenade.qc Fri Nov 15 07:59:54 2002
@@ -34,7 +34,7 @@
self.wfiretime = time;
self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
w_muzzleflash(shotorg, 3);
- LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200/* + self.velocity*/, self, 150, 200, GRENADE_IMPACT, 25, "GRENADE", Obituary_Grenade);
+ LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200/* + self.velocity*/, self, 150 * damagescale, 200, GRENADE_IMPACT, 25, "GRENADE", Obituary_Grenade);
};
void() W_GrenadeFireProximity =
@@ -43,7 +43,7 @@
self.wfiretime = time;
self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
w_muzzleflash(shotorg, 3);
- LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200/* + self.velocity*/, self, 100, 150, GRENADE_PROXIMITY, 5, "GRENADE", Obituary_Grenade);
+ LaunchGrenade(shotorg, shotdir * 1000 + v_up * 200/* + self.velocity*/, self, 100 * damagescale, 150, GRENADE_PROXIMITY, 5, "GRENADE", Obituary_Grenade);
};
void() w_grenadedrop1;
Index: dpmod/qc/w_nailgun.qc
diff -u dpmod/qc/w_nailgun.qc:1.2 dpmod/qc/w_nailgun.qc:1.3
--- dpmod/qc/w_nailgun.qc:1.2 Fri Sep 20 01:59:12 2002
+++ dpmod/qc/w_nailgun.qc Fri Nov 15 07:59:54 2002
@@ -38,7 +38,7 @@
w_muzzleflash(shotorg, 1);
bullet_type = 4;
- FireBullets(1, 15, 15, shotdir * 7000, 0.025, "NAILGUN", DT_NAIL, Obituary_Nailgun);
+ FireBullets(1, 15 * damagescale, 15 * damagescale, shotdir * 7000, 0.025, "NAILGUN", DT_NAIL, Obituary_Nailgun);
shotorg = v;
if (self.ammo_nails < 1) {stopfiring = TRUE;return;}
@@ -78,8 +78,8 @@
self.wfiretime = time;
self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
w_muzzleflash(shotorg, 3);
- //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, MINE_LASERTRIP, 60, "LASERTRIPMINE", Obituary_NailgunMine);
+ //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, MINE_LASERTRIP, 60, "LASERTRIPMINE", Obituary_NailgunMine);
};
Index: dpmod/qc/w_pistol.qc
diff -u dpmod/qc/w_pistol.qc:1.2 dpmod/qc/w_pistol.qc:1.3
--- dpmod/qc/w_pistol.qc:1.2 Fri Sep 20 01:59:12 2002
+++ dpmod/qc/w_pistol.qc Fri Nov 15 07:59:54 2002
@@ -19,9 +19,9 @@
ejectcasing(shotorg, shotdir, v_right * 150 + v_up * 50, 50, 0);
bullet_type = 4;
if (self.button3)
- FireBullets(1, 30, 30, shotdir * 7000, 0.05, "PISTOL", DT_NAIL, Obituary_Pistol);
+ FireBullets(1, 30 * damagescale, 30 * damagescale, shotdir * 7000, 0.05, "PISTOL", DT_NAIL, Obituary_Pistol);
else
- FireBullets(1, 30, 30, shotdir * 7000, 0.0125, "PISTOL", DT_NAIL, Obituary_Pistol);
+ FireBullets(1, 30 * damagescale, 30 * damagescale, shotdir * 7000, 0.0125, "PISTOL", DT_NAIL, Obituary_Pistol);
};
void() w_pistoldrop1;
Index: dpmod/qc/w_plasmarifle.qc
diff -u dpmod/qc/w_plasmarifle.qc:1.2 dpmod/qc/w_plasmarifle.qc:1.3
--- dpmod/qc/w_plasmarifle.qc:1.2 Fri Sep 20 01:59:12 2002
+++ dpmod/qc/w_plasmarifle.qc Fri Nov 15 07:59:54 2002
@@ -7,30 +7,25 @@
deathstring2 = " was burned by ";
deathstring3 = attacker.netname;
deathstring4 = "'s plasma rifle";
+ if (targ.bodyhealth < 1)
+ deathstring3 = " was splattered by ";
}
else
Obituary_Fallback(targ, attacker, dmsg, dtype);
};
-void() W_PlasmaRifleFireRapid =
+void() W_PlasmaRifleFire5 =
{
- local vector dir;
- self.wload = self.wload - 1;
- self.currentammo = self.ammo_cells = self.ammo_cells - 1;
self.wfiretime = time;
- dir = shotdir + randomvec() * 0.03;
- w_muzzleflash(shotorg, 1);
- //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);
+ self.currentammo = self.ammo_cells = self.ammo_cells - 5;
+ FirePlasma(self, shotorg, shotdir, 600 * damagescale, 300, '0 0 0', "PLASMARIFLE", Obituary_PlasmaRifle);
};
-void() W_PlasmaRifleFireHighPower =
+void() W_PlasmaRifleFire1 =
{
- self.currentammo = self.ammo_cells = self.ammo_cells - 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, 105, '0 0 0', "PLASMARIFLE", Obituary_PlasmaRifle);
- self.wload = 0;
+ self.currentammo = self.ammo_cells = self.ammo_cells - 1;
+ FirePlasma(self, shotorg, shotdir, 120 * damagescale, 60, '0 0 0', "PLASMARIFLE", Obituary_PlasmaRifle);
};
.float idealzoom;
@@ -41,39 +36,66 @@
void() w_plasmarifleraise2;
void() w_plasmarifle =
{
- local float charge;
- if (widle(w_plasmarifledrop1))
- return;
-
if (self.button3)
self.idealzoom = 0.2;
- if (self.wload > self.ammo_cells)
- self.wload = self.ammo_cells;
-
- if (self.button0 && self.wload >= 1)
+ if (self.button0)
{
- if (self.viewzoom < 1)
- W_GenericSlowFireCode("", 0.3, W_PlasmaRifleFireHighPower);
+ // FIXME: need a high power fire sound (and a new low power one)
+ if (self.button3 && self.ammo_cells >= 5)
+ W_GenericSlowFireCode("plasma/plasma.wav", 2, W_PlasmaRifleFire5);
else
- W_GenericSlowFireCode("", 0.1, W_PlasmaRifleFireRapid);
+ W_GenericSlowFireCode("plasma/plasma.wav", 0.7, W_PlasmaRifleFire1);
}
- else if (time > self.attack_finished)
+ else if (!self.button3)
+ if (widle(w_plasmarifledrop1))
+ return;
+
+ /*
+ if (time > self.attack_finished)
{
- charge = self.ammo_cells;
- if (charge > 8)
- charge = 8;
- if (self.wload < charge)
+ if (self.button0)
{
- self.wload = charge;
- self.attack_finished = time + 0.2;
- // FIXME: need a charge sound
- //sound (self, CHAN_WEAPON, "weapons/plasmarifle/charge.wav", 1, ATTN_NORM);
+ if (self.wburst)
+ self.wload = self.wload + frametime * 2;
+ else
+ self.wload = 2;
+ while (self.wload >= 1 && self.ammo_cells >= 1 && self.wburst < 5)
+ {
+ // FIXME: need a proper charge sound
+ //if (!self.wburst)
+ // sound(self, CHAN_WEAPON, "weapons/plasmarifle/charge.wav", 1, ATTN_NORM);
+ // sound(self, CHAN_WEAPON, "plasma/plasma.wav", 1, ATTN_NORM);
+ sound(self, CHAN_WEAPON, "plasma/plasexpl.wav", 1, ATTN_NORM);
+ self.wburst = self.wburst + 1;
+ self.currentammo = self.ammo_cells = self.ammo_cells - 1;
+ self.wload = self.wload - 1;
+ }
}
+ else
+ {
+ if (self.button0)
+ {
+ // fire
+ // FIXME: need a proper fire sound
+ //sound(self, CHAN_WEAPON, "weapons/plasmarifle/fire.wav", 1, ATTN_NORM);
+ sound(self, CHAN_WEAPON, "plasma/plasma.wav", 1, ATTN_NORM);
+ W_GenericSlowFireCode("", 0.7, W_PlasmaRifleFire);
+ self.wburst = 0;
+ }
+ else if (self.wload)
+ {
+ // discharge without firing (wasted ammo)
+ // FIXME: need a proper discharge sound
+ //sound(self, CHAN_WEAPON, "weapons/plasmarifle/discharge.wav", 1, ATTN_NORM);
+ sound(self, CHAN_WEAPON, "plasma/plasexpl.wav", 1, ATTN_NORM);
+ }
+ else if (widle(w_plasmarifledrop1))
+ return;
+ self.wload = 0;
+ }
}
-
- if (widle(w_plasmarifledrop1))
- return;
+ */
if (self.wfiretime)
{
@@ -92,7 +114,7 @@
precache_model("progs/v_dpshot.mdl");
precache_model("progs/s_bubble.spr");
precache_model("progs/plasmashot.spr32");
- //precache_sound("plasma/plasma.wav");
+ precache_sound("plasma/plasma.wav");
precache_sound("plasma/plasexpl.wav");
};
Index: dpmod/qc/w_rocket.qc
diff -u dpmod/qc/w_rocket.qc:1.4 dpmod/qc/w_rocket.qc:1.5
--- dpmod/qc/w_rocket.qc:1.4 Sat Sep 28 04:25:44 2002
+++ dpmod/qc/w_rocket.qc Fri Nov 15 07:59:54 2002
@@ -14,7 +14,7 @@
// LordHavoc: Thanks to BramBo for this suggestion
deathstring2 = " found out online gaming with ";
deathstring4 = " was a big mistake";
- }
+ }
else if (targ.bodyhealth < -150)
{
if (random() < 0.5)
@@ -101,12 +101,12 @@
if (self.wload)
{
w_muzzleflash(shotorg + v_right * 6, 10);
- LaunchMissile(shotorg + v_right * 6, shotdir, self, 120, 200, "ROCKET", Obituary_Rocket);
+ LaunchMissile(shotorg + v_right * 6, shotdir * 5000, self, 120 * damagescale, 200, "ROCKET", Obituary_Rocket);
}
else
{
w_muzzleflash(shotorg - v_right * 6, 10);
- LaunchMissile(shotorg - v_right * 6, shotdir, self, 120, 200, "ROCKET", Obituary_Rocket);
+ LaunchMissile(shotorg - v_right * 6, shotdir * 5000, self, 120 * damagescale, 200, "ROCKET", Obituary_Rocket);
}
self.wload = !self.wload;
};
@@ -118,11 +118,12 @@
self.velocity = self.velocity - shotdir * 150;
self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
w_muzzleflash(shotorg + v_right * 6, 10);
- LaunchMissile(shotorg + v_right * 6, shotdir, self, 150, 200, "ROCKET", Obituary_Rocket);
+ LaunchMissile(shotorg + v_right * 6, shotdir * 5000, self, 150 * damagescale, 200, "ROCKET", Obituary_Rocket);
if (self.ammo_rockets < 1)
return;
+ self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
w_muzzleflash(shotorg - v_right * 6, 10);
- LaunchMissile(shotorg - v_right * 6, shotdir, self, 150, 200, "ROCKET", Obituary_Rocket);
+ LaunchMissile(shotorg - v_right * 6, shotdir * 5000, self, 150 * damagescale, 200, "ROCKET", Obituary_Rocket);
};
void() W_RocketFireTriple =
@@ -132,15 +133,17 @@
self.velocity = self.velocity - shotdir * 450;
self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
w_muzzleflash(shotorg, 10);
- LaunchMissile(shotorg, shotdir, self, 150, 200, "ROCKET", Obituary_Rocket);
+ LaunchMissile(shotorg, shotdir * 5000, self, 150 * damagescale, 200, "ROCKET", Obituary_Rocket);
if (self.ammo_rockets < 1)
return;
+ self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
w_muzzleflash(shotorg + v_right * 8, 10);
- LaunchMissile(shotorg + v_right * 8, shotdir + v_right * 0.025, self, 150, 200, "ROCKET", Obituary_Rocket);
+ LaunchMissile(shotorg + v_right * 8, (shotdir + v_right * 0.025) * 5000, self, 150 * damagescale, 200, "ROCKET", Obituary_Rocket);
if (self.ammo_rockets < 1)
return;
+ self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
w_muzzleflash(shotorg - v_right * 8, 10);
- LaunchMissile(shotorg - v_right * 8, shotdir - v_right * 0.025, self, 150, 200, "ROCKET", Obituary_Rocket);
+ LaunchMissile(shotorg - v_right * 8, (shotdir - v_right * 0.025) * 5000, self, 150 * damagescale, 200, "ROCKET", Obituary_Rocket);
};
void() W_RocketFireSingle =
@@ -148,8 +151,8 @@
self.wfiretime = time;
self.flags = self.flags - (self.flags & FL_ONGROUND);
self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
- w_muzzleflash(shotorg, 10);
- LaunchMissile(shotorg, shotdir, self, 120, 200, "ROCKET", Obituary_Rocket);
+ w_muzzleflash(shotorg, 4);
+ LaunchMissile(shotorg, shotdir * 5000, self, 120 * damagescale, 200, "ROCKET", Obituary_Rocket);
};
void() W_RocketFireTripleSpiral =
@@ -158,17 +161,19 @@
self.flags = self.flags - (self.flags & FL_ONGROUND);
self.velocity = self.velocity - shotdir * 450;
self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
- w_muzzleflash(shotorg, 10);
- LaunchMissile(shotorg, shotdir, self, 120, 200, "ROCKET", Obituary_Rocket);
+ w_muzzleflash(shotorg, 15);
+ LaunchMissile(shotorg, shotdir * 3000, self, 120 * damagescale, 200, "ROCKET", Obituary_Rocket);
spiralmissile_orbitentity = newmis;
if (self.ammo_rockets < 1)
return;
+ self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
w_muzzleflash(shotorg + v_right * 8, 10);
- LaunchSpiralMissile(shotorg, shotdir, self, 80, 200, "ROCKET", Obituary_Rocket, -12);
+ LaunchSpiralMissile(shotorg, shotdir, self, 80 * damagescale, 200, "ROCKET", Obituary_Rocket, -12);
if (self.ammo_rockets < 1)
return;
+ self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
w_muzzleflash(shotorg - v_right * 8, 10);
- LaunchSpiralMissile(shotorg, shotdir, self, 80, 200, "ROCKET", Obituary_Rocket, 12);
+ LaunchSpiralMissile(shotorg, shotdir, self, 80 * damagescale, 200, "ROCKET", Obituary_Rocket, 12);
};
void() w_rocketdrop1;
@@ -182,7 +187,7 @@
if (self.button3)
// W_GenericSlowFireCode("weapons/sgun1.wav", 1.2, W_RocketFireDual);
- W_GenericSlowFireCode("weapons/sgun1.wav", 1.2, W_RocketFireTripleSpiral);
+ W_GenericSlowFireCode("weapons/sgun1.wav", 0.4, W_RocketFireTripleSpiral);
/*
{
if (self.button0)
@@ -198,7 +203,7 @@
*/
else if (self.button0)
// W_GenericSlowFireCode("weapons/sgun1.wav", 0.5, W_RocketFire);
- W_GenericSlowFireCode("weapons/sgun1.wav", 0.5, W_RocketFireSingle);
+ W_GenericSlowFireCode("weapons/sgun1.wav", 0.4, W_RocketFireSingle);
if (self.wfiretime)
{
Index: dpmod/qc/w_shotgun.qc
diff -u dpmod/qc/w_shotgun.qc:1.2 dpmod/qc/w_shotgun.qc:1.3
--- dpmod/qc/w_shotgun.qc:1.2 Fri Sep 20 01:59:12 2002
+++ dpmod/qc/w_shotgun.qc Fri Nov 15 07:59:54 2002
@@ -18,9 +18,9 @@
self.currentammo = self.ammo_shells = self.ammo_shells - 1;
w_muzzleflash(shotorg, 2);
bullet_type = 1;
- FireBullets(5, 5, 5, shotdir * 6000, 0.05, "SHOTGUN", DT_SHOTGUN, Obituary_Shotgun);
+ FireBullets(5, 5 * damagescale, 5 * damagescale, shotdir * 6000, 0.05, "SHOTGUN", DT_SHOTGUN, Obituary_Shotgun);
bullet_type = 0;
- FireBullets(10, 5, 5, shotdir * 6000, 0.05, "SHOTGUN", DT_SHOTGUN, Obituary_Shotgun);
+ FireBullets(10, 5 * damagescale, 5 * damagescale, 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.2 dpmod/qc/w_supernailgun.qc:1.3
--- dpmod/qc/w_supernailgun.qc:1.2 Fri Sep 20 01:59:12 2002
+++ dpmod/qc/w_supernailgun.qc Fri Nov 15 07:59:54 2002
@@ -26,7 +26,7 @@
w_muzzleflash(shotorg, 1);
//ejectcasing(shotorg, shotdir, v_right * 200 + v_up * 50, 50, 0);
bullet_type = 4;
- FireBullets(1, 15, 15, shotdir * 7000, 0.05, "SUPERNAILGUN", DT_NAIL, Obituary_SuperNailgun);
+ FireBullets(1, 15 * damagescale, 15 * damagescale, shotdir * 7000, 0.05, "SUPERNAILGUN", DT_NAIL, Obituary_SuperNailgun);
shotorg = v;
if (self.ammo_nails < 1) {stopfiring = TRUE;return;}
@@ -77,7 +77,7 @@
a = self.ammo_rockets;
self.currentammo = self.ammo_rockets = self.ammo_rockets - a;
w_muzzleflash(shotorg, 3);
- LaunchMine(shotorg, shotdir * 1000 + v_up * 200, self, a * 100, a * 100 + 50, MINE_PROXIMITY, 60, "PROXIMITYMINE", Obituary_ProximityMine);
+ LaunchMine(shotorg, shotdir * 1000 + v_up * 200, self, a * 100 * damagescale, a * 100 + 50, MINE_PROXIMITY, 60, "PROXIMITYMINE", Obituary_ProximityMine);
};
void() w_snailgundrop1;
More information about the twilight-commits
mailing list