mirror of
https://git.code.sf.net/p/quake/game-source
synced 2024-11-25 05:11:58 +00:00
All hail the whitespace shambler!
This commit is contained in:
parent
78e1059007
commit
20adb3530f
7 changed files with 49 additions and 55 deletions
|
@ -256,7 +256,7 @@ TeamCapturePlayerUpdate =
|
|||
s3 = "B…";
|
||||
else
|
||||
s3 = "Â…";
|
||||
|
||||
|
||||
if (teamscr1 == 0 && teamscr2 == 0) {
|
||||
// CTFBOT
|
||||
centerprint5 (self, res, s1, s2, s3, " Capture The Flag");
|
||||
|
|
|
@ -120,7 +120,7 @@ SUB_CalcMove =
|
|||
self.nextthink = self.ltime + traveltime;
|
||||
|
||||
// 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
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -79,7 +79,6 @@ float TEAM_CAPTURE_FLAG_RETURN_TIME = 40; // seconds until auto return
|
|||
// XXX EXPERT CTF Additional scoring system
|
||||
|
||||
// bonuses
|
||||
|
||||
float TEAM_CAPTURE_CARRIER_DANGER_PROTECT_BONUS = 2; // bonus for fraggin someone
|
||||
// who has recently hurt your flag carrier
|
||||
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
|
||||
|
||||
// radii
|
||||
|
||||
float TEAM_CAPTURE_TARGET_PROTECT_RADIUS = 400; // the radius around an object being
|
||||
// defended where a target will be worth extra frags
|
||||
float TEAM_CAPTURE_ATTACKER_PROTECT_RADIUS = 400; // the radius around an object being
|
||||
// defended where an attacker will get extra frags when making kills
|
||||
|
||||
// timeouts
|
||||
|
||||
float TEAM_CAPTURE_CARRIER_DANGER_PROTECT_TIMEOUT = 4;
|
||||
float TEAM_CAPTURE_CARRIER_FLAG_SINCE_TIMEOUT = 2;
|
||||
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,
|
||||
// put us back on the team we were on.
|
||||
|
||||
if ((teamplay & TEAM_STATIC_TEAMS) && (self.steam >= 0)) {
|
||||
if (TeamColorIsLegal (self.steam)) {
|
||||
// changing teams sucks, kill him
|
||||
|
@ -719,7 +715,7 @@ TossBackpack =
|
|||
|
||||
// If we don't have any ammo, return (except AXE/GRAPPLE)
|
||||
if (self.currentammo <= 0) {
|
||||
if (self.weapon != IT_AXE && self.weapon != IT_GRAPPLE)
|
||||
if ((self.weapon != IT_AXE) && (self.weapon != IT_GRAPPLE))
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1305,8 +1301,7 @@ TeamCaptureSpawn =
|
|||
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
|
||||
some of the problems with the chat capabilities in Quake so it seems
|
||||
like a worthwhile feature). Feel free to change it
|
||||
as necessary.
|
||||
like a worthwhile feature). Feel free to change it as necessary.
|
||||
*/
|
||||
|
||||
// *Capture The Flag - Status report by Wonko
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
#FILENAME#
|
||||
telefrag.qc
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
|
@ -61,9 +61,9 @@ entity(entity spot) TelefragSelectSpawnPoint =
|
|||
|
||||
while (search_spot) {
|
||||
e = findradius(spot.origin, 50);
|
||||
if (!e)
|
||||
if (!e) {
|
||||
search_spot = 0;
|
||||
else {
|
||||
} else {
|
||||
local float occupied;
|
||||
occupied = 0;
|
||||
while (!occupied && !(!e)) {
|
||||
|
|
|
@ -77,7 +77,7 @@ multi_trigger =
|
|||
self.nextthink = time + self.wait;
|
||||
} else {
|
||||
// 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.nextthink = time + 0.1;
|
||||
self.think = SUB_Remove;
|
||||
|
@ -110,7 +110,7 @@ multi_touch =
|
|||
if (v_forward * self.movedir < 0)
|
||||
return; // not facing the right way
|
||||
}
|
||||
|
||||
|
||||
self.enemy = other;
|
||||
multi_trigger ();
|
||||
};
|
||||
|
@ -368,7 +368,7 @@ spawn_tdeath =
|
|||
death.nextthink = time + 0.1;
|
||||
death.think = SUB_Remove;
|
||||
death.owner = death_owner;
|
||||
|
||||
|
||||
force_retouch = 2; // make sure even still objects get hit
|
||||
};
|
||||
|
||||
|
|
|
@ -108,13 +108,13 @@ vector()
|
|||
wall_velocity =
|
||||
{
|
||||
local vector vel;
|
||||
|
||||
|
||||
vel = normalize (self.velocity);
|
||||
vel = normalize (vel + v_up * (random () - 0.5) +
|
||||
v_right * (random () - 0.5));
|
||||
vel += 2 * trace_plane_normal;
|
||||
vel *= 200;
|
||||
|
||||
|
||||
return vel;
|
||||
};
|
||||
|
||||
|
@ -200,7 +200,7 @@ AddMultiDamage =
|
|||
{
|
||||
if (!hit)
|
||||
return;
|
||||
|
||||
|
||||
if (hit != multi_ent) {
|
||||
ApplyMultiDamage ();
|
||||
multi_damage = damage;
|
||||
|
@ -231,7 +231,7 @@ void (float damage, vector dir)
|
|||
TraceAttack =
|
||||
{
|
||||
local vector vel, org;
|
||||
|
||||
|
||||
vel = normalize (dir + v_up * crandom () + v_right * crandom ());
|
||||
vel += 2 * trace_plane_normal;
|
||||
vel *= 200;
|
||||
|
@ -259,17 +259,17 @@ void (float shotcount, vector dir, vector spread)
|
|||
FireBullets =
|
||||
{
|
||||
local vector direction, src;
|
||||
|
||||
|
||||
makevectors (self.v_angle);
|
||||
|
||||
src = self.origin + v_forward * 10;
|
||||
src_z = self.absmin_z + self.size_z * 0.7;
|
||||
|
||||
ClearMultiDamage ();
|
||||
|
||||
|
||||
traceline (src, src + dir * 2048, FALSE, self);
|
||||
puff_org = trace_endpos - dir * 4;
|
||||
|
||||
|
||||
while (shotcount > 0) {
|
||||
direction = dir + crandom () * spread_x * v_right +
|
||||
crandom () * spread_y * v_up;
|
||||
|
@ -293,7 +293,7 @@ W_FireShotgun =
|
|||
|
||||
msg_entity = self;
|
||||
WriteByte (MSG_ONE, SVC_SMALLKICK);
|
||||
|
||||
|
||||
self.currentammo = --self.ammo_shells;
|
||||
dir = aim (self, 100000);
|
||||
FireBullets (6, dir, '0.04 0.04 0');
|
||||
|
@ -313,7 +313,7 @@ W_FireSuperShotgun =
|
|||
|
||||
msg_entity = self;
|
||||
WriteByte (MSG_ONE, SVC_BIGKICK);
|
||||
|
||||
|
||||
self.currentammo = self.ammo_shells -= 2;
|
||||
dir = aim (self, 100000);
|
||||
FireBullets (14, dir, '0.14 0.08 0');
|
||||
|
@ -338,7 +338,7 @@ T_MissileTouch =
|
|||
}
|
||||
|
||||
damg = 100 + 20 * random ();
|
||||
|
||||
|
||||
if (other.health) {
|
||||
if (other.classname == "monster_shambler")
|
||||
damg = damg * 0.5; // mostly immune
|
||||
|
@ -410,7 +410,7 @@ LightningDamage =
|
|||
{
|
||||
local entity e1, e2;
|
||||
local vector f;
|
||||
|
||||
|
||||
f = p2 - p1;
|
||||
normalize (f);
|
||||
f_x = 0 - f_y;
|
||||
|
@ -442,7 +442,6 @@ LightningDamage =
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
void ()
|
||||
W_FireLightning =
|
||||
{
|
||||
|
@ -474,7 +473,7 @@ W_FireLightning =
|
|||
self.currentammo = --self.ammo_cells;
|
||||
|
||||
org = self.origin + '0 0 16';
|
||||
|
||||
|
||||
traceline (org, org + v_forward * 600, TRUE, self);
|
||||
|
||||
WriteBytes (MSG_MULTICAST, SVC_TEMPENTITY, TE_LIGHTNING2);
|
||||
|
@ -602,7 +601,7 @@ void ()
|
|||
W_FireSuperSpikes =
|
||||
{
|
||||
local vector dir;
|
||||
|
||||
|
||||
sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
|
||||
self.attack_finished = time + 0.2;
|
||||
self.currentammo = self.ammo_nails = self.ammo_nails - 2;
|
||||
|
@ -716,7 +715,6 @@ superspike_touch =
|
|||
}
|
||||
|
||||
remove (self);
|
||||
|
||||
};
|
||||
|
||||
// PLAYER WEAPON USE ==========================================================
|
||||
|
@ -793,23 +791,24 @@ float ()
|
|||
W_BestWeapon =
|
||||
{
|
||||
local float it;
|
||||
|
||||
|
||||
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;
|
||||
else if (self.ammo_nails >= 2 && (it & IT_SUPER_NAILGUN))
|
||||
else if ((self.ammo_nails >= 2) && (it & 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;
|
||||
else if (self.ammo_nails >= 1 && (it & IT_NAILGUN))
|
||||
else if ((self.ammo_nails >= 1) && (it & 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;
|
||||
/*
|
||||
if (self.ammo_rockets >= 1 && (it & IT_ROCKET_LAUNCHER) )
|
||||
if ((self.ammo_rockets >= 1) && (it & 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_AXE;
|
||||
|
@ -823,7 +822,7 @@ float() W_CheckNoAmmo =
|
|||
return TRUE;
|
||||
if (self.weapon == IT_GRAPPLE)
|
||||
return TRUE;
|
||||
|
||||
|
||||
self.weapon = W_BestWeapon ();
|
||||
|
||||
W_SetCurrentAmmo ();
|
||||
|
@ -1050,7 +1049,7 @@ void ()
|
|||
CycleWeaponReverseCommand =
|
||||
{
|
||||
local float it, am;
|
||||
|
||||
|
||||
it = self.items;
|
||||
self.impulse = 0;
|
||||
|
||||
|
@ -1299,7 +1298,7 @@ void ()
|
|||
PreviousWeaponCommand =
|
||||
{
|
||||
local float fl, am;
|
||||
|
||||
|
||||
self.impulse = 0;
|
||||
am = 0;
|
||||
|
||||
|
@ -1307,7 +1306,7 @@ PreviousWeaponCommand =
|
|||
sprint (self, PRINT_HIGH, "no weapon.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
fl = self.weapon;
|
||||
self.weapon = self.previous_weapon;
|
||||
self.previous_weapon = fl;
|
||||
|
|
|
@ -158,7 +158,7 @@ worldspawn =
|
|||
precache_model ("progs/bolt2.mdl"); // for lightning gun
|
||||
precache_model ("progs/bolt3.mdl"); // for boss shock
|
||||
precache_model ("progs/lavaball.mdl"); // for testing
|
||||
|
||||
|
||||
precache_model ("progs/missile.mdl");
|
||||
precache_model ("progs/grenade.mdl");
|
||||
precache_model ("progs/spike.mdl");
|
||||
|
@ -174,40 +174,40 @@ worldspawn =
|
|||
|
||||
// 0 normal
|
||||
lightstyle (0, "m");
|
||||
|
||||
|
||||
// 1 FLICKER (first variety)
|
||||
lightstyle (1, "mmnmmommommnonmmonqnmmo");
|
||||
|
||||
|
||||
// 2 SLOW STRONG PULSE
|
||||
lightstyle (2, "abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba");
|
||||
|
||||
|
||||
// 3 CANDLE (first variety)
|
||||
lightstyle (3, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg");
|
||||
|
||||
|
||||
// 4 FAST STROBE
|
||||
lightstyle (4, "mamamamamama");
|
||||
|
||||
|
||||
// 5 GENTLE PULSE 1
|
||||
lightstyle (5,"jklmnopqrstuvwxyzyxwvutsrqponmlkj");
|
||||
|
||||
|
||||
// 6 FLICKER (second variety)
|
||||
lightstyle (6, "nmonqnmomnmomomno");
|
||||
|
||||
|
||||
// 7 CANDLE (second variety)
|
||||
lightstyle (7, "mmmaaaabcdefgmmmmaaaammmaamm");
|
||||
|
||||
|
||||
// 8 CANDLE (third variety)
|
||||
lightstyle (8, "mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa");
|
||||
|
||||
|
||||
// 9 SLOW STROBE (fourth variety)
|
||||
lightstyle (9, "aaaaaaaazzzzzzzz");
|
||||
|
||||
|
||||
// 10 FLUORESCENT FLICKER
|
||||
lightstyle (10, "mmamammmmammamamaaamammma");
|
||||
|
||||
// 11 SLOW PULSE NOT FADE TO BLACK
|
||||
lightstyle (11, "abcdefghijklmnopqrrqponmlkjihgfedcba");
|
||||
|
||||
|
||||
// styles 32-62 are assigned by the light program for switchable lights
|
||||
|
||||
// 63 testing
|
||||
|
@ -221,7 +221,7 @@ StartFrame =
|
|||
fraglimit = cvar("fraglimit");
|
||||
teamplay = cvar("teamplay");
|
||||
deathmatch = cvar("deathmatch");
|
||||
|
||||
|
||||
framecount = framecount + 1;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue