From 2a4c0638b29bd94f3e09b72418761f89a56603b3 Mon Sep 17 00:00:00 2001 From: archive Date: Sun, 10 Aug 1997 00:00:00 +0000 Subject: [PATCH] as released 1997-08-10 --- client.qc | 150 ++++++++++++++++++++++++++++++++++++++--------------- combat.qc | 19 ++++++- defs.qc | 16 ++++-- items.qc | 131 +++++++++++++++++++++++++++++++++++++++------- misc.qc | 40 +++++++------- player.qc | 5 +- progs.src | 2 +- server.qc | 4 +- weapons.qc | 95 ++++++++++++++++++++++++++------- world.qc | 12 +++-- 10 files changed, 361 insertions(+), 113 deletions(-) diff --git a/client.qc b/client.qc index 01181d0..490ed15 100644 --- a/client.qc +++ b/client.qc @@ -134,11 +134,21 @@ entity() FindIntermission = void() GotoNextMap = { + local string newmap; + //ZOID: 12-13-96, samelevel is overloaded, only 1 works for same level + if (cvar("samelevel") == 1) // if samelevel is set, stay on same level changelevel (mapname); - else - changelevel (nextmap); + else { + // configurable map lists, see if the current map exists as a + // serverinfo/localinfo var + newmap = infokey(world, mapname); + if (newmap != "") + changelevel (newmap); + else + changelevel (nextmap); + } }; @@ -327,7 +337,7 @@ entity() SelectSpawnPoint = { totalspots = totalspots + 1; - thing=findradius(spot.origin, 256); + thing=findradius(spot.origin, 84); pcount=0; while (thing) { @@ -443,6 +453,7 @@ called each time a player enters a new level void() PutClientInServer = { local entity spot; + local string s; self.classname = "player"; self.health = 100; @@ -508,6 +519,53 @@ void() PutClientInServer = rj = stof(infokey(world, "rj")); } + if (deathmatch == 4) + { + self.ammo_shells = 0; + if (stof(infokey(world, "axe")) == 0) + { + self.ammo_nails = 255; + self.ammo_shells = 255; + self.ammo_rockets = 255; + self.ammo_cells = 255; + self.items = self.items | IT_NAILGUN; + self.items = self.items | IT_SUPER_NAILGUN; + self.items = self.items | IT_SUPER_SHOTGUN; + self.items = self.items | IT_ROCKET_LAUNCHER; +// self.items = self.items | IT_GRENADE_LAUNCHER; + self.items = self.items | IT_LIGHTNING; + } + self.items = self.items - (self.items & (IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3)) + IT_ARMOR3; + self.armorvalue = 200; + self.armortype = 0.8; + self.health = 250; + self.items = self.items | IT_INVULNERABILITY; + self.invincible_time = 1; + self.invincible_finished = time + 3; + } + + if (deathmatch == 5) + { + self.ammo_nails = 80; + self.ammo_shells = 30; + self.ammo_rockets = 10; + self.ammo_cells = 30; + self.items = self.items | IT_NAILGUN; + self.items = self.items | IT_SUPER_NAILGUN; + self.items = self.items | IT_SUPER_SHOTGUN; + self.items = self.items | IT_ROCKET_LAUNCHER; + self.items = self.items | IT_GRENADE_LAUNCHER; + self.items = self.items | IT_LIGHTNING; + self.items = self.items - (self.items & (IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3)) + IT_ARMOR3; + self.armorvalue = 200; + self.armortype = 0.8; + self.health = 200; + self.items = self.items | IT_INVULNERABILITY; + self.invincible_time = 1; + self.invincible_finished = time + 3; + } + + }; @@ -563,6 +621,10 @@ go to the next level for deathmatch void() NextLevel = { local entity o; + local string newmap; + + if (nextmap != "") + return; // already done if (mapname == "start") { @@ -596,7 +658,7 @@ void() NextLevel = } else { -// find a trigger changelevel + // find a trigger changelevel o = find(world, classname, "trigger_changelevel"); if (!o || mapname == "start") { // go back to same map if no trigger_changelevel @@ -957,9 +1019,15 @@ void() CheckPowerups = self.invincible_finished = 0; } if (self.invincible_finished > time) + { self.effects = self.effects | EF_DIMLIGHT; + self.effects = self.effects | EF_RED; + } else + { self.effects = self.effects - (self.effects & EF_DIMLIGHT); + self.effects = self.effects - (self.effects & EF_RED); + } } // super damage @@ -972,7 +1040,10 @@ void() CheckPowerups = { if (self.super_time == 1) { - sprint (self, PRINT_HIGH, "Quad Damage is wearing off\n"); + if (deathmatch == 4) + sprint (self, PRINT_HIGH, "OctaPower is wearing off\n"); + else + sprint (self, PRINT_HIGH, "Quad Damage is wearing off\n"); stuffcmd (self, "bf\n"); sound (self, CHAN_AUTO, "items/damage2.wav", 1, ATTN_NORM); self.super_time = time + 1; @@ -988,13 +1059,26 @@ void() CheckPowerups = if (self.super_damage_finished < time) { // just stopped self.items = self.items - IT_QUAD; + if (deathmatch == 4) + { + self.ammo_cells = 255; + self.armorvalue = 1; + self.armortype = 0.8; + self.health = 100; + } self.super_damage_finished = 0; self.super_time = 0; } if (self.super_damage_finished > time) + { self.effects = self.effects | EF_DIMLIGHT; + self.effects = self.effects | EF_BLUE; + } else + { self.effects = self.effects - (self.effects & EF_DIMLIGHT); + self.effects = self.effects - (self.effects & EF_BLUE); + } } // suit @@ -1127,6 +1211,19 @@ void(entity targ, entity attacker) ClientObituary = if (targ.classname == "player") { + + if (deathmatch > 3) + { + if (targ.deathtype == "selfwater") + { + targ.deathtype = ""; + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM," electrocutes himself.\n "); + targ.frags = targ.frags - 1; + return; + } + } + if (attacker.classname == "teledeath") { bprint (PRINT_MEDIUM,targ.netname); @@ -1162,6 +1259,7 @@ void(entity targ, entity attacker) ClientObituary = return; } } + if (attacker.classname == "player") { //ZOID 12-13-96: self.team doesn't work in QW. Use keys @@ -1265,7 +1363,10 @@ void(entity targ, entity attacker) ClientObituary = bprint (PRINT_MEDIUM, " a new one\n"); return; } - deathstring2 = "'s quad rocket\n"; + if (deathmatch == 4) + deathstring2 = "'s OctaRocket!\n"; + else + deathstring2 = "'s quad rocket\n"; } else { @@ -1332,43 +1433,6 @@ void(entity targ, entity attacker) ClientObituary = return; } - if (attacker.flags & FL_MONSTER) - { - if (attacker.classname == "monster_army") - bprint (PRINT_MEDIUM," was shot by a Grunt\n"); - if (attacker.classname == "monster_demon1") - bprint (PRINT_MEDIUM," was eviscerated by a Fiend\n"); - if (attacker.classname == "monster_dog") - bprint (PRINT_MEDIUM," was mauled by a Rottweiler\n"); - if (attacker.classname == "monster_dragon") - bprint (PRINT_MEDIUM," was fried by a Dragon\n"); - if (attacker.classname == "monster_enforcer") - bprint (PRINT_MEDIUM," was blasted by an Enforcer\n"); - if (attacker.classname == "monster_fish") - bprint (PRINT_MEDIUM," was fed to the Rotfish\n"); - if (attacker.classname == "monster_hell_knight") - bprint (PRINT_MEDIUM," was slain by a Death Knight\n"); - if (attacker.classname == "monster_knight") - bprint (PRINT_MEDIUM," was slashed by a Knight\n"); - if (attacker.classname == "monster_ogre") - bprint (PRINT_MEDIUM," was destroyed by an Ogre\n"); - if (attacker.classname == "monster_oldone") - bprint (PRINT_MEDIUM," became one with Shub-Niggurath\n"); - if (attacker.classname == "monster_shalrath") - bprint (PRINT_MEDIUM," was exploded by a Vore\n"); - if (attacker.classname == "monster_shambler") - bprint (PRINT_MEDIUM," was smashed by a Shambler\n"); - if (attacker.classname == "monster_tarbaby") - bprint (PRINT_MEDIUM," was slimed by a Spawn\n"); - if (attacker.classname == "monster_vomit") - bprint (PRINT_MEDIUM," was vomited on by a Vomitus\n"); - if (attacker.classname == "monster_wizard") - bprint (PRINT_MEDIUM," was scragged by a Scrag\n"); - if (attacker.classname == "monster_zombie") - bprint (PRINT_MEDIUM," joins the Zombies\n"); - - return; - } if (attacker.classname == "explo_box") { bprint (PRINT_MEDIUM," blew up\n"); diff --git a/combat.qc b/combat.qc index a6e808a..f65c19a 100644 --- a/combat.qc +++ b/combat.qc @@ -2,6 +2,7 @@ void() T_MissileTouch; void() info_player_start; void(entity targ, entity attacker) ClientObituary; +void(entity inflictor, entity attacker, float damage, entity ignore) T_RadiusDamage; /*SERVER void() monster_death_use; @@ -120,9 +121,13 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage= // used by buttons and triggers to set activator for target firing damage_attacker = attacker; + // check for quad damage powerup on the attacker if (attacker.super_damage_finished > time) - damage = damage * 4; + if (deathmatch == 4) + damage = damage * 8; + else + damage = damage * 4; // save damage based on the target's armor level @@ -170,6 +175,8 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage= } + + // check for godmode or invincibility if (targ.flags & FL_GODMODE) return; @@ -198,7 +205,7 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage= // do the damage targ.health = targ.health - take; - + if (targ.health <= 0) { Killed (targ, attacker); @@ -249,6 +256,11 @@ void(entity inflictor, entity attacker, float damage, entity ignore) T_RadiusDam while (head) { + //bprint (PRINT_HIGH, head.classname); + //bprint (PRINT_HIGH, " | "); + //bprint (PRINT_HIGH, head.netname); + //bprint (PRINT_HIGH, "\n"); + if (head != ignore) { if (head.takedamage) @@ -258,6 +270,7 @@ void(entity inflictor, entity attacker, float damage, entity ignore) T_RadiusDam if (points < 0) points = 0; points = damage - points; + if (head == attacker) points = points * 0.5; if (points > 0) @@ -268,8 +281,10 @@ void(entity inflictor, entity attacker, float damage, entity ignore) T_RadiusDam T_Damage (head, inflictor, attacker, points*0.5); else T_Damage (head, inflictor, attacker, points); + } } + } } head = head.chain; diff --git a/defs.qc b/defs.qc index ed4d69b..8305c98 100644 --- a/defs.qc +++ b/defs.qc @@ -390,8 +390,9 @@ float EF_BRIGHTLIGHT = 4; float EF_DIMLIGHT = 8; float EF_FLAG1 = 16; float EF_FLAG2 = 32; - - +// GLQuakeWorld Stuff +float EF_BLUE = 64; // Blue Globe effect for Quad +float EF_RED = 128; // Red Globe effect for Pentagram // messages float MSG_BROADCAST = 0; // unreliable to all float MSG_ONE = 1; // reliable to one (msg_entity) @@ -401,7 +402,7 @@ float MSG_MULTICAST = 4; // for multicast() call // message levels float PRINT_LOW = 0; // pickup messages -float PRINT_MEDIUM = 1; // death messages +float PRINT_MEDIUM = 1; // death messages float PRINT_HIGH = 2; // critical messages float PRINT_CHAT = 3; // also goes to chat console @@ -413,6 +414,9 @@ float MULTICAST_ALL_R = 3; // every client, reliable float MULTICAST_PHS_R = 4; // within hearing, reliable float MULTICAST_PVS_R = 5; // within sight, reliable + + + //================================================ // @@ -489,6 +493,12 @@ float AS_MISSILE = 4; .float voided; .float walkframe; +// Zoid Additions +.float maxspeed; // Used to set Maxspeed on a player +.float gravity; // Gravity Multiplier (0 to 1.0) + + + .float attack_finished; .float pain_finished; diff --git a/items.qc b/items.qc index ee874eb..c543081 100644 --- a/items.qc +++ b/items.qc @@ -30,7 +30,7 @@ void() q_touch = { local entity stemp; local float best; -local string s; +local string s; if (other.classname != "player") return; @@ -44,6 +44,12 @@ local string s; self.solid = SOLID_NOT; other.items = other.items | IT_QUAD; self.model = string_null; + if (deathmatch == 4) + { + other.armortype = 0; + other.armorvalue = 0 * 0.01; + other.ammo_cells = 0; + } // do the apropriate action other.super_time = 1; @@ -52,12 +58,13 @@ local string s; s=ftos(rint(other.super_damage_finished - time)); bprint (PRINT_LOW, other.netname); - bprint (PRINT_LOW, " recovered a Quad with "); + if (deathmatch == 4) + bprint (PRINT_LOW, " recovered an OctaPower with "); + else + bprint (PRINT_LOW, " recovered a Quad with "); bprint (PRINT_LOW, s); bprint (PRINT_LOW, " seconds remaining!\n"); - - activator = other; SUB_UseTargets(); // fire all targets / killtargets }; @@ -93,7 +100,7 @@ void() r_touch = { local entity stemp; local float best; -local string s; +local string s; if (other.classname != "player") return; @@ -146,9 +153,6 @@ void(float timeleft) DropRing = item.think = SUB_Remove; }; - - - /* ============ PlaceItem @@ -275,6 +279,10 @@ void() health_touch = local float amount; local string s; + if (deathmatch == 4) + if (other.invincible_time > 0) + return; + if (other.classname != "player") return; @@ -308,8 +316,11 @@ void() health_touch = if (self.healtype == 2) { other.items = other.items | IT_SUPERHEALTH; - self.nextthink = time + 5; - self.think = item_megahealth_rot; + if (deathmatch != 4) + { + self.nextthink = time + 5; + self.think = item_megahealth_rot; + } self.owner = other; } else @@ -366,6 +377,10 @@ void() armor_touch = if (other.classname != "player") return; + if (deathmatch == 4) + if (other.invincible_time > 0) + return; + if (self.classname == "item_armor1") { type = 0.3; @@ -551,7 +566,7 @@ void() weapon_touch = best = W_BestWeapon(); self = stemp; - if (deathmatch == 2 || deathmatch == 3) + if (deathmatch == 2 || deathmatch == 3 || deathmatch == 5) leave = 1; else leave = 0; @@ -645,7 +660,7 @@ void() weapon_touch = if (leave) return; - if (deathmatch!=3) + if (deathmatch!=3 || deathmatch !=5) { // remove it in single player, or setup for respawning in deathmatch self.model = string_null; @@ -663,6 +678,8 @@ void() weapon_touch = */ void() weapon_supershotgun = +{ +if (deathmatch <= 3) { precache_model ("progs/g_shot.mdl"); setmodel (self, "progs/g_shot.mdl"); @@ -671,12 +688,15 @@ void() weapon_supershotgun = self.touch = weapon_touch; setsize (self, '-16 -16 0', '16 16 56'); StartItem (); +} }; /*QUAKED weapon_nailgun (0 .5 .8) (-16 -16 0) (16 16 32) */ void() weapon_nailgun = +{ +if (deathmatch <= 3) { precache_model ("progs/g_nail.mdl"); setmodel (self, "progs/g_nail.mdl"); @@ -685,12 +705,15 @@ void() weapon_nailgun = self.touch = weapon_touch; setsize (self, '-16 -16 0', '16 16 56'); StartItem (); +} }; /*QUAKED weapon_supernailgun (0 .5 .8) (-16 -16 0) (16 16 32) */ void() weapon_supernailgun = +{ +if (deathmatch <= 3) { precache_model ("progs/g_nail2.mdl"); setmodel (self, "progs/g_nail2.mdl"); @@ -699,12 +722,15 @@ void() weapon_supernailgun = self.touch = weapon_touch; setsize (self, '-16 -16 0', '16 16 56'); StartItem (); +} }; /*QUAKED weapon_grenadelauncher (0 .5 .8) (-16 -16 0) (16 16 32) */ void() weapon_grenadelauncher = +{ +if (deathmatch <= 3) { precache_model ("progs/g_rock.mdl"); setmodel (self, "progs/g_rock.mdl"); @@ -713,12 +739,15 @@ void() weapon_grenadelauncher = self.touch = weapon_touch; setsize (self, '-16 -16 0', '16 16 56'); StartItem (); +} }; /*QUAKED weapon_rocketlauncher (0 .5 .8) (-16 -16 0) (16 16 32) */ void() weapon_rocketlauncher = +{ +if (deathmatch <= 3) { precache_model ("progs/g_rock2.mdl"); setmodel (self, "progs/g_rock2.mdl"); @@ -727,6 +756,7 @@ void() weapon_rocketlauncher = self.touch = weapon_touch; setsize (self, '-16 -16 0', '16 16 56'); StartItem (); +} }; @@ -734,6 +764,8 @@ void() weapon_rocketlauncher = */ void() weapon_lightning = +{ +if (deathmatch <= 3) { precache_model ("progs/g_light.mdl"); setmodel (self, "progs/g_light.mdl"); @@ -742,6 +774,7 @@ void() weapon_lightning = self.touch = weapon_touch; setsize (self, '-16 -16 0', '16 16 56'); StartItem (); +} }; @@ -836,7 +869,7 @@ local float best; // Xian -- If playing in DM 3.0 mode, halve the time ammo respawns - if (deathmatch == 3) + if (deathmatch == 3 || deathmatch == 5) self.nextthink = time + 15; self.think = SUB_regen; @@ -855,6 +888,9 @@ float WEAPON_BIG2 = 1; void() item_shells = { + if (deathmatch == 4) + return; + self.touch = ammo_touch; if (self.spawnflags & WEAPON_BIG2) @@ -880,6 +916,9 @@ void() item_shells = void() item_spikes = { + if (deathmatch == 4) + return; + self.touch = ammo_touch; if (self.spawnflags & WEAPON_BIG2) @@ -898,6 +937,7 @@ void() item_spikes = self.netname = "nails"; setsize (self, '0 0 0', '32 32 56'); StartItem (); + }; /*QUAKED item_rockets (0 .5 .8) (0 0 0) (32 32 32) big @@ -905,6 +945,9 @@ void() item_spikes = void() item_rockets = { + if (deathmatch == 4) + return; + self.touch = ammo_touch; if (self.spawnflags & WEAPON_BIG2) @@ -923,6 +966,7 @@ void() item_rockets = self.netname = "rockets"; setsize (self, '0 0 0', '32 32 56'); StartItem (); + }; @@ -931,6 +975,9 @@ void() item_rockets = void() item_cells = { + if (deathmatch == 4) + return; + self.touch = ammo_touch; if (self.spawnflags & WEAPON_BIG2) @@ -949,6 +996,7 @@ void() item_cells = self.netname = "cells"; setsize (self, '0 0 0', '32 32 56'); StartItem (); + }; @@ -1288,6 +1336,12 @@ local float best; if (self.classname == "item_artifact_super_damage") { + if (deathmatch == 4) + { + other.armortype = 0; + other.armorvalue = 0 * 0.01; + other.ammo_cells = 0; + } other.super_time = 1; other.super_damage_finished = time + 30; } @@ -1312,6 +1366,7 @@ void() item_artifact_invulnerability = self.noise = "items/protect.wav"; setmodel (self, "progs/invulner.mdl"); self.netname = "Pentagram of Protection"; + self.effects = self.effects | EF_RED; self.items = IT_INVULNERABILITY; setsize (self, '-16 -16 -24', '16 16 32'); StartItem (); @@ -1369,8 +1424,12 @@ void() item_artifact_super_damage = precache_sound ("items/damage3.wav"); self.noise = "items/damage.wav"; setmodel (self, "progs/quaddama.mdl"); - self.netname = "Quad Damage"; + if (deathmatch == 4) + self.netname == "OctaPower"; + else + self.netname = "Quad Damage"; self.items = IT_QUAD; + self.effects = self.effects | EF_BLUE; setsize (self, '-16 -16 -24', '16 16 32'); StartItem (); }; @@ -1391,9 +1450,12 @@ void() BackpackTouch = local float best, old, new; local entity stemp; local float acount; - local float b_switch; + if (deathmatch == 4) + if (other.invincible_time > 0) + return; + if ((stof(infokey(other,"b_switch"))) == 0) b_switch = 8; else @@ -1408,6 +1470,41 @@ void() BackpackTouch = acount = 0; sprint (other, PRINT_LOW, "You get "); + if (deathmatch == 4) + { + other.health = other.health + 10; + sprint (other, PRINT_LOW, "10 additional health\n"); + if ((other.health > 250) && (other.health < 300)) + sound (other, CHAN_ITEM, "items/protect3.wav", 1, ATTN_NORM); + else + sound (other, CHAN_ITEM, "weapons/lock4.wav", 1, ATTN_NORM); + stuffcmd (other, "bf\n"); + remove(self); + + if (other.health >299) + { + if (other.invincible_time != 1) + { + other.invincible_time = 1; + other.invincible_finished = time + 30; + other.items = other.items | IT_INVULNERABILITY; + + other.super_time = 1; + other.super_damage_finished = time + 30; + other.items = other.items | IT_QUAD; + + other.ammo_cells = 0; + + + sound (other, CHAN_VOICE, "boss1/sight1.wav", 1, ATTN_NORM); + stuffcmd (other, "bf\n"); + bprint (PRINT_HIGH, other.netname); + bprint (PRINT_HIGH, " attains bonus powers!!!\n"); + } + } + self = other; + return; + } if (self.items) if ((other.items & self.items) == 0) { @@ -1473,7 +1570,7 @@ void() BackpackTouch = sprint (other,PRINT_LOW, " cells"); } - if ( (deathmatch==3) & ( (WeaponCode(new)==6) || (WeaponCode(new)==7) ) & (other.ammo_rockets < 5) ) + if ( (deathmatch==3 || deathmatch == 5) & ( (WeaponCode(new)==6) || (WeaponCode(new)==7) ) & (other.ammo_rockets < 5) ) other.ammo_rockets = 5; sprint (other, PRINT_LOW, "\n"); @@ -1501,8 +1598,6 @@ void() BackpackTouch = Deathmatch_Weapon (old, new); } } - - W_SetCurrentAmmo (); }; diff --git a/misc.qc b/misc.qc index f45c75e..d92b9a9 100644 --- a/misc.qc +++ b/misc.qc @@ -41,7 +41,7 @@ If targeted, it will toggle between on or off. void() light = { if (!self.targetname) - { // inert light + { // inert light remove(self); return; } @@ -181,7 +181,7 @@ void() misc_fireball = void() fire_fly = { -local entity fireball; +local entity fireball; fireball = spawn(); fireball.solid = SOLID_TRIGGER; @@ -235,7 +235,7 @@ TESTING THING void() misc_explobox = { - local float oldz; + local float oldz; self.solid = SOLID_BBOX; self.movetype = MOVETYPE_NONE; @@ -268,7 +268,7 @@ Smaller exploding box, REGISTERED ONLY void() misc_explobox2 = { - local float oldz; + local float oldz; self.solid = SOLID_BBOX; self.movetype = MOVETYPE_NONE; @@ -294,7 +294,7 @@ void() misc_explobox2 = //============================================================================ -float SPAWNFLAG_SUPERSPIKE = 1; +float SPAWNFLAG_SUPERSPIKE = 1; float SPAWNFLAG_LASER = 2; void() Laser_Touch = @@ -302,7 +302,7 @@ void() Laser_Touch = local vector org; if (other == self.owner) - return; // don't explode on owner + return; // don't explode on owner if (pointcontents(self.origin) == CONTENT_SKY) { @@ -329,12 +329,12 @@ void() Laser_Touch = multicast (org, MULTICAST_PVS); } - remove(self); + remove(self); }; void(vector org, vector vec) LaunchLaser = { - local vector vec; + local vector vec; if (self.classname == "monster_enforcer") sound (self, CHAN_WEAPON, "enforcer/enfire.wav", 1, ATTN_NORM); @@ -348,7 +348,7 @@ void(vector org, vector vec) LaunchLaser = newmis.effects = EF_DIMLIGHT; setmodel (newmis, "progs/laser.mdl"); - setsize (newmis, '0 0 0', '0 0 0'); + setsize (newmis, '0 0 0', '0 0 0'); setorigin (newmis, org); @@ -447,7 +447,7 @@ void() air_bubbles = void() make_bubbles = { -local entity bubble; +local entity bubble; bubble = spawn(); setmodel (bubble, "progs/s_bubble.spr"); @@ -468,7 +468,7 @@ local entity bubble; void() bubble_split = { -local entity bubble; +local entity bubble; bubble = spawn(); setmodel (bubble, "progs/s_bubble.spr"); setorigin (bubble, self.origin); @@ -492,7 +492,7 @@ void() bubble_remove = { if (other.classname == self.classname) { -// dprint ("bump"); +// dprint ("bump"); return; } remove(self); @@ -500,8 +500,8 @@ void() bubble_remove = void() bubble_bob = { -local float rnd1, rnd2, rnd3; -local vector vtmp1, modi; +local float rnd1, rnd2, rnd3; +local vector vtmp1, modi; self.cnt = self.cnt + 1; if (self.cnt == 4) @@ -563,7 +563,7 @@ SIMPLE BMODELS */ void() func_wall_use = -{ // change to alternate textures +{ // change to alternate textures self.frame = 1 - self.frame; }; @@ -573,7 +573,7 @@ This is just a solid wall if not inhibitted void() func_wall = { self.angles = '0 0 0'; - self.movetype = MOVETYPE_PUSH; // so it doesn't get pushed by anything + self.movetype = MOVETYPE_PUSH; // so it doesn't get pushed by anything self.solid = SOLID_BSP; self.use = func_wall_use; setmodel (self, self.model); @@ -600,10 +600,10 @@ void() func_episodegate = { if (!(serverflags & self.spawnflags)) - return; // can still enter episode + return; // can still enter episode self.angles = '0 0 0'; - self.movetype = MOVETYPE_PUSH; // so it doesn't get pushed by anything + self.movetype = MOVETYPE_PUSH; // so it doesn't get pushed by anything self.solid = SOLID_BSP; self.use = func_wall_use; setmodel (self, self.model); @@ -616,9 +616,9 @@ void() func_bossgate = { if ( (serverflags & 15) == 15) - return; // all episodes completed + return; // all episodes completed self.angles = '0 0 0'; - self.movetype = MOVETYPE_PUSH; // so it doesn't get pushed by anything + self.movetype = MOVETYPE_PUSH; // so it doesn't get pushed by anything self.solid = SOLID_BSP; self.use = func_wall_use; setmodel (self, self.model); diff --git a/player.qc b/player.qc index ac33985..0c5dec2 100644 --- a/player.qc +++ b/player.qc @@ -555,7 +555,10 @@ void() PlayerDie = { DropQuad (self.super_damage_finished - time); bprint (PRINT_LOW, self.netname); - bprint (PRINT_LOW, " lost a quad with "); + if (deathmatch == 4) + bprint (PRINT_LOW, " lost an OctaPower with "); + else + bprint (PRINT_LOW, " lost a quad with "); s = ftos(rint(self.super_damage_finished - time)); bprint (PRINT_LOW, s); bprint (PRINT_LOW, " seconds remaining\n"); diff --git a/progs.src b/progs.src index 5b934a1..be0cb25 100644 --- a/progs.src +++ b/progs.src @@ -1,4 +1,4 @@ -./qwprogs.dat +../qwprogs.dat defs.qc subs.qc diff --git a/server.qc b/server.qc index 37a2e6e..db5d250 100644 --- a/server.qc +++ b/server.qc @@ -44,13 +44,13 @@ moving towards it, change the next destination and continue. */ void() t_movetarget = { -local entity temp; +local entity temp; if (other.movetarget != self) return; if (other.enemy) - return; // fighting, not following a path + return; // fighting, not following a path temp = self; self = other; diff --git a/weapons.qc b/weapons.qc index e3e5f85..fe8d3d2 100644 --- a/weapons.qc +++ b/weapons.qc @@ -51,7 +51,10 @@ void() W_FireAxe = { trace_ent.axhitme = 1; SpawnBlood (org, 20); - T_Damage (trace_ent, self, self, 20); + if (deathmatch > 3) + T_Damage (trace_ent, self, self, 75); + else + T_Damage (trace_ent, self, self, 20); } else { // hit wall @@ -144,7 +147,6 @@ void(float damage) spawn_touchblood = SpawnBlood (self.origin + vel*0.01, damage); }; - /* ============================================================================== @@ -221,9 +223,7 @@ void() Multi_Finish = /* ============================================================================== - BULLETS - ============================================================================== */ @@ -279,7 +279,6 @@ void(float shotcount, vector dir, vector spread) FireBullets = while (shotcount > 0) { - direction = dir + crandom()*spread_x*v_right + crandom()*spread_y*v_up; traceline (src, src + direction*2048, FALSE, self); if (trace_fraction != 1.0) @@ -305,7 +304,9 @@ void() W_FireShotgun = msg_entity = self; WriteByte (MSG_ONE, SVC_SMALLKICK); - self.currentammo = self.ammo_shells = self.ammo_shells - 1; + if (deathmatch != 4 ) + self.currentammo = self.ammo_shells = self.ammo_shells - 1; + dir = aim (self, 100000); FireBullets (6, dir, '0.04 0.04 0'); }; @@ -331,7 +332,8 @@ void() W_FireSuperShotgun = msg_entity = self; WriteByte (MSG_ONE, SVC_BIGKICK); - self.currentammo = self.ammo_shells = self.ammo_shells - 2; + if (deathmatch != 4) + self.currentammo = self.ammo_shells = self.ammo_shells - 2; dir = aim (self, 100000); FireBullets (14, dir, '0.14 0.08 0'); }; @@ -349,6 +351,23 @@ void() T_MissileTouch = { local float damg; +// if (deathmatch == 4) +// { +// if ( ((other.weapon == 32) || (other.weapon == 16))) +// { +// if (random() < 0.1) +// { +// if (other != world) +// { +// // bprint (PRINT_HIGH, "Got here\n"); +// other.deathtype = "blaze"; +// T_Damage (other, self, self.owner, 1000 ); +// T_RadiusDamage (self, self.owner, 1000, other); +// } +// } +// } +// } + if (other == self.owner) return; // don't explode on owner @@ -374,8 +393,11 @@ void() T_MissileTouch = // don't do radius damage to the other, because all the damage // was done in the impact + + T_RadiusDamage (self, self.owner, 120, other); + // sound (self, CHAN_WEAPON, "weapons/r_exp3.wav", 1, ATTN_NORM); self.origin = self.origin - 8 * normalize(self.velocity); @@ -398,7 +420,8 @@ W_FireRocket */ void() W_FireRocket = { - self.currentammo = self.ammo_rockets = self.ammo_rockets - 1; + if (deathmatch != 4) + self.currentammo = self.ammo_rockets = self.ammo_rockets - 1; sound (self, CHAN_WEAPON, "weapons/sgun1.wav", 1, ATTN_NORM); @@ -423,6 +446,7 @@ void() W_FireRocket = // set newmis duration newmis.nextthink = time + 5; newmis.think = SUB_Remove; + newmis.classname = "grenade"; setmodel (newmis, "progs/missile.mdl"); setsize (newmis, '0 0 0', '0 0 0'); @@ -431,9 +455,7 @@ void() W_FireRocket = /* =============================================================================== - LIGHTNING - =============================================================================== */ @@ -469,6 +491,7 @@ void(vector p1, vector p2, entity from, float damage) LightningDamage = e1 = e2 = world; traceline (p1, p2, FALSE, self); + if (trace_ent.takedamage) { LightningHit (from, damage); @@ -510,11 +533,30 @@ void() W_FireLightning = // explode if under water if (self.waterlevel > 1) { - cells = self.ammo_cells; - self.ammo_cells = 0; - W_SetCurrentAmmo (); - T_RadiusDamage (self, self, 35*cells, world); - return; + if (deathmatch > 3) + { + if (random() <= 0.5) + { + self.deathtype = "selfwater"; + T_Damage (self, self, self.owner, 4000 ); + } + else + { + cells = self.ammo_cells; + self.ammo_cells = 0; + W_SetCurrentAmmo (); + T_RadiusDamage (self, self, 35*cells, world); + return; + } + } + else + { + cells = self.ammo_cells; + self.ammo_cells = 0; + W_SetCurrentAmmo (); + T_RadiusDamage (self, self, 35*cells, world); + return; + } } if (self.t_width < time) @@ -525,7 +567,8 @@ void() W_FireLightning = msg_entity = self; WriteByte (MSG_ONE, SVC_SMALLKICK); - self.currentammo = self.ammo_cells = self.ammo_cells - 1; + if (deathmatch != 4) + self.currentammo = self.ammo_cells = self.ammo_cells - 1; org = self.origin + '0 0 16'; @@ -590,7 +633,8 @@ W_FireGrenade */ void() W_FireGrenade = { - self.currentammo = self.ammo_rockets = self.ammo_rockets - 1; + if (deathmatch != 4) + self.currentammo = self.ammo_rockets = self.ammo_rockets - 1; sound (self, CHAN_WEAPON, "weapons/grenade.wav", 1, ATTN_NORM); @@ -624,7 +668,16 @@ void() W_FireGrenade = newmis.touch = GrenadeTouch; // set newmis duration - newmis.nextthink = time + 2.5; + if (deathmatch == 4) + { + newmis.nextthink = time + 2.5; + self.attack_finished = time + 1.1; +// self.health = self.health - 1; + T_Damage (self, self, self.owner, 10 ); + } + else + newmis.nextthink = time + 2.5; + newmis.think = GrenadeExplode; setmodel (newmis, "progs/grenade.mdl"); @@ -674,7 +727,8 @@ void() W_FireSuperSpikes = 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; + if (deathmatch != 4) + self.currentammo = self.ammo_nails = self.ammo_nails - 2; dir = aim (self, 1000); launch_spike (self.origin + '0 0 16', dir); newmis.touch = superspike_touch; @@ -706,7 +760,8 @@ void(float ox) W_FireSpikes = sound (self, CHAN_WEAPON, "weapons/rocket1i.wav", 1, ATTN_NORM); self.attack_finished = time + 0.2; - self.currentammo = self.ammo_nails = self.ammo_nails - 1; + if (deathmatch != 4) + self.currentammo = self.ammo_nails = self.ammo_nails - 1; dir = aim (self, 1000); launch_spike (self.origin + '0 0 16' + v_right*ox, dir); diff --git a/world.qc b/world.qc index 4b71ee8..503b530 100644 --- a/world.qc +++ b/world.qc @@ -176,13 +176,11 @@ void() worldspawn = // custom map attributes -// can't change gravity in QuakeWorld -/* if (self.model == "maps/e1m8.bsp") cvar_set ("sv_gravity", "100"); else cvar_set ("sv_gravity", "800"); -*/ + // the area based ambient sounds MUST be the first precache_sounds @@ -241,6 +239,8 @@ void() worldspawn = precache_sound ("player/death4.wav"); precache_sound ("player/death5.wav"); + precache_sound ("boss1/sight1.wav"); + // ax sounds precache_sound ("weapons/ax1.wav"); // ax swoosh precache_sound ("player/axhit1.wav"); // ax hit meat @@ -258,6 +258,12 @@ void() worldspawn = precache_sound ("misc/water1.wav"); // swimming precache_sound ("misc/water2.wav"); // swimming +// Invulnerability sounds + precache_sound ("items/protect.wav"); + precache_sound ("items/protect2.wav"); + precache_sound ("items/protect3.wav"); + + precache_model ("progs/player.mdl"); precache_model ("progs/eyes.mdl"); precache_model ("progs/h_player.mdl");