diff --git a/quakec/fallout2/ai.qc b/quakec/fallout2/ai.qc index 704017d7..4f1c3dfe 100644 --- a/quakec/fallout2/ai.qc +++ b/quakec/fallout2/ai.qc @@ -268,6 +268,10 @@ void() ChangeYaw = void() HuntTarget = { + + if (self.enemy == self.friend) + return; + self.goalentity = self.enemy; self.think = self.th_run; self.ideal_yaw = vectoyaw(self.enemy.origin - self.origin); @@ -350,17 +354,22 @@ slower noticing monsters. */ float() FindTarget = { - local entity client; + local entity client, te; local float r, x; local string y; // if the first spawnflag bit is set, the monster will only wake up on // really seeing the player, not another monster getting angry - // spawnflags & 3 is a big hack, because zombie crucified used the first // spawn flag prior to the ambush flag, and I forgot about it, so the second // spawn flag works as well + + + if (self.charmed == 1) + return FALSE; + + if (sight_entity_time >= time - 0.1 && !(self.spawnflags & 3) ) { client = sight_entity; @@ -374,9 +383,15 @@ float() FindTarget = return FALSE; // current check entity isn't in PVS } + + if (client == self.friend)//friends will not be attacked + return FALSE; if (client == self.enemy) return FALSE; + if (self.flash > 0) + return; + if (client.flags & FL_NOTARGET) return FALSE; if (client.items & IT_INVISIBILITY) @@ -444,10 +459,13 @@ float() FindTarget = if (client.sneak > 0)//sneaking players are invisible return FALSE; + // // got one // self.enemy = client; + +/* if (self.enemy.classname != "player") { self.enemy = self.enemy.enemy; @@ -456,7 +474,7 @@ float() FindTarget = self.enemy = world; return FALSE; } - } + }*/ FoundTarget (); @@ -736,7 +754,6 @@ The monster has an enemy it is trying to kill */ void(float dist) ai_run = { - if (self.hold == 1) { self.th_stand; diff --git a/quakec/fallout2/client.qc b/quakec/fallout2/client.qc index 82f6a014..8dcbd005 100644 --- a/quakec/fallout2/client.qc +++ b/quakec/fallout2/client.qc @@ -1561,6 +1561,10 @@ void() PlayerPreThink = SneakLevel(); self.accept = 0; + self.endinfo1 = rescue; + self.endinfo2 = dead_hostage; + self.endinfo3 = hostages; + local float lgrip, rgrip; @@ -1612,10 +1616,7 @@ void() PlayerPreThink = if (self.cycle2 < time) { - if (ToIID(self.islot4) == IID_EQUIP_BATTERY) - r = 20; - else - r = 10; + if (self.ragetime > 0) self.ragetime -= 1; @@ -1644,26 +1645,6 @@ void() PlayerPreThink = if (rgrip == 0 && lgrip == 1) self.rage = 777; - if (self.sneak == 0) - { - if (self.ammo_cells < r) - self.ammo_cells = self.ammo_cells + 1; - - if (self.ammo_cells > r) - self.ammo_cells = r; - } - - if (self.sneak > 0) - { - if (self.ammo_cells == 3 && ToIID(self.islot4) == IID_EQUIP_STEALTHBOY) - sprint(self, 2, "stealthboy running low!\n"); - - if (self.ammo_cells > 0) - self.ammo_cells = self.ammo_cells - 1; - - if (self.ammo_cells < 0) - self.ammo_cells = 0; - } if (self.musictimer == 0) { @@ -2194,6 +2175,11 @@ void() ClientDisconnect = // let everyone else know bprint (PRINT_HIGH, self.netname); bprint (PRINT_HIGH, " left the game.\n"); + if (self.team == 1) + teamblue = teamblue - 1; + else if (self.team == 2) + teamred = teamred - 1; + self.classname = "disconnected"; sound (self, CHAN_BODY, "player/tornoff2.wav", 1, ATTN_NONE); set_suicide_frame (); diff --git a/quakec/fallout2/combat.qc b/quakec/fallout2/combat.qc index 18685511..71a0ff02 100644 --- a/quakec/fallout2/combat.qc +++ b/quakec/fallout2/combat.qc @@ -139,14 +139,19 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage = if (targ.radiation > 0) { - radpenalty = 1 + (targ.radiation/100); - - if (radpenalty > 1.25) - radpenalty = 1.25; - + radpenalty = 1 + (targ.radiation/200); damage = damage * radpenalty; } + if (attacker.radiation > 0) + { + radpenalty = 1 - (targ.radiation/200); + damage = damage * radpenalty; + } + + if (targ.classname == "player" && attacker.classname == "monster") + targ.superenemy = attacker; + //getting hurt is slightly painful to the score, play cautiously! if (attacker.classname == "monster" && targ.classname == "player") targ.score = targ.score - 1; @@ -573,18 +578,7 @@ take = damage; } Killed (targ, attacker); - if (attacker.perk1 == 11 || attacker.perk2 == 11) - { - attacker.lastman += 1.5; - lm = ftos(attacker.lastman); - sprint(self, 2, "!LAST MAN STANDING: "); - sprint(self, 2, lm); - sprint(self, 2, "\n"); - attacker.health += attacker.lastman; - if (attacker.health > attacker.max_health) - attacker.health = attacker.max_health; - } return; } diff --git a/quakec/fallout2/csqc/invent.qc b/quakec/fallout2/csqc/invent.qc index 29ea43fc..c0957248 100644 --- a/quakec/fallout2/csqc/invent.qc +++ b/quakec/fallout2/csqc/invent.qc @@ -723,7 +723,7 @@ void() GainPerk_Draw = drawpic('2 2 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Support Fire.png", '64 64 0'*(scrwidth/640), '1 1 1', 1); drawpic('3 2 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Duck And Cover", '64 64 0'*(scrwidth/640), '1 1 1', 1); - drawpic('4 2 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Harmless.png", '64 64 0'*(scrwidth/640), '1 1 1', 1); + drawpic('4 2 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Puppet Master.png", '64 64 0'*(scrwidth/640), '1 1 1', 1); drawpic('5 2 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Stay Low.png", '64 64 0'*(scrwidth/640), '1 1 1', 1); drawpic('6 2 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Surgical Precision.png", '64 64 0'*(scrwidth/640), '1 1 1', 1); diff --git a/quakec/fallout2/csqc/main.qc b/quakec/fallout2/csqc/main.qc index 98bec3e8..c6874391 100644 --- a/quakec/fallout2/csqc/main.qc +++ b/quakec/fallout2/csqc/main.qc @@ -105,7 +105,7 @@ void() Chem_Draw = void() Time_Draw = { local float xtime, ytime, ztime, obj; - local string qtime, rtime, shadowtime, text; + local string qtime, rtime, shadowtime, text, text2; xtime = getstati(104); ytime = floor(xtime/60); @@ -130,6 +130,21 @@ void() Time_Draw = drawstring('0 0 0'+('1 0 0'*(scrwidth*0.03))+('0 1 0'*(scrheight*0.86)), text, '8 8 8', '1 1 1', 1); + + + + text = "citizens rescued: "; + text2 = ftos(getstati(113)); + drawstring('0 0 0'+('1 0 0'*(scrwidth*0.03))+('0 1 0'*(scrheight*0.90)), strcat(text, text2), '8 8 8', '1 1 1', 1); + + text = "citizens slain: "; + text2 = ftos(getstati(114)); + drawstring('0 0 0'+('1 0 0'*(scrwidth*0.03))+('0 1 0'*(scrheight*0.92)), strcat(text, text2), '8 8 8', '1 1 1', 1); + + text = "citizens left: "; + text2 = ftos(getstati(115)); + drawstring('0 0 0'+('1 0 0'*(scrwidth*0.03))+('0 1 0'*(scrheight*0.94)), strcat(text, text2), '8 8 8', '1 1 1', 1); + }; diff --git a/quakec/fallout2/defs.qc b/quakec/fallout2/defs.qc index b32e22c5..c4d0a58f 100644 --- a/quakec/fallout2/defs.qc +++ b/quakec/fallout2/defs.qc @@ -523,6 +523,8 @@ float gtimer; float total_players; float endgame_timer; float time_left; +float teamred; +float teamblue; float s_map_obj; float s_ent1; @@ -666,6 +668,9 @@ float intermission_running; .float equipment_slot; .float has_radio; .float score; +.float endinfo1; +.float endinfo2; +.float endinfo3; //.float select; //.float grenade_hold; @@ -752,6 +757,7 @@ float intermission_running; .float announcercache; string announcer; +.float charmed; .entity friend; .entity tumbler1; .entity tumbler2; @@ -760,6 +766,8 @@ string announcer; .entity heal_ent; .vector oldorg; .vector home; +.entity superenemy; + .float location; .float start_time; diff --git a/quakec/fallout2/inventory.qc b/quakec/fallout2/inventory.qc index c00a8dfa..90cf4168 100644 --- a/quakec/fallout2/inventory.qc +++ b/quakec/fallout2/inventory.qc @@ -58,6 +58,7 @@ float IID_WP_DKS1_S = 441; float IID_WP_RANGEMASTER_SCOPE = 442; float IID_WP_AK47 = 443; float IID_WP_ACR = 444; +float IID_WP_GRENADELAUNCHER = 445; //and ammo for those guns float IID_AM_NEEDLER = 507; @@ -73,6 +74,7 @@ float IID_AM_45ACP = 516; //".45 ACP ammo"; float IID_AM_ROCKET = 517; //"explosive rocket" float IID_AM_CASELESS = 518; //caseless float IID_AM_WARSAW = 519; //ak-47 ammo +float IID_AM_GRENADE = 520; //grenade launcher ammo //grenade items float IID_GREN_FRAG = 101; @@ -662,9 +664,9 @@ string(float iid) GetItemVModel = if (iid == IID_WP_USP_S) return "progs/v_usp.mdl"; if (iid == IID_WP_GLOCK) - return "progs/v_glock.mdl"; + return "progs/v_10mmpistol.mdl"; if (iid == IID_WP_GLOCK_S) - return "progs/v_glock.mdl"; + return "progs/v_10mmpistol.mdl"; if (iid == IID_WP_DEAGLE) return "progs/v_deagle.mdl"; if (iid == IID_WP_NEEDLER) @@ -721,6 +723,8 @@ string(float iid) GetItemVModel = return "progs/v_carbine.mdl"; if (iid == IID_WP_ROCKETLAUNCHER) return "progs/v_rocket.mdl"; + if (iid == IID_WP_GRENADELAUNCHER) + return "progs/v_gl.mdl"; if (iid == IID_WP_LASERGATLING) return "progs/v_chain.mdl"; @@ -757,9 +761,9 @@ string(float iid) GetItemWModel = if (iid == IID_WP_USP_S) return "progs/w_usp.mdl"; if (iid == IID_WP_GLOCK) - return "progs/w_glock.mdl"; + return "progs/w_10mmpistol.mdl"; if (iid == IID_WP_GLOCK_S) - return "progs/w_glock.mdl"; + return "progs/w_10mmpistol.mdl"; if (iid == IID_WP_DEAGLE) return "progs/w_deagle.mdl"; if (iid == IID_WP_DEAGLE_M) @@ -819,6 +823,8 @@ string(float iid) GetItemWModel = if (iid == IID_WP_ROCKETLAUNCHER) return "progs/w_rocket.mdl"; + if (iid == IID_WP_GRENADELAUNCHER) + return "progs/w_gl.mdl"; if (iid == IID_WP_LASERGATLING) return "progs/w_chain.mdl"; @@ -946,6 +952,8 @@ float(float iid) WeaponAmmoType = return IID_AM_ROCKET; if (iid == IID_WP_LASERGATLING) return IID_AM_ENERGYCELL; + if (iid == IID_WP_GRENADELAUNCHER) + return IID_AM_GRENADE; return IID_NONE; }; @@ -957,9 +965,9 @@ float(float iid) WeaponMagQuant = if (iid == IID_WP_USP_S) return 12; if (iid == IID_WP_GLOCK) - return 15; + return 10; if (iid == IID_WP_GLOCK_S) - return 15; + return 10; if (iid == IID_WP_DEAGLE) return 7; if (iid == IID_WP_DEAGLE_M) @@ -1954,7 +1962,7 @@ float(float iid) GetWeaponRange = if (iid == IID_WP_NEEDLER) return 20; if (iid == IID_WP_ALIENBLASTER) - return 10; + return 6+(getstati(103)*1); if (iid == IID_WP_PIPERIFLE) return 40; if (iid == IID_WP_PIPERIFLE_S) @@ -2044,7 +2052,7 @@ float(float iid) GetWeaponDamage = if (iid == IID_WP_NEEDLER) return 16; if (iid == IID_WP_ALIENBLASTER) - return 20; + return 20+(getstati(103)*6); if (iid == IID_WP_PIPERIFLE) return 20; if (iid == IID_WP_PIPERIFLE_S) @@ -2143,7 +2151,7 @@ string(float iid) GetItemImage = if (iid == IID_WP_NEEDLER) return "needler.jpg"; if (iid == IID_WP_ALIENBLASTER) - return "ppistol.jpg"; + return "blaster.jpg"; if (iid >= IID_WP_PIPERIFLE && iid <= IID_WP_PIPERIFLE_S_R) return "prifle.jpg"; if (iid == IID_WP_WINCHESTER) @@ -2561,7 +2569,7 @@ string (float slot, float int) PerkName = if (int == 2) return "Duck And Cover"; if (int == 3) - return "Harmless"; + return "Puppet Master"; if (int == 4) return "Stay Low"; if (int == 5) @@ -2587,7 +2595,7 @@ string (float slot, float int) PerkNameCentered = if (int == 2) return " Duck And Cover"; if (int == 3) - return " Harmless"; + return " Puppet Master "; if (int == 4) return " Stay Low"; if (int == 5) @@ -2614,7 +2622,7 @@ string(float int) GetPerkImage = else if (int == 2) return "gui/perks/Duck And Cover.jpg"; else if (int == 3) - return "gui/perks/Harmless.jpg"; + return "gui/perks/Puppet Master.jpg"; else if (int == 4) return "gui/perks/Stay Low.jpg"; else if (int == 5) @@ -2640,11 +2648,11 @@ string(float int) GetPerkImage = string(float int) GetPerkDesc = { if (int == 1) - return "33% recoil reduction while prone"; + return "Recoil is drastically reduced while lying down"; else if (int == 2) - return "Huge dodge chance while taking cover and ducking"; - else if (int == 3) return "Makes enemies attack your friends instead of you"; + else if (int == 3) + return "You can make enemies attack their friends"; else if (int == 4) return "50% damage resist to area attacks while prone"; else if (int == 5) @@ -2654,7 +2662,7 @@ string(float int) GetPerkDesc = else if (int == 7) return "Provides you a few hassle-free seconds to escape danger"; else if (int == 8) - return "You may gain additional skills from an unknown source"; + return "Your skill levels surge in power from an unknown source"; else if (int == 9) return "Paralyze anything with a sneak attack from a knife"; else if (int == 10) diff --git a/quakec/fallout2/items.qc b/quakec/fallout2/items.qc index 7f022c3d..edabf65b 100644 --- a/quakec/fallout2/items.qc +++ b/quakec/fallout2/items.qc @@ -372,9 +372,19 @@ void() rad_think = self.think = rad_think; self.nextthink = time + 4; + WriteByte (MSG_BROADCAST, SVC_TEMPENTITY); + WriteByte (MSG_BROADCAST, TE_LAVASPLASH); + WriteCoord (MSG_BROADCAST, self.origin_x); + WriteCoord (MSG_BROADCAST, self.origin_y); + WriteCoord (MSG_BROADCAST, self.origin_z); + + te = findradius (self.origin, 700); while (te) { + + + if (te.classname == "player") te.radiation = te.radiation + 1; @@ -1382,7 +1392,7 @@ void() weapon_supershotgun = TreasureChest(); - if (random()*100 <= 5) + if (random()*100 <= 100) spawn_radiation(self.origin); SpawnJunk(self.origin); diff --git a/quakec/fallout2/misc.qc b/quakec/fallout2/misc.qc index 94a5880d..caa7fbb7 100644 --- a/quakec/fallout2/misc.qc +++ b/quakec/fallout2/misc.qc @@ -912,15 +912,31 @@ void() misc_noisemaker = void() brotherhood_merchant = { local entity sign; -/* - sign = spawn(); - sign.origin = self.origin + '0 0 32'; - setmodel(sign, "progs/trader.spr"); - sign.solid = SOLID_NOT;*/ - setorigin(self, self.origin + '0 0 64'); - self.movetype = MOVETYPE_BOUNCE; - self.velocity_z = -200; + sign = spawn(); + sign.movetype = MOVETYPE_BOUNCE; + sign.velocity_x = crandom()*50; + sign.velocity_y = crandom()*50; + sign.velocity_z = -100; + setsize (sign, '-2 -2 -6', '2 2 2'); + sign.origin = self.origin + '32 0 32'; + setmodel(sign, "progs/money.mdl"); + sign.solid = SOLID_BBOX; + sign.scale = 10; + + sign = spawn(); + sign.movetype = MOVETYPE_BOUNCE; + sign.velocity_x = crandom()*50; + sign.velocity_y = crandom()*50; + sign.velocity_z = -100; + setsize (sign, '-2 -2 -6', '2 2 2'); + sign.origin = self.origin + '0 32 32'; + setmodel(sign, "progs/money.mdl"); + sign.solid = SOLID_BBOX; + sign.scale = 10; + + + setmodel (self, "progs/enforcer.mdl"); self.touch = SUB_Null; diff --git a/quakec/fallout2/mod_buy.qc b/quakec/fallout2/mod_buy.qc index bd3bb0f7..923ae023 100644 --- a/quakec/fallout2/mod_buy.qc +++ b/quakec/fallout2/mod_buy.qc @@ -797,30 +797,6 @@ void() W_PlayerMenu = return; } - else if (self.currentmenu == "select_team") - { - if (self.impulse == 1) - { - sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM); - bprint(2, self.netname); - bprint(2, " has joined the rangers.\n"); - self.currentmenu = "confirm_team"; - DisplayMenu(); - self.team = 1; - return; - } - if (self.impulse == 2) - { - sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM); - bprint(2, self.netname); - bprint(2, " has joined the raiders.\n"); - self.currentmenu = "confirm_team"; - DisplayMenu(); - self.team = 2; - return; - } - - } else if (self.currentmenu == "gain_skill") { if (self.impulse == 1) @@ -864,61 +840,8 @@ void() W_PlayerMenu = return; } } - else if (self.currentmenu == "confirm_team") - { - if (self.impulse == 1) - { - sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM); - self.currentmenu = "select_skill"; - DisplayMenu(); - self.impulse = 0; - return; - } - if (self.impulse == 2) - { - sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM); - self.currentmenu = "select_team"; - DisplayMenu(); - self.impulse = 0; - self.team = 0; - return; - } - } - else if (self.currentmenu == "confirm_skill") - { - if (self.impulse == 1) - { - self.missionbrief = 0; - self.class = self.tclass; - if (self.class == 1) - self.skill_doctor = self.skill_doctor + 1; - if (self.class == 2) - self.skill_sneak = self.skill_sneak + 1; - if (self.class == 3) - self.skill_combat = self.skill_combat + 1; - if (self.class == 4) - self.skill_science = self.skill_science + 1; - self.score = 0; - sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM); - self.currentmenu = "none"; - centerprint(self, ""); - bprint(2, self.netname); - bprint(2, " has gained a level.\n"); - self.class = self.tclass; - self.impulse = 0; - return; - } - if (self.impulse == 2) - { - sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM); - self.currentmenu = "gain_skill"; - DisplayMenu(); - self.impulse = 0; - self.class = 0; - return; - } - } + else if (self.currentmenu == "display_enter_screen") { if (self.impulse == 1 && coop == 1) @@ -936,42 +859,39 @@ void() W_PlayerMenu = } else if (self.impulse == 1 && coop == 0) { - sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM); - self.connected = 1; - self.currentmenu = "select_team"; - DisplayMenu(); - self.impulse = 0; - return; - } - } - else if (self.currentmenu == "display_brief") - { - if (self.impulse == 1) - { - if (self.skill_combat == 0 && self.skill_sneak == 0 && self.skill_doctor == 0 && self.skill_science == 0) + self.missionbrief = 0; + if (teamblue == teamred) + { + if (random()*100 <= 50) + { + self.team = 1; + teamblue = teamblue + 1; + } + else + { + self.team = 2; + teamred = teamred + 1; + } + } + else if (teamblue > teamred) + { + self.team = 2; + teamred = teamred + 1; + } + else if (teamblue < teamred) { self.team = 1; - self.missionbrief = 2; - sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM); - self.currentmenu = "select_skill"; - DisplayMenu(); - self.impulse = 0; - return; - } - else - { - - self.missionbrief = 0; - sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM); - self.currentmenu = "none"; - centerprint(self, ""); - PutClientInServer(); - bprint(2, self.netname); - bprint(2, " has entered the wasteland.\n"); - total_players = total_players + 1; - return; + teamblue = teamblue + 1; } + self.connected = 1; + sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM); + centerprint(self, "\n"); + self.currentmenu = "none"; + PutClientInServer(); + self.impulse = 0; + self.current_slot = 1; + return; } } else if (self.currentmenu == "select_mission") diff --git a/quakec/fallout2/player.qc b/quakec/fallout2/player.qc index 7e281682..c99f4586 100644 --- a/quakec/fallout2/player.qc +++ b/quakec/fallout2/player.qc @@ -155,7 +155,7 @@ void (float db) loud_noise = t = t + 32; } - if (x < db*20 && d <= md) + if (x < db*20 && d <= md && (te.friend != self)) { te.enemy = self; te.think = HuntTarget; @@ -248,17 +248,13 @@ void () Footstep = if (self.sneak != 0) return; - if (getperk(6)) - r = 0.5; - else - r = 1; + + r = 1 - (self.skill_sneak/40); if (self.classname == "player") { - if (getperk(6)) - loud_noise(10); - else - loud_noise(20); + + loud_noise(20 - self.skill_sneak); } if (world.worldtype == 1 || world.worldtype == 2) diff --git a/quakec/fallout2/soldier.qc b/quakec/fallout2/soldier.qc index 34d4edf5..16250d3e 100644 --- a/quakec/fallout2/soldier.qc +++ b/quakec/fallout2/soldier.qc @@ -657,7 +657,7 @@ void () army_walk8 = [ 80, army_walk1 ] void () army_run1 = [ 73, army_run2 ] { - if (random()<0.25 || self.health <= 25) + if ((random()<0.25 || self.health <= 25) && self.charmed != 1) find_hide(); ai_run (TE_TELEPORT); diff --git a/quakec/fallout2/weapons.qc b/quakec/fallout2/weapons.qc index 737c2aa0..86ffe2b7 100644 --- a/quakec/fallout2/weapons.qc +++ b/quakec/fallout2/weapons.qc @@ -142,33 +142,131 @@ void (entity spot) spawn_healing = }; +void () disappear = +{ + local entity te; + local float nearby; + //this allows you to vanish, making monsters aggro + //other players + + + te = findradius(self.origin, 600); + while (te) + { + if (te.classname == "player" && te.sneak == 0 && te != self) + nearby = 1; + + te = te.chain; + } + + if (nearby == 1) + { + te = findradius(self.origin, 1000); + while (te) + { + if (te.enemy == self) + te.enemy = world; + + te = te.chain; + } + } + + te = findradius(self.origin, 1000); + while (te) + { + if (te.enemy == self) + te.enemy = world; + + te = te.chain; + } +}; + +void () puppet_master = +{ + local entity te; + local float charm_monster; + //this allows you to control other monsters + + + charm_monster = 0; + te = findradius(self.origin, 400); + while (te) + { + if (te.classname == "monster" && (charm_monster == 0) && (visible(te))) + { + spawn_excla(te, 60); + charm_monster = 1; + te.friend = self; + te.charmed = 1; + te.enemy = world; + te.goalentity = self; + self.friend = te; + } + te = te.chain; + } + +}; + +void () puppet_master_command = +{ + local entity te, ent; + local float charm_monster; + //this allows you to control other monsters + + makevectors (self.v_angle); + traceline (self.origin, self.origin+v_forward*4000, FALSE, self); + + if (trace_ent.classname == "monster" && trace_ent != self.friend) + { + self.friend.enemy = trace_ent; + self.friend.think = HuntTarget; + self.friend.nextthink = time + 0.25; + } + else + { + self.friend.enemy = self; + self.friend.think = HuntTarget; + self.friend.nextthink = time + 0.25; + } +}; + void(float slotno) UsePerk = { - local float x, mcount; + local float x, mcount, eat; local string y, timeleft; local entity te; + local vector org; if (slotno == 1 && self.perk1timer > 0) { + if ((self.perk1 == 3 && slotno == 1) || (self.perk2 == 3 && slotno == 2)) + { + puppet_master_command(); + return; + } timeleft = ftos(self.perk1timer); - sprint(self, 2, "ability is not ready yet. ["); - sprint(self, 2, timeleft); - sprint(self, 2, "]\n"); + sprint(self, 2, "ability is not ready yet.\n"); sound (self, CHAN_BODY, "misc/beep1.wav", 1, ATTN_NORM); return; } if (slotno == 2 && self.perk2timer > 0) { + if ((self.perk1 == 3 && slotno == 1) || (self.perk2 == 3 && slotno == 2)) + { + puppet_master_command(); + return; + } timeleft = ftos(self.perk2timer); - sprint(self, 2, "ability is not ready yet. ["); - sprint(self, 2, timeleft); - sprint(self, 2, "]\n"); + sprint(self, 2, "ability is not ready yet.\n"); sound (self, CHAN_BODY, "misc/beep1.wav", 1, ATTN_NORM); return; + } - if ((self.perk1 == 7 && slotno == 1) || (self.perk2 == 7 && slotno == 2)) + + + if ((self.perk1 == 2 && slotno == 1) || (self.perk2 == 2 && slotno == 2)) { if (slotno == 1) self.perk1timer = 2000; @@ -177,27 +275,96 @@ void(float slotno) UsePerk = sound (self, CHAN_BODY, "misc/r_tele4.wav", 1, ATTN_NORM); + org = self.origin; + WriteByte (MSG_MULTICAST, SVC_TEMPENTITY); + WriteByte (MSG_MULTICAST, TE_TELEPORT); + WriteCoord (MSG_MULTICAST, org_x); + WriteCoord (MSG_MULTICAST, org_y); + WriteCoord (MSG_MULTICAST, org_z); + + disappear(); + + } + if ((self.perk1 == 3 && slotno == 1) || (self.perk2 == 3 && slotno == 2)) + { + if (slotno == 1) + self.perk1timer = 2000; + if (slotno == 2) + self.perk2timer = 2000; + + sound (self, CHAN_BODY, "misc/beep1.wav", 1, ATTN_NORM); + + org = self.origin; + WriteByte (MSG_MULTICAST, SVC_TEMPENTITY); + WriteByte (MSG_MULTICAST, TE_TELEPORT); + WriteCoord (MSG_MULTICAST, org_x); + WriteCoord (MSG_MULTICAST, org_y); + WriteCoord (MSG_MULTICAST, org_z); + + if (self.friend.classname != "monster") + puppet_master(); + else + puppet_master_command(); + + } + else if ((self.perk1 == 7 && slotno == 1) || (self.perk2 == 7 && slotno == 2)) + { + if (slotno == 1) + self.perk1timer = 2000; + if (slotno == 2) + self.perk2timer = 2000; + + sound (self, CHAN_BODY, "misc/r_tele4.wav", 1, ATTN_NORM); + + org = self.origin; + WriteByte (MSG_MULTICAST, SVC_TEMPENTITY); + WriteByte (MSG_MULTICAST, TE_TELEPORT); + WriteCoord (MSG_MULTICAST, org_x); + WriteCoord (MSG_MULTICAST, org_y); + WriteCoord (MSG_MULTICAST, org_z); + te = findradius (self.origin, 6000); while (te) { if (te.classname == "monster") { - te.hold = 160; + te.hold = 180; spawn_stop(te, 10); mcount = mcount + 1; } te = te.chain; } } - if ((self.perk1 == 11 && slotno == 1) || (self.perk2 == 11 && slotno == 2)) + else if ((self.perk1 == 11 && slotno == 1) || (self.perk2 == 11 && slotno == 2)) { + if (self.radiation <= 0) + return; + if (slotno == 1) self.perk1timer = 2000; if (slotno == 2) self.perk2timer = 2000; - sound (self, CHAN_BODY, "misc/r_tele4.wav", 1, ATTN_NORM); + if (self.radiation <= 25) + { + eat = self.radiation; + self.radiation = 0; + } + else + { + eat = 25; + self.radiation = self.radiation - 25; + } + self.health = self.health + eat; + self.regen = self.regen + ceil(eat/5); + spawn_healing(self); + spawn_healing(self); + spawn_healing(self); + spawn_healing(self); + spawn_healing(self); + spawn_healing(self); + sound (trace_ent, CHAN_BODY, "items/r_item2.wav", 1, ATTN_NORM); } }; @@ -1080,10 +1247,9 @@ W_FireGrenade */ void() W_FireGrenade = { - if (deathmatch != 4) - self.currentammo = self.ammo_rockets = self.ammo_rockets - 1; + DropAmmo(); - sound (self, CHAN_WEAPON, "weapons/grenade.wav", 1, ATTN_NORM); + sound (self, CHAN_WEAPON, "weapons/gl-1.wav", 1, ATTN_NORM); msg_entity = self; WriteByte (MSG_ONE, SVC_SMALLKICK); @@ -1680,11 +1846,11 @@ void() W_Attack = else if (weap == IID_WP_NEEDLER) FirePistol(10+self.skill_science, 2, "weapons/needler.wav", 2000, 0.1); else if (weap == IID_WP_GLOCK) - FirePistol(12, 6, "weapons/glock.wav", 2000, 0.1); + FirePistol(12, 6, "weapons/10mmpistol.wav", 2000, 0.1); else if (weap == IID_WP_GLOCK_S) FirePistol(10, 6, "weapons/smg_s.wav", 2000, 0.1); else if (weap == IID_WP_ALIENBLASTER) - FirePulseRifle(16, 0.1, 10+self.skill_science*4, 2); + FirePulseRifle(4, 0.1, 20+self.skill_science*6, 3); else if (weap == IID_WP_PIPERIFLE) FireAssaultRifle(15+self.skill_science, 5, "weapons/rangem.wav", 5000, 0.1); else if (weap == IID_WP_PIPERIFLE_S) @@ -1749,13 +1915,6 @@ void() W_Attack = FireAssaultRifle(30, 80, "weapons/gauss.wav", 9000, 0.2); else if (weap == IID_WP_LASERGATLING) FireMinigun(16, 20, "weapons/ak112.wav", 4000, 0.05); - - //FirePulseRifle(2, 0.1, 30, 3); - - -//float IID_WP_GAUSERIFLE = 421; -//float IID_WP_PULSERIFLE = 422; - else if (weap == IID_GREN_FRAG) player_pull1(); else if (weap == IID_GREN_EMP) @@ -1767,7 +1926,8 @@ void() W_Attack = else if (weap == IID_WP_ROCKETLAUNCHER) W_FireRocket(); - + else if (weap == IID_WP_GRENADELAUNCHER) + W_FireGrenade(); else if (weap == IID_WP_WRENCH) { if (!FireToolkit()) @@ -1846,16 +2006,7 @@ void() CheatCommand = local string y; local entity te; - self.ammo_shells = 900; - - te = findradius (self.origin, 6000); - while (te) - { - if (te.classname == "monster") - te.hold = 100; - - te = te.chain; - } + sound (self, CHAN_BODY, "misc/beep1.wav", 1, ATTN_NORM); }; /* @@ -2583,8 +2734,8 @@ void (float skill) FragExplode = te = te.chain; } - r = 200 + skill*20; - d = 10 + skill*10; + r = 450; + d = 30 + skill*5; T_RadiusDamage2 (self, self.owner, d+random()*40, other, r); remove (self); @@ -2996,9 +3147,9 @@ void (float dam, float ap, string snd, float rng, float rate) FirePistol = dam = dam + random()*dam; if (weap == IID_WP_NEEDLER) - X_Damage (trace_ent, self, self, dam); + T_Damage (trace_ent, self, self, dam); else if (weap == IID_WP_USP) - J_Damage (trace_ent, self, self, dam); + T_Damage (trace_ent, self, self, dam); else T_Damage (trace_ent, self, self, dam); @@ -3143,11 +3294,11 @@ void (float dam, float ap, string snd, float rng, float rate) FireSMG = dam = dam + random()*dam; if (weap == IID_WP_GREASEGUN) - J_Damage (trace_ent, self, self, dam); + T_Damage (trace_ent, self, self, dam); else if (weap == IID_WP_MP9) T_Damage (trace_ent, self, self, dam); else if (weap == IID_WP_GREASEGUN_S) - J_Damage (trace_ent, self, self, dam); + T_Damage (trace_ent, self, self, dam); else if (weap == IID_WP_MP9_S) T_Damage (trace_ent, self, self, dam); @@ -3174,45 +3325,20 @@ void (float rec, float speed, float dam, float type) FirePulseRifle = weap = ToIID(self.(SlotField(self.current_slot))); - if (weap != IID_WP_ALIENBLASTER) - { - if (self.recoil >= 15) - { - loud_noise(60); - sound (self, CHAN_WEAPON, "weapons/blowoff-1.wav", 1, ATTN_NORM); - self.attack_finished = (time + (1 + random()*1.5)); - return; - } - else if (weap != IID_WP_LASERGATLING) - { - loud_noise(60); - sound (self, CHAN_AUTO, "weapons/blowoff-2.wav", 0.5, ATTN_IDLE); - } - } - if (weap == IID_WP_ALIENBLASTER) stuffcmd (self, "-attack\n"); - if (weap != IID_WP_LASERGATLING) - { - loud_noise(20); - if (random()<0.5) - sound (self, CHAN_WEAPON, "weapons/plasma-1.wav", 1, ATTN_NORM); - else - sound (self, CHAN_WEAPON, "weapons/plasma-2.wav", 1, ATTN_NORM); - } - else if (weap == IID_WP_LASERGATLING && self.attack == 1) - { - loud_noise(40); - sound (self, CHAN_WEAPON, "weapons/laserburst1.wav", 1, ATTN_NORM); - } + loud_noise(20); + sound (self, CHAN_WEAPON, "weapons/blaster.wav", 1, ATTN_NORM); + + if (self.attack >= 6) self.attack = 0; - self.attack_finished = time + (speed*0.5) + (random()*speed*0.5); + self.attack_finished = time + (speed*1) + (random()*speed*1); //only silenced weapons do not break stealth @@ -3241,24 +3367,25 @@ void (float rec, float speed, float dam, float type) FirePulseRifle = DropAmmo (); makevectors (self.v_angle); - if (self.recoil >= 20) - self.recoil = 20; + if (self.recoil >= 10) + self.recoil = 10; - tmp = 50; + tmp = 400; - if (self.velocity != '0 0 0') - tmp = 100; + tmp = tmp - (5*self.skill_science); - tmp = tmp + (5*self.recoil); + tmp = tmp * (1 + (self.recoil / 10)); - if (self.recoil <= 1 && self.velocity_z == 0) + tmp = tmp * (1.25 - (self.skill_science/20)); + + if (self.recoil <= 0 && self.velocity_z == 0) tmp = (tmp * 0.5); self.attack = self.attack + 1; self.recoil = self.recoil + rec; - source = self.origin + '0 0 22' + v_right*6 + v_forward*14; + source = self.origin + '0 0 24' + v_right*4 + v_forward*14; source = source + adjust; tmp = tmp * 0.60; @@ -3276,15 +3403,16 @@ void (float rec, float speed, float dam, float type) FirePulseRifle = org2 = trace_endpos + (v_forward * ((trace_ent.size_y / 2) + (trace_ent.size_x / 2))); zap = spawn(); - zap.origin = self.origin + v_right*16 + adjust; + zap.origin = self.origin + v_right*6 + adjust; zap.velocity = self.velocity; zap.angles = self.angles; zap.v_angle = self.v_angle; + if (type == 1) { WriteByte (MSG_MULTICAST, SVC_TEMPENTITY); - WriteByte (MSG_MULTICAST, TE_LIGHTNING1); + WriteByte (MSG_MULTICAST, TE_LIGHTNING2); WriteEntity (MSG_MULTICAST, zap); WriteCoord (MSG_MULTICAST, source_x); WriteCoord (MSG_MULTICAST, source_y); @@ -3563,9 +3691,9 @@ void (float dam, float accuracy, string snd, float rng, float rate) FireAssaultR dam = dam + random()*dam; if (weap == IID_WP_DKS1 || weap == IID_WP_FNFAL || weap == IID_WP_ACR) - X_Damage (trace_ent, self, self, dam); + T_Damage (trace_ent, self, self, dam); else if (weap == IID_WP_AK112) - J_Damage (trace_ent, self, self, dam); + T_Damage (trace_ent, self, self, dam); else T_Damage (trace_ent, self, self, dam); @@ -3737,15 +3865,15 @@ void (float dam, float xrecoil, string snd, float rng, float rate) FireMinigun = dam = dam + random()*dam; if (weap == IID_WP_DKS1) - X_Damage (trace_ent, self, self, dam); + T_Damage (trace_ent, self, self, dam); else if (weap == IID_WP_FNFAL) - X_Damage (trace_ent, self, self, dam); + T_Damage (trace_ent, self, self, dam); else if (weap == IID_WP_DKS1_S) - X_Damage (trace_ent, self, self, dam); + T_Damage (trace_ent, self, self, dam); else if (weap == IID_WP_AK112) - X_Damage (trace_ent, self, self, dam); + T_Damage (trace_ent, self, self, dam); else if (weap == IID_WP_AK112_M) - X_Damage (trace_ent, self, self, dam); + T_Damage (trace_ent, self, self, dam); else T_Damage (trace_ent, self, self, dam); @@ -4697,33 +4825,7 @@ void () DisplayMenu = centerprint (self, "choose skill to gain\n\n1 doctor \n2 sneak \n3 combat \n4 science \n"); } - if ((self.currentmenu == "select_team")) - { - if (self.class == 0) - centerprint (self, "CHOOSE YOUR TEAM\n\n1 Rangers (good)\n2 Raiders (evil)\n3 Auto-Assign \n"); - if (self.class >= 0 && self.oldteam == 0) - centerprint (self, "CHOOSE YOUR TEAM\n\n1 Rangers (good)\n2 Raiders (evil)\n3 Auto-Assign \n"); - if (self.class > 0 && self.oldteam > 0) - centerprint (self, "CHOOSE YOUR TEAM\n\n1 Rangers (good)\n2 Raiders (evil)\n3 Auto-Assign \n4 Keep Previous \n"); - } - if (self.currentmenu == "confirm_team") - { - if (self.team == 1) - centerprint (self, "you will respawn as\n\nRanger - OK?\n1 Yes \n2 No \n"); - if (self.team == 2) - centerprint (self, "you will respawn as\n\nRaider - OK?\n1 Yes \n2 No \n"); - } - if (self.currentmenu == "confirm_skill") - { - if (self.tclass == 1) - centerprint (self, "your skill-set will be\n\nfirst aid - OK?\n1 Yes \n2 No \n\nprimary: first aid\nsecondary: buff allies\n"); - if (self.tclass == 2) - centerprint (self, "your skill-set will be\n\nstealth - OK?\n1 Yes \n2 No \n\nprimary: stealth\nsecondary: damage"); - if (self.tclass == 3) - centerprint (self, "your skill-set will be\n\ncombat - OK?\n1 Yes \n2 No \n\nprimary: survival\nsecondary: damage"); - if (self.tclass == 4) - centerprint (self, "your skill-set will be\n\nscience - OK?\n1 Yes \n2 No \n\nprimary: create\nsecondary: bypass"); - } + if (self.currentmenu == "menu_build") { @@ -5145,37 +5247,7 @@ void () ExitScreen = } }; -void () disappear = -{ - local entity te; - local float nearby; - //this allows an assassin to vanish, making monsters aggro - //those who are visible - if (!getperk(3)) - return; - - te = findradius(self.origin, 500); - while (te) - { - if (te.classname == "player" && te.sneak == 0 && te != self) - nearby = 1; - - te = te.chain; - } - - if (nearby == 1) - { - te = findradius(self.origin, 1000); - while (te) - { - if (te.enemy == self) - te.enemy = world; - - te = te.chain; - } - } -}; void () Sneak = { @@ -5192,7 +5264,6 @@ void () Sneak = } if (self.sneak == 0) { - disappear(); sound (self, CHAN_BODY, "items/inv1.wav", 1, ATTN_NORM); self.sneak = 1; return; diff --git a/quakec/fallout2/world.qc b/quakec/fallout2/world.qc index 49dcd42d..43063c6a 100644 --- a/quakec/fallout2/world.qc +++ b/quakec/fallout2/world.qc @@ -109,6 +109,9 @@ void() SetupStats = clientstat(110, 2, steadyaim); clientstat(111, 2, perk1timer); clientstat(112, 2, perk2timer); + clientstat(113, 2, endinfo1); + clientstat(114, 2, endinfo2); + clientstat(115, 2, endinfo3); clientstat(125, 2, timer); clientstat(126, 2, popup); clientstat(127, 2, score); @@ -749,7 +752,10 @@ if (coop == 1) // Players vs Monsters { ze.missionbrief = 3; ze.announcercache = 3; - + ze.ammo_shells = ze.ammo_shells + (3*rescue); + ze.endinfo1 = rescue; + ze.endinfo2 = hostages; + ze.endinfo3 = dead_hostage; ze = find (ze, classname, "player"); } @@ -769,7 +775,10 @@ if (coop == 1) // Players vs Monsters { ze.missionbrief = 3; ze.announcercache = 4; - + ze.ammo_shells = ze.ammo_shells + (3*rescue); + ze.endinfo1 = rescue; + ze.endinfo2 = hostages; + ze.endinfo3 = dead_hostage; ze = find (ze, classname, "player"); } @@ -842,9 +851,10 @@ if (coop == 1) // Players vs Monsters ze = find (world, classname, "player"); while (ze != world) { - ze.ammo_shells = ze.ammo_shells + 25; ze.missionbrief = 3; ze.announcercache = 6; + ze.ammo_shells = ze.ammo_shells + 30; + stuffcmd(ze, "play music/victory\n"); ze = find (ze, classname, "player"); @@ -929,6 +939,7 @@ if (coop == 1) // Players vs Monsters { ze.missionbrief = 3; ze.announcercache = 9; + ze.ammo_shells = ze.ammo_shells + 30; ze = find (ze, classname, "player"); @@ -978,6 +989,7 @@ if (coop == 1) // Players vs Monsters { ze.missionbrief = 3; ze.announcercache = 10; + ze.ammo_shells = ze.ammo_shells + 40; ze = find (ze, classname, "player"); @@ -1062,6 +1074,7 @@ if (coop == 1) // Players vs Monsters { ze.missionbrief = 3; ze.announcercache = 13; + ze.ammo_shells = ze.ammo_shells + 30; ze = find (ze, classname, "player"); @@ -1105,7 +1118,7 @@ if (coop == 1) // Players vs Monsters self.nextthink = time + 1; return; } -if (coop == 0) // Players vs Players +else if (coop == 0) // Players vs Players { t1alive = 0; t1dead = 0; @@ -1607,7 +1620,7 @@ void() worldspawn = precache_model ("progs/v_spear.mdl"); precache_model ("progs/v_usp.mdl"); precache_model ("progs/v_needler.mdl"); - precache_model ("progs/v_glock.mdl"); + precache_model ("progs/v_10mmpistol.mdl"); precache_model ("progs/v_fnfal.mdl"); precache_model ("progs/v_smg.mdl"); precache_model ("progs/v_rangem.mdl"); @@ -1641,7 +1654,6 @@ void() worldspawn = precache_model ("progs/junk1.mdl"); precache_model ("progs/junk2.mdl"); - precache_model ("progs/chest.mdl"); precache_model ("progs/hosfem.mdl"); precache_model ("progs/hosguy.mdl"); precache_model ("progs/handgren.mdl"); @@ -1662,12 +1674,11 @@ void() worldspawn = precache_model ("progs/w_double.mdl"); precache_model ("progs/w_combat.mdl"); precache_model ("progs/w_axe.mdl"); - precache_model ("progs/w_glock.mdl"); + precache_model ("progs/w_10mmpistol.mdl"); precache_model ("progs/w_usp.mdl"); precache_model ("progs/w_deagle.mdl"); precache_model ("progs/w_alien.mdl"); precache_model ("progs/w_mp9.mdl"); - precache_model ("progs/w_mp5.mdl"); precache_model ("progs/w_jackhammer.mdl"); precache_model ("progs/w_rangem.mdl"); precache_model ("progs/w_g11.mdl"); @@ -1774,7 +1785,7 @@ void() worldspawn = precache_sound ("ogre/ak74.wav"); precache_sound ("ogre/ak47.wav"); precache_sound ("weapons/usp.wav"); - precache_sound ("weapons/glock.wav"); + precache_sound ("weapons/10mmpistol.wav"); precache_sound ("weapons/auto2.wav"); precache_sound ("weapons/ak112.wav"); precache_sound ("weapons/amr.wav"); @@ -1794,8 +1805,7 @@ void() worldspawn = precache_sound ("weapons/citykiller.wav"); precache_sound ("weapons/laser.wav"); precache_sound ("weapons/laserburst1.wav"); - precache_sound ("weapons/plasma-1.wav"); - precache_sound ("weapons/plasma-2.wav"); + precache_sound ("weapons/blaster.wav"); precache_sound ("weapons/moonlight-1.wav"); precache_sound ("weapons/moonlight-2.wav"); precache_sound ("weapons/needler.wav"); diff --git a/quakec/fallout2/zombie.qc b/quakec/fallout2/zombie.qc index 2313a458..5f7922cd 100644 --- a/quakec/fallout2/zombie.qc +++ b/quakec/fallout2/zombie.qc @@ -50,6 +50,8 @@ $frame paine29 paine30 $frame cruc_1 cruc_2 cruc_3 cruc_4 cruc_5 cruc_6 +$frame rise1 rise2 rise3 + float SPAWN_CRUCIFIED = 1; //============================================================================= @@ -64,7 +66,9 @@ if ((pointcontents(self.origin) <= -2) && (self.owner.netname == "lair")) remove(self); } else if ((pointcontents(self.origin) <= -2)) +{ remove(self); +} }; void() zombie_stand2 =[ $stand2, zombie_stand3 ] {ai_stand();}; @@ -145,6 +149,35 @@ void() zombie_run16 =[ $run16, zombie_run17 ] {ai_run(4);}; void() zombie_run17 =[ $run17, zombie_run18 ] {ai_run(4);}; void() zombie_run18 =[ $run18, zombie_run1 ] {ai_run(8);}; + + +void() zombie_rise1 =[ $rise1, zombie_rise2 ] {}; +void() zombie_rise2 =[ $rise2, zombie_rise3 ] {}; +void() zombie_rise3 =[ $rise3, zombie_rise4 ] {}; +void() zombie_rise4 =[ $paine12, zombie_rise5 ] {}; +void() zombie_rise5 =[ $paine13, zombie_rise6 ] {}; +void() zombie_rise6 =[ $paine14, zombie_rise7 ] {}; +void() zombie_rise7 =[ $paine15, zombie_rise8 ] {}; +void() zombie_rise8 =[ $paine16, zombie_rise9 ] {}; +void() zombie_rise9 =[ $paine17, zombie_rise10 ] {}; +void() zombie_rise10 =[ $paine18, zombie_rise11 ] {}; +void() zombie_rise11 =[ $paine19, zombie_rise12 ] {}; +void() zombie_rise12 =[ $paine20, zombie_rise13 ] {}; +void() zombie_rise13 =[ $paine21, zombie_rise14 ] {}; +void() zombie_rise14 =[ $paine22, zombie_rise15 ] {}; +void() zombie_rise15 =[ $paine23, zombie_rise16 ] {}; +void() zombie_rise16 =[ $paine24, zombie_rise17 ] {}; +void() zombie_rise17 =[ $paine25, zombie_rise18 ] {}; +void() zombie_rise18 =[ $paine26, zombie_rise19 ] {}; +void() zombie_rise19 =[ $paine27, zombie_rise20 ] {}; +void() zombie_rise20 =[ $paine28, zombie_rise21 ] {}; +void() zombie_rise21 =[ $paine29, zombie_rise22 ] {}; +void() zombie_rise22 =[ $paine30, zombie_stand1 ] { + + +}; + + /* ============================================================================= @@ -737,46 +770,27 @@ void () spawn_ghoul_copy = local entity te, ze; local vector jojo; local float zomc, pcount, loadzombie; - local string finder, waterlev, diag; + local string finder, waterlev, diag, errmsg; local vector stuff; self.think = spawn_ghoul_copy; - self.nextthink = time + 9 + random()*8; - - + self.nextthink = time + 7 + random()*7; if (total_players == 2) - self.nextthink = time + 9 + random()*5; - - if (total_players == 3) - self.nextthink = time + 8 + random()*4; - - if (total_players == 4) - self.nextthink = time + 6 + random()*2; - + self.nextthink = time + 5 = random()*5; stuff = self.origin; - loadzombie = 0; + loadzombie = 1; - te = findradius (self.origin, 1500); - while (te) - { - if (te.classname == "player") - loadzombie = 1; - - te = te.chain; - } - - - te = findradius (self.origin, 250); + te = findradius (self.origin, 900); while (te) { if (te.classname == "player") @@ -786,15 +800,13 @@ void () spawn_ghoul_copy = } - if (loadzombie == 0) + + + if (loadzombie == 1) return; - - - - - ze = find (world, netname, "ghoul"); + ze = find (world, netname, "feral ghoul"); zomc = 0; pcount = 0; @@ -816,13 +828,12 @@ void () spawn_ghoul_copy = ze = find(ze, classname, "player"); } - - if (zomc > 60*pcount) + if (zomc > (30 + (30*pcount))) return; zomc = 0; - +/* te = findradius (self.origin, 1000); while (te) { @@ -832,18 +843,20 @@ void () spawn_ghoul_copy = te = te.chain; } - if (zomc >= 25) - return; + if (zomc >= 15+(15*pcount)) + return;*/ zombie = spawn (); zombie.owner = self; self = zombie; self.solid = SOLID_SLIDEBOX; + self.frame = 115; self.movetype = MOVETYPE_STEP; setmodel (self, "progs/ghoul.mdl"); setsize (self, '-8 -8 -24', '8 8 24'); self.health = 90; + self.takedamage = DAMAGE_AIM; self.netname = "feral ghoul"; self.max_health = self.health; self.th_stand = zombie_stand1; @@ -899,18 +912,29 @@ void () spawn_ghoul_copy = te = findradius (self.origin, 30); while (te) { - if (te.classname == "player" || te.classname == "monster" && te.health > 0) + if (te != self) { - remove(self); - return; + if (te.classname == "player" || te.classname == "monster" && te.health > 0) + { + remove(self); + return; + } } - te = te.chain; } + self.takedamage = DAMAGE_AIM; + + self.ideal_yaw = self.angles * '0 1 0'; + if (!self.yaw_speed) + self.yaw_speed = 20; + self.view_ofs = '0 0 25'; + self.use = monster_use; + + self.flags = self.flags | FL_MONSTER; self.classname = "monster"; - walkmonster_start_go (); + zombie_rise1(); }; @@ -975,9 +999,8 @@ void() monster_zombie = setsize (lair, '-8 -8 -24', '8 8 24'); lair.netname = "lair"; lair.classname = "lair"; - lair.nextthink = time + 30; lair.think = spawn_ghoul_copy; - lair.nextthink = time + 30; + lair.nextthink = time + 1*random(); } }