diff --git a/quakec/fallout2/client.qc b/quakec/fallout2/client.qc index 4dee1b8d5..3e67377a1 100644 --- a/quakec/fallout2/client.qc +++ b/quakec/fallout2/client.qc @@ -153,7 +153,9 @@ void() DecodeLevelParms = self.class = 1; - self.current_slot = parm16; + if (parm16 > 0) + self.current_slot = parm16; + self.islot1 = parm17; self.islot2 = parm18; self.islot3 = parm19; @@ -620,7 +622,7 @@ void() PutClientInServer = self.takedamage = DAMAGE_AIM; self.movetype = MOVETYPE_WALK; self.show_hostile = 0; - self.max_health = 100; + self.max_health = 100 + self.skill_combat; self.health = 100; self.flags = FL_CLIENT; self.air_finished = time + 12; @@ -638,7 +640,7 @@ void() PutClientInServer = DecodeLevelParms (); - +/* if (self.skill_combat == 0 && self.skill_sneak == 0 && self.skill_doctor == 0 && self.skill_science == 0) { self.deadflag = DEAD_NO; @@ -660,7 +662,7 @@ void() PutClientInServer = self.active = 1; player_stand1 (); return; - } + }*/ if (self.current_slot == 0) { @@ -703,7 +705,7 @@ void() PutClientInServer = self.fixangle = TRUE; // turn this way immediately - self.max_health = 100; + self.max_health = 100 + self.skill_combat; self.equipment_slot = 0; @@ -1312,7 +1314,7 @@ float(entity targ) check_fov_side = void() SneakLevel = { - local float sn, st, front, r; + local float sn, st, front, r, q; local entity te; local string report; @@ -1330,7 +1332,7 @@ void() SneakLevel = } - sn = 95; + sn = 90 + self.skill_sneak*0.5; //sneaking along a wall increases chance by 2% makevectors(self.angles); @@ -1358,16 +1360,9 @@ void() SneakLevel = if (r > 0 && r <= 600) { r = 600 - r; + q = 3 + (self.skill_sneak/5); - - if (self.class == 1) - sn = sn - r/3; - if (self.class == 2) - sn = sn - r/6; - if (self.class == 3) - sn = sn - r/3; - if (self.class == 4) - sn = sn - r/3; + sn = sn - r/q; } @@ -1431,6 +1426,8 @@ void() ArmorCheck = if (self.walk == 1) self.speedmulti = self.speedmulti * 0.50; + self.speedmulti = self.speedmulti*(1+(self.skill_sneak*0.01)); + //Armor if (aid == IID_ARM_DESERT) type = 0.10; @@ -1450,8 +1447,6 @@ void() ArmorCheck = type = 0.15; if (aid == IID_ARM_LPOWER) type = 0.50; - if (self.class == 3) - type += 0.10; if (self.rage == IID_CHEM_PSYCHO) type += 0.20; @@ -1506,15 +1501,9 @@ void () WeightControl = wt = wt + GetItemsWeight(self.islot16); self.weight = wt; + self.max_weight = 30; - if (self.class == 1) - self.max_weight = 40; - if (self.class == 2) - self.max_weight = 40; - if (self.class == 3) - self.max_weight = 60; - if (self.class == 4) - self.max_weight = 30; + self.max_weight = self.max_weight + self.skill_combat; }; @@ -1571,11 +1560,7 @@ void () PositionControl = if (self.maxspeed < 50) self.maxspeed = 50; - if (self.equipment_slot) - { - if ((ToIID(ItemInSlot(self, self.equipment_slot))) == IID_EQUIP_SPRINTKIT) - self.maxspeed = self.maxspeed*2; - } + }; .float clientcolors; @@ -1626,14 +1611,30 @@ void() PlayerPreThink = DisplayMenu (); return; } - else if (self.score >= 20 && self.currentmenu == "none") + else if (self.score >= 500 && self.score <= 1550 && self.currentmenu == "none") + { + self.score = self.score + 1; + } + else if (self.score >= 1551 && self.currentmenu == "none") { self.currentmenu = "gain_skill"; self.missionbrief = 2; DisplayMenu (); } + else if (self.score >= 200 && self.currentmenu == "none") + { + self.score = 500; + } + if ((self.skill_combat + self.skill_sneak + self.skill_doctor + self.skill_science) <= 5) + { + if (self.currentmenu == "none") + { + self.currentmenu = "gain_skill"; + return; + } + } @@ -2217,8 +2218,7 @@ void() ClientConnect = stuffcmd(self, "alias zoom impulse 60\n"); stuffcmd(self, "alias hostage impulse 65\n"); - stuffcmd(self, "alias stimpack \"cmd invuse superstims+stimpack+bandages\"\n"); - stuffcmd(self, "alias bandages \"cmd invuse bandages+superstims+stimpack\"\n"); + stuffcmd(self, "alias stimpack impulse 225\n"); stuffcmd(self, "alias equip \"cmd invuse 4\"\n"); stuffcmd(self, "alias q1 \"cmd invuse 5\"\n"); stuffcmd(self, "alias q2 \"cmd invuse 6\"\n"); diff --git a/quakec/fallout2/combat.qc b/quakec/fallout2/combat.qc index 5faaab5c5..80675a8fb 100644 --- a/quakec/fallout2/combat.qc +++ b/quakec/fallout2/combat.qc @@ -134,20 +134,17 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage = else if (attacker.classname == "player" && total_players == 2) damage = floor(damage * 0.90); - if (attacker.classname == "monster" && total_players == 4) - damage = floor(damage * 1.30); - if (attacker.classname == "monster" && total_players == 3) - damage = floor(damage * 1.20); - else if (attacker.classname == "monster" && total_players == 2) - damage = floor(damage * 1.10); + if (attacker.classname == "monster") + damage = floor(damage * 0.80); + //getting hurt is slightly painful to the score, play cautiously! if (attacker.classname == "monster" && targ.classname == "player") - targ.score = targ.score - 6; + targ.score = targ.score - 1; //flanking monsters awards points if (attacker.classname == "player" && targ.classname == "monster" && targ.enemy != attacker) - attacker.score = attacker.score + 5; + attacker.score = attacker.score + 1; //aimed shots awards points if (attacker.classname == "player" && targ.classname == "monster" && attacker.recoil <= 5) @@ -165,20 +162,20 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage = dot = (vec * v_forward); if (dot > 0.3) - attacker.score = attacker.score + 5; + attacker.score = attacker.score + 1; } //attacking a team-mate is a HUGE penalty if (attacker.classname == "player" && targ.classname == "player") { - attacker.score = attacker.score - 25; + attacker.score = attacker.score - 3; sprint(attacker, 2, "you just shot a teammate! be careful!\n"); } //attacking a hostage is a HUGE penalty if (attacker.classname == "player" && targ.classname == "hostage") { - attacker.score = attacker.score - 25; + attacker.score = attacker.score - 3; sprint(attacker, 2, "you just shot a hostage! be careful!\n"); } @@ -333,7 +330,7 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage = damage = (damage * 3); if (targ.classname == "monster") - attacker.score = attacker.score + 5; + attacker.score = attacker.score + 1; helm = targ.armortype; if (targ.helmet == 0) @@ -559,7 +556,7 @@ take = damage; while (te) { if (te.classname == "player") - te.score = te.score + 10; + te.score = te.score + 2; te = te.chain; } @@ -655,7 +652,7 @@ void(entity targ, entity inflictor, entity attacker, float damage) J_Damage = damage = (damage * 3); if (targ.classname == "monster") - attacker.score = attacker.score + 5; + attacker.score = attacker.score + 1; helm = targ.armortype; if (targ.helmet == 0) @@ -949,7 +946,7 @@ void(entity targ, entity inflictor, entity attacker, float damage) X_Damage = damage = (damage * 3); if (targ.classname == "monster") - attacker.score = attacker.score + 5; + attacker.score = attacker.score + 1; helm = targ.armortype; if (targ.helmet == 0) diff --git a/quakec/fallout2/csqc/invent.qc b/quakec/fallout2/csqc/invent.qc index 46d5125a9..8d75307e9 100644 --- a/quakec/fallout2/csqc/invent.qc +++ b/quakec/fallout2/csqc/invent.qc @@ -4,6 +4,7 @@ float PRINT_MEDIUM = 1; float show_inventory; float show_pipboy; +float show_trader; vector mousepos; @@ -34,6 +35,37 @@ float mouseisdown; #define CURSORSIZE 8 + + + + +void(vector pos, float slotno) TraderImage = +{ + local float it, mod_s, mod_e; + local string itname; + + + if (slotno == downslotnum && slotnum) + slotno = slotnum; + else if (slotno == slotnum && downslotnum) + slotno = downslotnum; + + if (slotno <= 20) + it = getstati(70+slotno); + + + itname = GetItemImage(ToIID(it)); + drawpic(pos, strcat("gui/", itname), IMGSIZEV, '1 1 1', 1); + + it = ToStatus(it); + if (it < 1) + return; + itname = ftos(it); + it = strlen(itname); + drawstring(pos + IMGSIZEV - '0 8 0' - '8 0 0'*it, itname, '8 8 8', '1 1 1', 1); +}; + + void(vector pos, float slotno) SlotImage = { local float it, mod_s, mod_e; @@ -71,9 +103,6 @@ void(vector pos, float slotno) SlotImage = itname = GetItemImage(ToIID(it)); drawpic(pos, strcat("gui/", itname), IMGSIZEV, '1 1 1', 1); - mod_s = getstati(70); - mod_e = getstati(71); - it = ToStatus(it); if (it < 1) return; @@ -118,18 +147,6 @@ void(vector pos, float slotno) SlotImageSmall = itname = GetItemImage(ToIID(it)); drawpic(pos, strcat("gui/", itname), IMGSIZEH, '1 1 1', 1); - mod_s = getstati(70); - mod_e = getstati(71); - - - if (it > 0) - { - if (mod_s == it) - drawstring(pos, "sil", '8 8 8', '1 1 1', 1); - - if (mod_e == it) - drawstring(pos, "ext", '8 8 8', '1 1 1', 1); - } it = ToStatus(it); if (it <= 1) @@ -358,6 +375,25 @@ void(vector pos, string image) Crosshair = }; +void() Trader_Draw = +{ + float width,height,lvl,bar; + vector w; + + width = cvar("vid_conwidth"); + height = cvar("vid_conheight"); + //w = '1 1 0'*height; + + + + + drawpic('0 0 0', "gui/pipboy/buyscreen.bmp", w, '1 1 1', 1); + TraderImage('2 2 0'*IMGSIZEF, 1); + TraderImage('2 3 0'*IMGSIZEF, 2); + + drawpic(mousepos, "gui/cursor.jpg", '1 1 0'*CURSORSIZE, '1 1 1', 1); +}; + void() Pipboy_Draw = { float width,height,lvl,bar; @@ -365,7 +401,7 @@ void() Pipboy_Draw = width = cvar("vid_conwidth"); height = cvar("vid_conheight"); - w = '1 1 0'*height; + @@ -429,14 +465,7 @@ void() Invent_Draw = local float slotofs; slotofs = sliderpos*(height - (IMGSIZEF*6)) + (IMGSIZEF*6); -/* - for (i = 6; i <= MAXSLOTS; i++) - { - SlotImage(((i*IMGSIZEF-slotofs) * '0 1 0'), i+1); -// itname = GetItemName(ToIID(it)); -// drawstring(toppos + ((i*8-slotofs) * '0 1 0'), strcat(itname, " (", ftos(ToStatus(it)), ")"), '8 8 0', '1 1 1', 1); - }*/ SlotImage('2 1 0'*IMGSIZEF, 5); SlotImage('2 2 0'*IMGSIZEF, 6); @@ -467,16 +496,6 @@ void() Invent_Draw = SlotImageSmall('1 12.5 0'*IMGSIZEK, 4); -/* - drawstring('120 72 0'+('4 0 0'*IMGSIZEF), " JUNK ", '8 8 8', '1 1 1', 1); - SlotImageSmall('112 80 0'+('4 0 0'*IMGSIZEF), 17); - SlotImageSmall('112 128 0'+('4 0 0'*IMGSIZEF), 18); - SlotImageSmall('112 176 0'+('4 0 0'*IMGSIZEF), 19); - SlotImageSmall('112 224 0'+('4 0 0'*IMGSIZEF), 20); - SlotImageSmall('96 80 0'+('5 0 0'*IMGSIZEF), 21); - SlotImageSmall('96 128 0'+('5 0 0'*IMGSIZEF), 22); - SlotImageSmall('96 176 0'+('5 0 0'*IMGSIZEF), 23); - SlotImageSmall('96 224 0'+('5 0 0'*IMGSIZEF), 24);*/ /* perki = GetPerkImage(getstati(60)); @@ -498,13 +517,7 @@ void() Invent_Draw = -/* - drawpic(('1 0 0'*IMGSIZEF), "gui/scrollup.jpg", '16 16 0', '1 1 1', 1); - for (i = 0; i < height; i+=16) - drawpic('1 0 0'*IMGSIZEF+'0 16 0'+i*'0 1 0', "gui/scrollbar.jpg", '16 16 0', '1 1 1', 1); - drawpic(('1 0 0'*IMGSIZEF)+(height-16)*'0 1 0', "gui/scrolldown.jpg", '16 16 0', '1 1 1', 1); - drawpic(('1 0 0'*IMGSIZEF)+'0 16 0'+sliderpos*(height-48)*'0 1 0', "gui/scrollbox.jpg", '16 16 0', '1 1 1', 1);*/ if (showcontextmenu) @@ -513,25 +526,11 @@ void() Invent_Draw = op = floor((mousepos_y - contextpos_y)/8); drawstring(contextpos + (0 * '0 8 0'), "use/reload", '8 8 0', '1 1 0' + (op!=0)*'0 0 1', 1); - drawstring(contextpos + (1 * '0 8 0'), "put in hand", '8 8 0', '1 1 0' + (op!=1)*'0 0 1', 1); - if (getstati(108) == 0) - drawstring(contextpos + (2 * '0 8 0'), "drop", '8 8 0', '1 1 0' + (op!=2)*'0 0 1', 1); + drawstring(contextpos + (1 * '0 8 0'), "drop", '8 8 0', '1 1 0' + (op!=1)*'0 0 1', 1); + drawstring(contextpos + (2 * '0 8 0'), "mix", '8 8 0', '1 1 0' + (op!=2)*'0 0 1', 1); if (getstati(108) == 1) - drawstring(contextpos + (2 * '0 8 0'), "sell", '8 8 0', '1 1 0' + (op!=2)*'0 0 1', 1); - if (getstati(60) == 14 || getstati(59) == 14) - drawstring(contextpos + (3 * '0 8 0'), "mix chems", '8 8 0', '1 1 0' + (op!=3)*'0 0 1', 1); + drawstring(contextpos + (3 * '0 8 0'), "sell", '8 8 0', '1 1 0' + (op!=3)*'0 0 1', 1); - drawstring(contextpos + (4 * '0 8 0'), "build: flash bomb", '8 8 0', '1 1 0' + (op!=4)*'0 0 1', 1); - drawstring(contextpos + (5 * '0 8 0'), "build: frag grenade", '8 8 0', '1 1 0' + (op!=5)*'0 0 1', 1); - drawstring(contextpos + (6 * '0 8 0'), "build: stun grenade", '8 8 0', '1 1 0' + (op!=6)*'0 0 1', 1); - drawstring(contextpos + (7 * '0 8 0'), "build: silencer", '8 8 0', '1 1 0' + (op!=7)*'0 0 1', 1); - - if (getstati(63) == 4) - { - drawstring(contextpos + (8 * '0 8 0'), "build: scope", '8 8 0', '1 1 0' + (op!=8)*'0 0 1', 1); - drawstring(contextpos + (9 * '0 8 0'), "build: x-ray device", '8 8 0', '1 1 0' + (op!=9)*'0 0 1', 1); - drawstring(contextpos + (10 * '0 8 0'), "build: modification", '8 8 0', '1 1 0' + (op!=10)*'0 0 1', 1); - } } else { @@ -644,6 +643,10 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent = { show_pipboy = !show_pipboy; } + if (param1 == 'b' && (getstati(108) == 1)) + { + show_trader = !show_trader; + } else if (!show_inventory) return false; else if (param1 == k_mouse1) @@ -672,7 +675,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent = return false; return true; } - if (eventtype == 1 && show_inventory) //key up + if (eventtype == 1 && (show_inventory || show_trader || show_pipboy)) //key up { if (param1 == k_mouse1) { @@ -682,28 +685,12 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent = if (op == 0) localcmd(strcat("cmd invuse ", ftos(slotnum), "\n")); - else if (op == 1) - localcmd(strcat("cmd invswap 1 ", ftos(slotnum), "\nimpulse 1\n")); - else if ((op == 2) && (getstati(108) == 0)) + else if ((op == 1)) localcmd(strcat("cmd invdrop ", ftos(slotnum), "\n")); - else if ((op == 2) && (getstati(108) == 1)) - localcmd(strcat("cmd invsell ", ftos(slotnum), "\n")); - else if (op == 3) + else if (op == 2) localcmd(strcat("cmd invmix ", ftos(slotnum), "\n")); - else if (op == 4) - localcmd("cmd create flash\n"); - else if (op == 5) - localcmd("cmd create grenade\n"); - else if (op == 6) - localcmd("cmd create stun\n"); - else if (op == 7) - localcmd("cmd create silencer\n"); - else if (op == 8) - localcmd("cmd create extender\n"); - else if (op == 9) - localcmd("cmd create xray\n"); - else if (op == 10) - localcmd("cmd create modify\n"); + else if ((op == 3) && (getstati(108) == 1)) + localcmd(strcat("cmd invsell ", ftos(slotnum), "\n")); showcontextmenu = false; } @@ -744,7 +731,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent = return false; return true; } - if (eventtype == 2 && show_inventory) //mouse + if (eventtype == 2 && (show_inventory || show_trader || show_pipboy)) //mouse { mousepos_x += param1; mousepos_y += param2; diff --git a/quakec/fallout2/csqc/main.qc b/quakec/fallout2/csqc/main.qc index eb37e3d7a..bbbad3372 100644 --- a/quakec/fallout2/csqc/main.qc +++ b/quakec/fallout2/csqc/main.qc @@ -442,6 +442,8 @@ void(float do2d) CSQC_UpdateView = DrawScreen(); else if (getstati(109) == 0) DrawScreen(); + else if (show_trader) + Trader_Draw(); else if (show_inventory) Invent_Draw(); else if (show_pipboy) diff --git a/quakec/fallout2/dog.qc b/quakec/fallout2/dog.qc index ec7c1270a..8e945196a 100644 --- a/quakec/fallout2/dog.qc +++ b/quakec/fallout2/dog.qc @@ -343,6 +343,11 @@ void () woof_pain = { if (self.rtime > 0) { + if (random()*100<10) + { + remove(self); + return; + } self.health = 180; return; } diff --git a/quakec/fallout2/doors.qc b/quakec/fallout2/doors.qc index 5c1efdedf..9294bd0f7 100644 --- a/quakec/fallout2/doors.qc +++ b/quakec/fallout2/doors.qc @@ -8,6 +8,12 @@ void () door_go_up; void () door_blocked = { + if (other.classname == "treasure_chest") + { + remove(other); + return; + } + T_Damage (other, self, self, self.dmg); if ((self.wait >= MULTICAST_ALL)) { @@ -159,7 +165,8 @@ void () door_killed = void () OpenDoorBeep = { - local float r; + local float r,x; + r = range (self.enemy); @@ -175,9 +182,14 @@ void () OpenDoorBeep = else sound (self, CHAN_BODY, "items/lockpick2.wav", 1, ATTN_NORM); + + x = (2.51 - (2.5*(self.enemy.skill_sneak/30))); + + self.think = OpenDoorBeep; - self.nextthink = time + 0.5; - if (ToIID(other.islot4) == IID_EQUIP_TOOLKIT) + self.nextthink = time + x; + + if (ToIID(self.enemy.islot4) == IID_EQUIP_TOOLKIT) self.owner.owner.rtime = self.owner.owner.rtime + 3; else self.owner.owner.rtime = self.owner.owner.rtime + 1; @@ -256,32 +268,13 @@ void () door_touch = } else if (self.owner.items == IT_KEY2) { - if (other.class == 1) - { - sprint(other, 2, "the lock on this door is too complex for you.\n"); - sound (other, CHAN_BODY, "items/locked.wav", 1, ATTN_NORM); - return; - } - if (other.class == 2) - { + sprint(other, 2, "picking...\n"); other.attack_finished = time + 7; other.rtime = time + 7.5; SpawnOpenDoor(self, other); return; - } - if (other.class == 3) - { - sprint(other, 2, "the lock on this door is too complex for you.\n"); - sound (other, CHAN_BODY, "items/locked.wav", 1, ATTN_NORM); - return; - } - if (other.class == 4) - { - sprint(other, 2, "picking...\n"); - SpawnOpenDoor(self, other); - return; - } + } if (self.owner.items == IT_KEY1) sound (self, CHAN_VOICE, self.noise3, 1, ATTN_NORM); diff --git a/quakec/fallout2/hos.qc b/quakec/fallout2/hos.qc index b61197b9f..cc747ce7b 100644 --- a/quakec/fallout2/hos.qc +++ b/quakec/fallout2/hos.qc @@ -285,7 +285,7 @@ void (vector jojo) spawn_civilian = } } - te = findradius (self.origin, 30); + te = findradius (self.origin, 40); while (te) { if (te.classname == "player" || te.classname == "monster" && te.health > 0) diff --git a/quakec/fallout2/inventory.qc b/quakec/fallout2/inventory.qc index 8e60cb560..d33099024 100644 --- a/quakec/fallout2/inventory.qc +++ b/quakec/fallout2/inventory.qc @@ -184,6 +184,18 @@ float(float slotno, float iid) FitsInSlot; .float xslot6; .float xslot7; .float xslot8; +.float xslot9; +.float xslot10; +.float xslot11; +.float xslot12; +.float xslot13; +.float xslot14; +.float xslot15; +.float xslot16; +.float xslot17; +.float xslot18; +.float xslot19; +.float xslot20; #define MAXSLOTS 24 @@ -604,7 +616,7 @@ slot_t(float slot) SlotField = return islot24; - bprint(PRINT_MEDIUM, "ERROR: Invalid slot number (", ftos(slot), ")\n"); + //bprint(PRINT_MEDIUM, "ERROR: Invalid slot number (", ftos(slot), ")\n"); return islot1; }; @@ -647,11 +659,11 @@ string(float iid) GetItemVModel = if (iid == IID_WP_JACKHAMMER) return "progs/v_jackhammer.mdl"; if (iid == IID_WP_MP9) - return "progs/v_ump.mdl"; + return "progs/v_mp9.mdl"; if (iid == IID_WP_MP7) return "progs/v_smg.mdl"; if (iid == IID_WP_MP9_S) - return "progs/v_ump.mdl"; + return "progs/v_mp9.mdl"; if (iid == IID_WP_MP7_S) return "progs/v_smg.mdl"; if (iid == IID_WP_RANGEMASTER) diff --git a/quakec/fallout2/items.qc b/quakec/fallout2/items.qc index 7d938a498..2708d00a1 100644 --- a/quakec/fallout2/items.qc +++ b/quakec/fallout2/items.qc @@ -207,7 +207,7 @@ void() treasure_touch = { sound (self, CHAN_BODY, "items/locked.wav", 1, ATTN_NORM); sprint(other, 2, "this metal box is locked.\n"); - if (other.class == 2 || other.class == 4) + if (other.skill_sneak >= 1) { sprint(other, 2, "you may attempt to pick this\n"); sprint(other, 2, "by pressing your 'action' key\n"); @@ -539,7 +539,7 @@ void () OpenChestBeep = self.think = OpenChestBeep; - self.nextthink = time + 0.2+random()*0.4; + self.nextthink = time + 0.1+random()*0.4 + (0.02*self.enemy.skill_sneak); self.enemy.chest = self; self.enemy.currentmenu = "menu_lockpick"; @@ -929,6 +929,7 @@ void() buyzone1 = setsize (self, '-16 -16 -24', '16 16 32'); setorigin(self, self.origin + '0 0 24'); self.classname = "merchant"; + }; void() buyzone2 = diff --git a/quakec/fallout2/knight.qc b/quakec/fallout2/knight.qc index 2f21e509f..af52bf304 100644 --- a/quakec/fallout2/knight.qc +++ b/quakec/fallout2/knight.qc @@ -48,7 +48,7 @@ $frame deathb9 deathb10 deathb11 void() go_invisible = { setmodel (self, ""); - sound (self, CHAN_BODY, "items/inv1.wav", 1, ATTN_NORM); + sound (self, CHAN_BODY, "misc/r_tele4.wav", 1, ATTN_NORM); }; void() go_visible = @@ -67,10 +67,7 @@ void() knight_stand7 =[ $stand7, knight_stand8 ] {ai_stand();}; void() knight_stand8 =[ $stand8, knight_stand9 ] {ai_stand();}; void() knight_stand9 =[ $stand9, knight_stand1 ] {ai_stand();}; -void() knight_walk1 =[ $walk1, knight_walk2 ] { -if (random() < 0.2) - sound (self, CHAN_VOICE, "knight/idle.wav", 1, ATTN_IDLE); -ai_walk(3);}; +void() knight_walk1 =[ $walk1, knight_walk2 ] {ai_walk(3);}; void() knight_walk2 =[ $walk2, knight_walk3 ] {ai_walk(2);}; void() knight_walk3 =[ $walk3, knight_walk4 ] {ai_walk(3);}; void() knight_walk4 =[ $walk4, knight_walk5 ] {ai_walk(4);}; @@ -89,8 +86,6 @@ void() knight_walk14 =[ $walk14, knight_walk1 ] {ai_walk(3);}; void() knight_run1 =[ $runb1, knight_run2 ] { if ((random() < 0.6) && self.model != "") go_invisible(); -else if (random() < 0.2) - sound (self, CHAN_VOICE, "knight/idle.wav", 1, ATTN_IDLE); ai_run(21);}; void() knight_run2 =[ $runb2, knight_run3 ] {ai_run(25);}; void() knight_run3 =[ $runb3, knight_run4 ] {ai_run(18);}; @@ -130,6 +125,16 @@ if (self.takedamage == DAMAGE_NO) return; } +local vector source, org, vec, dir; +local float weap, dot, tdam; +local string sdam; +makevectors (self.enemy.angles); +vec = normalize ((self.origin - self.enemy.origin)); +dot = (vec * v_forward); + +if (dot > 0.5) + return; + sound (self, CHAN_WEAPON, "knight/sword1.wav", 1, ATTN_NORM); ai_charge(0); go_visible(); @@ -247,7 +252,8 @@ void() knight_bow10 =[ $walk1, knight_walk1 ] {ai_turn();}; -void() knight_die1 =[ $death1, knight_die2 ] {}; +void() knight_die1 =[ $death1, knight_die2 ] +{go_visible();}; void() knight_die2 =[ $death2, knight_die3 ] {}; void() knight_die3 =[ $death3, knight_die4 ] {self.solid = SOLID_NOT;}; @@ -321,7 +327,7 @@ void() monster_knight = setsize (self, '-16 -16 -24', '16 16 40'); self.health = 75; - self.islot3 = SlotVal(IID_ARM_METAL, 1); + self.islot3 = SlotVal(IID_ARM_METAL, 1); self.armornoise = "weapons/ric1.wav"; self.th_stand = knight_stand1; self.th_walk = knight_walk1; diff --git a/quakec/fallout2/misc.qc b/quakec/fallout2/misc.qc index 55dc05bbd..d570d1f50 100644 --- a/quakec/fallout2/misc.qc +++ b/quakec/fallout2/misc.qc @@ -923,6 +923,9 @@ void() brotherhood_merchant = self.classname = "merchant"; self.think = shop_face; self.nextthink = time + 0.5; + + self.xslot1 = 412; + self.xslot2 = 413; }; void() brotherhood_sergeant = diff --git a/quakec/fallout2/mod_buy.qc b/quakec/fallout2/mod_buy.qc index 5e2e3d2ff..817c79f6e 100644 --- a/quakec/fallout2/mod_buy.qc +++ b/quakec/fallout2/mod_buy.qc @@ -949,8 +949,9 @@ void() W_PlayerMenu = sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM); centerprint(self, "\n"); self.currentmenu = "none"; - //DisplayMenu(); - self.impulse = 1; + PutClientInServer(); + self.impulse = 0; + self.current_slot = 1; return; } else if (self.impulse == 1 && coop == 0) diff --git a/quakec/fallout2/plats.qc b/quakec/fallout2/plats.qc index 4a935b572..52d72dbd1 100644 --- a/quakec/fallout2/plats.qc +++ b/quakec/fallout2/plats.qc @@ -97,6 +97,13 @@ void() plat_outside_touch = if (other.classname != "player") return; + + if (other.classname == "treasure_chest") + { + remove(other); + return; + } + if (other.health <= 0) return; @@ -118,6 +125,12 @@ void() plat_crush = { //dprint ("plat_crush\n"); + if (other.classname == "treasure_chest") + { + remove(other); + return; + } + other.deathtype = "squish"; T_Damage (other, self, self, 1); @@ -225,6 +238,13 @@ void() func_train_find; void() train_blocked = { + + if (other.classname == "treasure_chest") + { + remove(other); + return; + } + if (time < self.attack_finished) return; self.attack_finished = time + 0.5; diff --git a/quakec/fallout2/soldier.qc b/quakec/fallout2/soldier.qc index a35260edf..fb7d66b8b 100644 --- a/quakec/fallout2/soldier.qc +++ b/quakec/fallout2/soldier.qc @@ -1378,6 +1378,11 @@ void () grunt_pain = if (self.rtime > 0) { + if (random()*100<10) + { + remove(self); + return; + } if (random()*100<50) sound (self, CHAN_VOICE, "player/headshot.wav", 0.75, ATTN_NORM); else diff --git a/quakec/fallout2/weapons.qc b/quakec/fallout2/weapons.qc index 06d71c19b..b17285ae7 100644 --- a/quakec/fallout2/weapons.qc +++ b/quakec/fallout2/weapons.qc @@ -199,14 +199,15 @@ void(float damage, float dist, float rate) FireMelee = if (dot < 0.5 && trace_ent.takedamage) { - tdam = self.sneak*random()*3; + tdam = 10 + (15*self.skill_sneak); + if (getperk(7)) - tdam = self.sneak*random()*6; + tdam = tdam * 2; if (self.steadyaim == 0) - tdam = tdam * 5; + tdam = tdam + 10; - if (trace_ent.solid != SOLID_BSP && trace_ent.classname != "car" && (trace_ent.islot3 == 0 || self.critical == 3)) + if (trace_ent.solid != SOLID_BSP && trace_ent.classname != "car") SpawnBlood (org, 1); else SpawnNonBlood (org, 1); @@ -239,7 +240,7 @@ void(float damage, float dist, float rate) FireMelee = bprint(2, " assassinates "); bprint(2, trace_ent.netname); bprint(2, "!\n"); - self.score = self.score + 25; + self.score = self.score + 5; if (random()*4<2) sound (trace_ent, CHAN_WEAPON, "player/headshot.wav", 0.25, ATTN_IDLE); @@ -1620,11 +1621,11 @@ void() W_Attack = else if (weap == IID_WP_DKS1_S) FireAssaultRifle(35, 3, "weapons/moonlight1.wav", 5000, 0.25); else if (weap == IID_WP_WINCHESTER) - W_FireShotgun (2, 4, 8, 30, 1500, 0, "weapons/shotgun1.wav"); + W_FireShotgun (2, 5, 8, 50, 1500, 0, "weapons/shotgun1.wav"); else if (weap == IID_WP_MOSSBERG) - W_FireShotgun (2, 4, 8, 20, 2000, 1, "weapons/citykiller.wav"); + W_FireShotgun (2, 5, 7, 20, 2000, 1, "weapons/citykiller.wav"); else if (weap == IID_WP_JACKHAMMER) - W_FireShotgun (1, 4, 9, 25, 1750, 2, "weapons/citykiller.wav"); + W_FireShotgun (1, 5, 7, 30, 1750, 2, "weapons/citykiller.wav"); else if (weap == IID_WP_MP9) FireSMG(14, 0, "weapons/mp7.wav", 1500, 0.10); else if (weap == IID_WP_MP7) @@ -1758,7 +1759,7 @@ void() CheatCommand = { local float x; local string y; - +/* x = self.waterlevel; y = ftos(x); @@ -1766,8 +1767,8 @@ void() CheatCommand = sprint(self, 2, y); sprint(self, 2, "\n"); self.ammo_shells = 900; - self.score = 21; - + self.currentmenu = "gain_skill"; +*/ }; /* @@ -4227,14 +4228,28 @@ void () UseStimpack = { sprint(self, PRINT_MEDIUM, trace_ent.netname); sprint(self, PRINT_MEDIUM, " had no stims!\n"); - return; } - else + if (x >= 1) { - self.score = self.score + 50; + self.score = self.score + 5; sprint(self, PRINT_MEDIUM, trace_ent.netname); sprint(self, PRINT_MEDIUM, " had a stim. using it to heal.\n"); DecreaseDestroySlotOther(trace_ent, x);//take away a stimpack + return; + } + x = SlotOfItem(trace_ent, IID_CHEM_MEDICALBAG); + if (x == 0) + { + sprint(self, PRINT_MEDIUM, trace_ent.netname); + sprint(self, PRINT_MEDIUM, " had no medical bag!\n"); + } + if (x >= 1) + { + self.score = self.score + 5; + sprint(self, PRINT_MEDIUM, trace_ent.netname); + sprint(self, PRINT_MEDIUM, " had a stim. using it to heal.\n"); + DecreaseDestroySlotOther(trace_ent, x);//take away a stimpack + return; } } @@ -4645,9 +4660,7 @@ void () DisplayMenu = void () Special = { - if (self.class == 1) - UseMedicalBag(); - else + Sneak(); }; @@ -4946,7 +4959,7 @@ void () ExitScreen = sprint(self, 2, "lock is jammed.\n"); return; } - if (self.class != 2 && self.class != 4) + if (self.skill_sneak == 0) { sound (self, CHAN_BODY, "items/locked.wav", 1, ATTN_NORM); sprint(self, 2, "locked!\n"); @@ -4970,7 +4983,8 @@ void () ExitScreen = if (self.currentmenu != "none") return; - bprint (2, "hostage has been located.\n"); + bprint (2, "civilian has been located.\n"); + sound (trace_ent, CHAN_BODY, "misc/rescued.wav", 1, ATTN_NONE); rescue = rescue + 1; //remove(trace_ent); spawn_excla(trace_ent, 3000); @@ -5628,6 +5642,26 @@ void () shop_face = { self.enemy = te; te.safezone = 1; + te.xslot1 = self.xslot1; + te.xslot1 = self.xslot2; + te.xslot1 = self.xslot3; + te.xslot1 = self.xslot4; + te.xslot1 = self.xslot5; + te.xslot1 = self.xslot6; + te.xslot1 = self.xslot7; + te.xslot1 = self.xslot8; + te.xslot1 = self.xslot9; + te.xslot1 = self.xslot10; + te.xslot1 = self.xslot11; + te.xslot1 = self.xslot12; + te.xslot1 = self.xslot13; + te.xslot1 = self.xslot14; + te.xslot1 = self.xslot15; + te.xslot1 = self.xslot16; + te.xslot1 = self.xslot17; + te.xslot1 = self.xslot18; + te.xslot1 = self.xslot19; + te.xslot1 = self.xslot20; } te = te.chain; } @@ -5734,20 +5768,10 @@ void () CharacterSheet = sprint (self, PRINT_HIGH, "Score ‘ "); r1 = (self.score); - r2 = (self.kills); - if (r1 == 0) - r1 = 1; - ratio = (r2 / r1); x = ftos (r1); sprint (self, 2, x); - sprint (self, 2, " ("); - x = ftos (self.kills); - sprint (self, 2, x); - sprint (self, PRINT_HIGH, "/"); - x = ftos (self.dead); - sprint (self, 2, x); - sprint (self, 2, ") "); + sprint (self, PRINT_HIGH, "\nSpeed ‘ "); x = ftos (self.maxspeed); sprint (self, 2, x); diff --git a/quakec/fallout2/world.qc b/quakec/fallout2/world.qc index 13c2d84f0..e0ba0f080 100644 --- a/quakec/fallout2/world.qc +++ b/quakec/fallout2/world.qc @@ -68,12 +68,26 @@ void() SetupStats = clientstat(67, 2, map_ent1); clientstat(68, 2, map_ent2); clientstat(69, 2, map_ent3); - clientstat(70, 2, silencer); - clientstat(71, 2, extender); - clientstat(81, 2, skill_combat); - clientstat(82, 2, skill_doctor); - clientstat(83, 2, skill_sneak); - clientstat(84, 2, skill_science); + clientstat(71, 2, xslot1); + clientstat(72, 2, xslot2); + clientstat(73, 2, xslot3); + clientstat(74, 2, xslot4); + clientstat(75, 2, xslot5); + clientstat(76, 2, xslot6); + clientstat(77, 2, xslot7); + clientstat(78, 2, xslot8); + clientstat(79, 2, xslot9); + clientstat(80, 2, xslot10); + clientstat(81, 2, xslot11); + clientstat(82, 2, xslot12); + clientstat(83, 2, xslot13); + clientstat(84, 2, xslot14); + clientstat(85, 2, xslot15); + clientstat(86, 2, xslot16); + clientstat(87, 2, xslot17); + clientstat(88, 2, xslot18); + clientstat(89, 2, xslot19); + clientstat(90, 2, xslot20); clientstat(91, 2, islot17); clientstat(92, 2, islot18); clientstat(93, 2, islot19); @@ -83,14 +97,11 @@ void() SetupStats = clientstat(97, 2, islot23); clientstat(98, 2, islot24); clientstat(99, 2, recoil); - clientstat(100, 2, xslot1); - clientstat(101, 2, xslot2); - clientstat(102, 2, xslot3); - clientstat(103, 2, xslot4); - clientstat(104, 2, xslot5); - clientstat(105, 2, xslot6); - clientstat(106, 2, xslot7); - clientstat(107, 2, xslot8); + clientstat(81, 2, skill_combat); + clientstat(82, 2, skill_doctor); + clientstat(83, 2, skill_sneak); + clientstat(84, 2, skill_science); + clientstat(108, 2, safezone); clientstat(109, 2, connected); clientstat(110, 2, steadyaim); @@ -669,15 +680,12 @@ if (coop == 1) // Players vs Monsters te = find(te, classname, "player"); } -// if (pcount > 0) -// self.timer = self.timer + 0.5; - if (pcount == 0 && self.timer > 5) localcmd("restart\n"); if (world.map_obj == OBJ_HOSTAGE) { - time_left = time_left - 1; + //time_left = time_left - 1; te = find(world, classname, "rhostage"); while (te) @@ -1088,11 +1096,12 @@ if (coop == 1) // Players vs Monsters ze = find (ze, classname, "player"); } } - if (endgame_timer == 10) + if (endgame_timer >= 10) { localcmd("serverinfo objective return\n"); changelevel ("r_bunker"); } + endgame_timer = endgame_timer + 1; } if (pcount == 0 && pdead > 0) endgame_timer = endgame_timer + 1; @@ -1743,14 +1752,8 @@ void () RecoilControl = } - if (te.class == 1) - te.recoil = te.recoil - 0.20; - if (te.class == 2) - te.recoil = te.recoil - 0.20; - if (te.class == 3) - te.recoil = te.recoil - 0.25; - if (te.class == 4) - te.recoil = te.recoil - 0.15; + + te.recoil = te.recoil - (0.20+(te.skill_combat*0.005)); } else { @@ -1967,7 +1970,7 @@ void() worldspawn = precache_model ("progs/v_pipe.mdl"); precache_model ("progs/v_double.mdl"); precache_model ("progs/v_combat.mdl"); - precache_model ("progs/v_ump.mdl"); + precache_model ("progs/v_mp9.mdl"); precache_model ("progs/v_g11.mdl"); precache_model ("progs/v_ak47.mdl"); precache_model ("progs/v_acr.mdl"); @@ -2096,6 +2099,8 @@ void() worldspawn = precache_sound ("misc/hosdie1.wav"); precache_sound ("misc/hosdie2.wav"); + precache_sound ("misc/hosdown.wav"); + precache_sound ("misc/rescued.wav"); precache_sound ("player/gib1.wav"); precache_sound ("player/step1.wav"); diff --git a/quakec/fallout2/zombie.qc b/quakec/fallout2/zombie.qc index d485f4b8b..49449ac0c 100644 --- a/quakec/fallout2/zombie.qc +++ b/quakec/fallout2/zombie.qc @@ -524,6 +524,12 @@ void () zombie_death = { if (self.rtime > 0) { + if (random()*100<10) + { + remove(self); + return; + } + if (random()*100<50) sound (self, CHAN_VOICE, "player/headshot.wav", 0.75, ATTN_NORM); else @@ -925,13 +931,8 @@ void() monster_zombie = self.th_die = zombie_die; self.th_melee = zombie_melee; - if (world.map_obj == OBJ_DEADTOWN) - { - if (random()<0.5) - self.th_missile = zombie_missile; - } - else - self.th_missile = zombie_missile; + + self.th_missile = zombie_missile; self.angles_y = random()*360; @@ -939,12 +940,15 @@ void() monster_zombie = - if (random()<0.25 || world.map_obj == OBJ_DEADTOWN) - spawn_ghoul(self.origin); - if (world.map_obj == OBJ_DEADTOWN && random()<0.25) - spawn_ghoul(self.origin + '128 128 0'); - if (world.map_obj == OBJ_DEADTOWN && random()<0.25) - spawn_ghoul(self.origin + '128 0 0'); + + spawn_ghoul(self.origin + '-128 -128 0'); + spawn_ghoul(self.origin + '-128 0 0'); + spawn_ghoul(self.origin + '0 -128 0'); + spawn_ghoul(self.origin + '0 128 0'); + spawn_ghoul(self.origin + '128 0 0'); + spawn_ghoul(self.origin + '128 128 0'); + spawn_ghoul(self.origin + '-128 128 0'); + spawn_ghoul(self.origin + '128 -128 0'); if (random()<0.25 && world.map_obj == 1) spawn_civilian(self.origin);