All hail the whitespace shambler!

This commit is contained in:
Ragnvald Maartmann-Moe IV 2003-08-27 23:43:13 +00:00
parent 78e1059007
commit 20adb3530f
7 changed files with 49 additions and 55 deletions

View file

@ -256,7 +256,7 @@ TeamCapturePlayerUpdate =
s3 = "B…"; s3 = "B…";
else else
s3 = "Â…"; s3 = "Â…";
if (teamscr1 == 0 && teamscr2 == 0) { if (teamscr1 == 0 && teamscr2 == 0) {
// CTFBOT // CTFBOT
centerprint5 (self, res, s1, s2, s3, " Capture The Flag"); centerprint5 (self, res, s1, s2, s3, " Capture The Flag");

View file

@ -120,7 +120,7 @@ SUB_CalcMove =
self.nextthink = self.ltime + traveltime; self.nextthink = self.ltime + traveltime;
// scale the destdelta vector by the time spent traveling to get velocity // scale the destdelta vector by the time spent traveling to get velocity
self.velocity = vdestdelta * (1 / traveltime); // qcc won't take vec/float self.velocity = vdestdelta * (1 / traveltime); // qcc won't take vec/float
}; };
/* /*

View file

@ -79,7 +79,6 @@ float TEAM_CAPTURE_FLAG_RETURN_TIME = 40; // seconds until auto return
// XXX EXPERT CTF Additional scoring system // XXX EXPERT CTF Additional scoring system
// bonuses // bonuses
float TEAM_CAPTURE_CARRIER_DANGER_PROTECT_BONUS = 2; // bonus for fraggin someone float TEAM_CAPTURE_CARRIER_DANGER_PROTECT_BONUS = 2; // bonus for fraggin someone
// who has recently hurt your flag carrier // who has recently hurt your flag carrier
float TEAM_CAPTURE_CARRIER_PROTECT_BONUS = 1; // bonus for fraggin someone while float TEAM_CAPTURE_CARRIER_PROTECT_BONUS = 1; // bonus for fraggin someone while
@ -92,14 +91,12 @@ float TEAM_CAPTURE_FRAG_CARRIER_ASSIST_BONUS = 2; // award for fragging a flag c
// capture happens almost immediately // capture happens almost immediately
// radii // radii
float TEAM_CAPTURE_TARGET_PROTECT_RADIUS = 400; // the radius around an object being float TEAM_CAPTURE_TARGET_PROTECT_RADIUS = 400; // the radius around an object being
// defended where a target will be worth extra frags // defended where a target will be worth extra frags
float TEAM_CAPTURE_ATTACKER_PROTECT_RADIUS = 400; // the radius around an object being float TEAM_CAPTURE_ATTACKER_PROTECT_RADIUS = 400; // the radius around an object being
// defended where an attacker will get extra frags when making kills // defended where an attacker will get extra frags when making kills
// timeouts // timeouts
float TEAM_CAPTURE_CARRIER_DANGER_PROTECT_TIMEOUT = 4; float TEAM_CAPTURE_CARRIER_DANGER_PROTECT_TIMEOUT = 4;
float TEAM_CAPTURE_CARRIER_FLAG_SINCE_TIMEOUT = 2; float TEAM_CAPTURE_CARRIER_FLAG_SINCE_TIMEOUT = 2;
float TEAM_CAPTURE_FRAG_CARRIER_ASSIST_TIMEOUT = 6; float TEAM_CAPTURE_FRAG_CARRIER_ASSIST_TIMEOUT = 6;
@ -650,7 +647,6 @@ TeamCheckLock =
// If teams are static and we've been on some team already, // If teams are static and we've been on some team already,
// put us back on the team we were on. // put us back on the team we were on.
if ((teamplay & TEAM_STATIC_TEAMS) && (self.steam >= 0)) { if ((teamplay & TEAM_STATIC_TEAMS) && (self.steam >= 0)) {
if (TeamColorIsLegal (self.steam)) { if (TeamColorIsLegal (self.steam)) {
// changing teams sucks, kill him // changing teams sucks, kill him
@ -719,7 +715,7 @@ TossBackpack =
// If we don't have any ammo, return (except AXE/GRAPPLE) // If we don't have any ammo, return (except AXE/GRAPPLE)
if (self.currentammo <= 0) { if (self.currentammo <= 0) {
if (self.weapon != IT_AXE && self.weapon != IT_GRAPPLE) if ((self.weapon != IT_AXE) && (self.weapon != IT_GRAPPLE))
return; return;
} }
@ -1305,8 +1301,7 @@ TeamCaptureSpawn =
impulse. I think he may have mailed you, but I wrote a quick version impulse. I think he may have mailed you, but I wrote a quick version
myself, which your welcome to use if you like the feature (it offsets myself, which your welcome to use if you like the feature (it offsets
some of the problems with the chat capabilities in Quake so it seems some of the problems with the chat capabilities in Quake so it seems
like a worthwhile feature). Feel free to change it like a worthwhile feature). Feel free to change it as necessary.
as necessary.
*/ */
// *Capture The Flag - Status report by Wonko // *Capture The Flag - Status report by Wonko

View file

@ -1,5 +1,5 @@
/* /*
#FILENAME# telefrag.qc
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License modify it under the terms of the GNU General Public License
@ -61,9 +61,9 @@ entity(entity spot) TelefragSelectSpawnPoint =
while (search_spot) { while (search_spot) {
e = findradius(spot.origin, 50); e = findradius(spot.origin, 50);
if (!e) if (!e) {
search_spot = 0; search_spot = 0;
else { } else {
local float occupied; local float occupied;
occupied = 0; occupied = 0;
while (!occupied && !(!e)) { while (!occupied && !(!e)) {

View file

@ -77,7 +77,7 @@ multi_trigger =
self.nextthink = time + self.wait; self.nextthink = time + self.wait;
} else { } else {
// we can't just remove (self) here, because this is a touch function // we can't just remove (self) here, because this is a touch function
// called wheil C code is looping through area links... // called while C code is looping through area links...
self.touch = SUB_Null; self.touch = SUB_Null;
self.nextthink = time + 0.1; self.nextthink = time + 0.1;
self.think = SUB_Remove; self.think = SUB_Remove;
@ -110,7 +110,7 @@ multi_touch =
if (v_forward * self.movedir < 0) if (v_forward * self.movedir < 0)
return; // not facing the right way return; // not facing the right way
} }
self.enemy = other; self.enemy = other;
multi_trigger (); multi_trigger ();
}; };
@ -368,7 +368,7 @@ spawn_tdeath =
death.nextthink = time + 0.1; death.nextthink = time + 0.1;
death.think = SUB_Remove; death.think = SUB_Remove;
death.owner = death_owner; death.owner = death_owner;
force_retouch = 2; // make sure even still objects get hit force_retouch = 2; // make sure even still objects get hit
}; };

View file

@ -108,13 +108,13 @@ vector()
wall_velocity = wall_velocity =
{ {
local vector vel; local vector vel;
vel = normalize (self.velocity); vel = normalize (self.velocity);
vel = normalize (vel + v_up * (random () - 0.5) + vel = normalize (vel + v_up * (random () - 0.5) +
v_right * (random () - 0.5)); v_right * (random () - 0.5));
vel += 2 * trace_plane_normal; vel += 2 * trace_plane_normal;
vel *= 200; vel *= 200;
return vel; return vel;
}; };
@ -200,7 +200,7 @@ AddMultiDamage =
{ {
if (!hit) if (!hit)
return; return;
if (hit != multi_ent) { if (hit != multi_ent) {
ApplyMultiDamage (); ApplyMultiDamage ();
multi_damage = damage; multi_damage = damage;
@ -231,7 +231,7 @@ void (float damage, vector dir)
TraceAttack = TraceAttack =
{ {
local vector vel, org; local vector vel, org;
vel = normalize (dir + v_up * crandom () + v_right * crandom ()); vel = normalize (dir + v_up * crandom () + v_right * crandom ());
vel += 2 * trace_plane_normal; vel += 2 * trace_plane_normal;
vel *= 200; vel *= 200;
@ -259,17 +259,17 @@ void (float shotcount, vector dir, vector spread)
FireBullets = FireBullets =
{ {
local vector direction, src; local vector direction, src;
makevectors (self.v_angle); makevectors (self.v_angle);
src = self.origin + v_forward * 10; src = self.origin + v_forward * 10;
src_z = self.absmin_z + self.size_z * 0.7; src_z = self.absmin_z + self.size_z * 0.7;
ClearMultiDamage (); ClearMultiDamage ();
traceline (src, src + dir * 2048, FALSE, self); traceline (src, src + dir * 2048, FALSE, self);
puff_org = trace_endpos - dir * 4; puff_org = trace_endpos - dir * 4;
while (shotcount > 0) { while (shotcount > 0) {
direction = dir + crandom () * spread_x * v_right + direction = dir + crandom () * spread_x * v_right +
crandom () * spread_y * v_up; crandom () * spread_y * v_up;
@ -293,7 +293,7 @@ W_FireShotgun =
msg_entity = self; msg_entity = self;
WriteByte (MSG_ONE, SVC_SMALLKICK); WriteByte (MSG_ONE, SVC_SMALLKICK);
self.currentammo = --self.ammo_shells; self.currentammo = --self.ammo_shells;
dir = aim (self, 100000); dir = aim (self, 100000);
FireBullets (6, dir, '0.04 0.04 0'); FireBullets (6, dir, '0.04 0.04 0');
@ -313,7 +313,7 @@ W_FireSuperShotgun =
msg_entity = self; msg_entity = self;
WriteByte (MSG_ONE, SVC_BIGKICK); WriteByte (MSG_ONE, SVC_BIGKICK);
self.currentammo = self.ammo_shells -= 2; self.currentammo = self.ammo_shells -= 2;
dir = aim (self, 100000); dir = aim (self, 100000);
FireBullets (14, dir, '0.14 0.08 0'); FireBullets (14, dir, '0.14 0.08 0');
@ -338,7 +338,7 @@ T_MissileTouch =
} }
damg = 100 + 20 * random (); damg = 100 + 20 * random ();
if (other.health) { if (other.health) {
if (other.classname == "monster_shambler") if (other.classname == "monster_shambler")
damg = damg * 0.5; // mostly immune damg = damg * 0.5; // mostly immune
@ -410,7 +410,7 @@ LightningDamage =
{ {
local entity e1, e2; local entity e1, e2;
local vector f; local vector f;
f = p2 - p1; f = p2 - p1;
normalize (f); normalize (f);
f_x = 0 - f_y; f_x = 0 - f_y;
@ -442,7 +442,6 @@ LightningDamage =
} }
}; };
void () void ()
W_FireLightning = W_FireLightning =
{ {
@ -474,7 +473,7 @@ W_FireLightning =
self.currentammo = --self.ammo_cells; self.currentammo = --self.ammo_cells;
org = self.origin + '0 0 16'; org = self.origin + '0 0 16';
traceline (org, org + v_forward * 600, TRUE, self); traceline (org, org + v_forward * 600, TRUE, self);
WriteBytes (MSG_MULTICAST, SVC_TEMPENTITY, TE_LIGHTNING2); WriteBytes (MSG_MULTICAST, SVC_TEMPENTITY, TE_LIGHTNING2);
@ -602,7 +601,7 @@ void ()
W_FireSuperSpikes = W_FireSuperSpikes =
{ {
local vector dir; local vector dir;
sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM); sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
self.attack_finished = time + 0.2; self.attack_finished = time + 0.2;
self.currentammo = self.ammo_nails = self.ammo_nails - 2; self.currentammo = self.ammo_nails = self.ammo_nails - 2;
@ -716,7 +715,6 @@ superspike_touch =
} }
remove (self); remove (self);
}; };
// PLAYER WEAPON USE ========================================================== // PLAYER WEAPON USE ==========================================================
@ -793,23 +791,24 @@ float ()
W_BestWeapon = W_BestWeapon =
{ {
local float it; local float it;
it = self.items; it = self.items;
if (self.waterlevel <= 1 && self.ammo_cells >= 1 && (it & IT_LIGHTNING)) if ((self.waterlevel <= 1) && (self.ammo_cells >= 1)
&& (it & IT_LIGHTNING))
return IT_LIGHTNING; return IT_LIGHTNING;
else if (self.ammo_nails >= 2 && (it & IT_SUPER_NAILGUN)) else if ((self.ammo_nails >= 2) && (it & IT_SUPER_NAILGUN))
return IT_SUPER_NAILGUN; return IT_SUPER_NAILGUN;
else if (self.ammo_shells >= 2 && (it & IT_SUPER_SHOTGUN)) else if ((self.ammo_shells >= 2) && (it & IT_SUPER_SHOTGUN))
return IT_SUPER_SHOTGUN; return IT_SUPER_SHOTGUN;
else if (self.ammo_nails >= 1 && (it & IT_NAILGUN)) else if ((self.ammo_nails >= 1) && (it & IT_NAILGUN))
return IT_NAILGUN; return IT_NAILGUN;
else if (self.ammo_shells >= 1 && (it & IT_SHOTGUN)) else if ((self.ammo_shells >= 1) && (it & IT_SHOTGUN))
return IT_SHOTGUN; return IT_SHOTGUN;
/* /*
if (self.ammo_rockets >= 1 && (it & IT_ROCKET_LAUNCHER) ) if ((self.ammo_rockets >= 1) && (it & IT_ROCKET_LAUNCHER))
return IT_ROCKET_LAUNCHER; return IT_ROCKET_LAUNCHER;
else if (self.ammo_rockets >= 1 && (it & IT_GRENADE_LAUNCHER) ) else if ((self.ammo_rockets >= 1) && (it & IT_GRENADE_LAUNCHER))
return IT_GRENADE_LAUNCHER; return IT_GRENADE_LAUNCHER;
*/ */
return IT_AXE; return IT_AXE;
@ -823,7 +822,7 @@ float() W_CheckNoAmmo =
return TRUE; return TRUE;
if (self.weapon == IT_GRAPPLE) if (self.weapon == IT_GRAPPLE)
return TRUE; return TRUE;
self.weapon = W_BestWeapon (); self.weapon = W_BestWeapon ();
W_SetCurrentAmmo (); W_SetCurrentAmmo ();
@ -1050,7 +1049,7 @@ void ()
CycleWeaponReverseCommand = CycleWeaponReverseCommand =
{ {
local float it, am; local float it, am;
it = self.items; it = self.items;
self.impulse = 0; self.impulse = 0;
@ -1299,7 +1298,7 @@ void ()
PreviousWeaponCommand = PreviousWeaponCommand =
{ {
local float fl, am; local float fl, am;
self.impulse = 0; self.impulse = 0;
am = 0; am = 0;
@ -1307,7 +1306,7 @@ PreviousWeaponCommand =
sprint (self, PRINT_HIGH, "no weapon.\n"); sprint (self, PRINT_HIGH, "no weapon.\n");
return; return;
} }
fl = self.weapon; fl = self.weapon;
self.weapon = self.previous_weapon; self.weapon = self.previous_weapon;
self.previous_weapon = fl; self.previous_weapon = fl;

View file

@ -158,7 +158,7 @@ worldspawn =
precache_model ("progs/bolt2.mdl"); // for lightning gun precache_model ("progs/bolt2.mdl"); // for lightning gun
precache_model ("progs/bolt3.mdl"); // for boss shock precache_model ("progs/bolt3.mdl"); // for boss shock
precache_model ("progs/lavaball.mdl"); // for testing precache_model ("progs/lavaball.mdl"); // for testing
precache_model ("progs/missile.mdl"); precache_model ("progs/missile.mdl");
precache_model ("progs/grenade.mdl"); precache_model ("progs/grenade.mdl");
precache_model ("progs/spike.mdl"); precache_model ("progs/spike.mdl");
@ -174,40 +174,40 @@ worldspawn =
// 0 normal // 0 normal
lightstyle (0, "m"); lightstyle (0, "m");
// 1 FLICKER (first variety) // 1 FLICKER (first variety)
lightstyle (1, "mmnmmommommnonmmonqnmmo"); lightstyle (1, "mmnmmommommnonmmonqnmmo");
// 2 SLOW STRONG PULSE // 2 SLOW STRONG PULSE
lightstyle (2, "abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba"); lightstyle (2, "abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba");
// 3 CANDLE (first variety) // 3 CANDLE (first variety)
lightstyle (3, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg"); lightstyle (3, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg");
// 4 FAST STROBE // 4 FAST STROBE
lightstyle (4, "mamamamamama"); lightstyle (4, "mamamamamama");
// 5 GENTLE PULSE 1 // 5 GENTLE PULSE 1
lightstyle (5,"jklmnopqrstuvwxyzyxwvutsrqponmlkj"); lightstyle (5,"jklmnopqrstuvwxyzyxwvutsrqponmlkj");
// 6 FLICKER (second variety) // 6 FLICKER (second variety)
lightstyle (6, "nmonqnmomnmomomno"); lightstyle (6, "nmonqnmomnmomomno");
// 7 CANDLE (second variety) // 7 CANDLE (second variety)
lightstyle (7, "mmmaaaabcdefgmmmmaaaammmaamm"); lightstyle (7, "mmmaaaabcdefgmmmmaaaammmaamm");
// 8 CANDLE (third variety) // 8 CANDLE (third variety)
lightstyle (8, "mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa"); lightstyle (8, "mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa");
// 9 SLOW STROBE (fourth variety) // 9 SLOW STROBE (fourth variety)
lightstyle (9, "aaaaaaaazzzzzzzz"); lightstyle (9, "aaaaaaaazzzzzzzz");
// 10 FLUORESCENT FLICKER // 10 FLUORESCENT FLICKER
lightstyle (10, "mmamammmmammamamaaamammma"); lightstyle (10, "mmamammmmammamamaaamammma");
// 11 SLOW PULSE NOT FADE TO BLACK // 11 SLOW PULSE NOT FADE TO BLACK
lightstyle (11, "abcdefghijklmnopqrrqponmlkjihgfedcba"); lightstyle (11, "abcdefghijklmnopqrrqponmlkjihgfedcba");
// styles 32-62 are assigned by the light program for switchable lights // styles 32-62 are assigned by the light program for switchable lights
// 63 testing // 63 testing
@ -221,7 +221,7 @@ StartFrame =
fraglimit = cvar("fraglimit"); fraglimit = cvar("fraglimit");
teamplay = cvar("teamplay"); teamplay = cvar("teamplay");
deathmatch = cvar("deathmatch"); deathmatch = cvar("deathmatch");
framecount = framecount + 1; framecount = framecount + 1;
}; };