1
0
Fork 0
forked from fte/fteqw

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3465 fc73d0e0-1445-4013-8a0c-d673dee63da5

This commit is contained in:
Magnus 2009-11-17 14:22:17 +00:00
parent c8635934a6
commit 4677f8a644
11 changed files with 811 additions and 593 deletions

View file

@ -1132,7 +1132,7 @@ void() WaterMove =
else
self.dmgtime = time + 0.2;
T_Damage (self, world, world, 10*self.waterlevel);
self.radiation = self.radiation + (1*self.waterlevel);
}
}
else if (self.watertype == CONTENT_SLIME)
@ -1140,7 +1140,8 @@ void() WaterMove =
if (self.dmgtime < time && self.rage != IID_CHEM_RADX)
{
self.dmgtime = time + 1;
T_Damage (self, world, world, 4*self.waterlevel);
self.radiation = self.radiation + ((1*self.waterlevel)/2);
}
}
@ -2074,9 +2075,9 @@ void() ClientConnect =
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");
stuffcmd(self, "alias q2 \"cmd invuse 11\"\n");
stuffcmd(self, "alias quick1 \"cmd invuse 5\"\n");
stuffcmd(self, "alias quick2 \"cmd invuse 6\"\n");
stuffcmd(self, "alias quick2 \"cmd invuse 11\"\n");
stuffcmd(self, "alias toolkit \"cmd invswap toolkit 2;impulse 2\"\n");

View file

@ -311,6 +311,8 @@ void(string arg1, string arg2) Cmd_GainPerk =
self.perk1 = 9;
if (arg1 == "10")
self.perk1 = 10;
if (arg1 == "11")
self.perk1 = 11;
}
if (arg2 == "2")
{
@ -334,6 +336,8 @@ void(string arg1, string arg2) Cmd_GainPerk =
self.perk2 = 9;
if (arg1 == "10")
self.perk2 = 10;
if (arg1 == "11")
self.perk2 = 11;
}
};
@ -599,22 +603,22 @@ void(string arg1) Cmd_InvMix =
DecreaseDestroySlot(23);
DecreaseDestroySlot(24);
if (random()*100 > (self.skill_science*8))
if (random()*100 > (self.skill_science*20))
{
sprint(self, PRINT_MEDIUM, "your concoction exploded!\n");
Explosion();
return;
}
if (random()*100 < ((self.skill_science*8) - 100))
if (random()*100 < ((self.skill_science*20) - 100))
{
sprint(self, PRINT_MEDIUM, "2 grenades created!\n");
sprint(self, PRINT_MEDIUM, "3 nuka bombs created!\n");
sound (self, CHAN_BODY, "misc/yourturn.wav", 1, ATTN_NORM);
TryGiveStackable(self, IID_GREN_FRAG, 2);
TryGiveStackable(self, IID_GREN_FRAG, 3);
return;
}
TryGiveStackable(self, IID_GREN_FRAG, 1);
sprint(self, PRINT_MEDIUM, "1 grenade created\n");
sprint(self, PRINT_MEDIUM, "1 nuka bomb created\n");
sound (self, CHAN_BODY, "misc/item1.wav", 1, ATTN_NORM);
}
else if ((iid1 == IID_MISC_CHEMICALS && iid2 == IID_MISC_RDXCRYSTAL) ||

View file

@ -115,7 +115,7 @@ This should be the only function that ever reduces health.
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
{
local entity oldself;
local float save, dm;
local float save, dm, radpenalty;
local float take, severity, helm;
local string attackerteam, targteam;
local string info1, info2;
@ -137,6 +137,15 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
if (targ.classname == "player")
damage = floor(damage * 0.60);*/
if (targ.radiation > 0)
{
radpenalty = 1 + (targ.radiation/100);
if (radpenalty > 1.25)
radpenalty = 1.25;
damage = damage * radpenalty;
}
//getting hurt is slightly painful to the score, play cautiously!
if (attacker.classname == "monster" && targ.classname == "player")
@ -449,31 +458,31 @@ take = damage;
switch(ToIID(targ.islot3))
{
case IID_ARM_DESERT:
take -= 2;
take -= 1;
break;
case IID_ARM_LEATHER:
take -= 3;
take -= 2;
break;
case IID_ARM_VANDAL:
take -= 5;
take -= 3;
break;
case IID_ARM_METAL:
take -= 1;
break;
case IID_ARM_TESLA:
take -= 6;
take -= 5;
break;
case IID_ARM_COMBAT:
take -= 6;
break;
case IID_ARM_SEVA:
take -= 6;
take -= 5;
break;
case IID_ARM_FORCE:
take -= 9;
break;
case IID_ARM_LPOWER:
take -= 10;
take -= 8;
break;
default:
break;
@ -485,7 +494,7 @@ take = damage;
take = take * 0.80;
break;
case IID_ARM_VANDAL:
take = take * 0.70;
take = take * 0.65;
break;
case IID_ARM_METAL:
take = take * 0.40;

View file

@ -14,6 +14,8 @@ float scrheight;
vector mousepos;
float showcontextmenu;
float showmixmenu;
vector contextpos;
float slotnum; //the current slot under the mousecursor
@ -121,6 +123,53 @@ void(vector pos, float slotno) SlotImage =
drawstring(pos + IMGSIZEV - '0 8 0' - '8 0 0'*it, itname, '8 8 8', '1 1 1', 1);
};
void(vector pos, float slotno, vector imgsize) SlotImageBig =
{
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 <= 16)
it = getstati(31+slotno);
else
{
if (slotno == 17)
it = getstati(91);
if (slotno == 18)
it = getstati(92);
if (slotno == 19)
it = getstati(93);
if (slotno == 20)
it = getstati(94);
if (slotno == 21)
it = getstati(95);
if (slotno == 22)
it = getstati(96);
if (slotno == 23)
it = getstati(97);
if (slotno == 24)
it = getstati(98);
if (slotno == 25)
it = getstati(104);
if (slotno == 26)
it = getstati(105);
}
itname = GetItemImage(ToIID(it));
drawpic(pos, strcat("gui/weapons/", itname), imgsize, '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) SlotImageSmall =
@ -492,7 +541,7 @@ void() Trader_Draw =
if (slotnum <= 20)
it = getstati(70+slotnum);
itname = GetItemDesc(ToIID(it));
itname = GetItemName(ToIID(it));
drawstring('32 16 0', itname, '8 8 0', '1 1 1', 1);
price = GetBaseValue(ToIID(it));
@ -513,30 +562,30 @@ void() Perks_Draw =
{
local string perki, perk2i, p1, p2;
drawpic('0 0 0', "gui/pipboy/perks.png", '640 480 0', '1 1 1', 1);
drawpic('0 0 0', "gui/pipboy/perks.png", '640 480 0'*(scrwidth/640), '1 1 1', 1);
if (mousepos_y >= 2.0*IMGSIZEF && mousepos_y <= 4*IMGSIZEF)
if (mousepos_y >= 2.0*IMGSIZEF*(scrwidth/640) && mousepos_y <= 4*IMGSIZEF*(scrwidth/640))
{
if (mousepos_x >= 3*IMGSIZEF && mousepos_x <= 5.5*IMGSIZEF)
if (mousepos_x >= 3*IMGSIZEF*(scrwidth/640) && mousepos_x <= 5.5*IMGSIZEF*(scrwidth/640))
selected_class = 8;
else if (mousepos_x >= 6*IMGSIZEF && mousepos_x <= 7.5*IMGSIZEF)
else if (mousepos_x >= 6*IMGSIZEF*(scrwidth/640) && mousepos_x <= 7.5*IMGSIZEF*(scrwidth/640))
selected_class = 9;
else
selected_class = 0;
}
else if (mousepos_y >= 390 && mousepos_y <= 425)
else if (mousepos_y >= 390*(scrwidth/640) && mousepos_y <= 425*(scrwidth/640))
{
if (mousepos_x >= 300 && mousepos_x <= 335)
if (mousepos_x >= 300*(scrwidth/640) && mousepos_x <= 335*(scrwidth/640))
selected_class = 5;
else if (mousepos_x >= 350 && mousepos_x <= 385)
else if (mousepos_x >= 350*(scrwidth/640) && mousepos_x <= 385*(scrwidth/640))
selected_class = 6;
else if (mousepos_x >= 400 && mousepos_x <= 435)
else if (mousepos_x >= 400*(scrwidth/640) && mousepos_x <= 435*(scrwidth/640))
selected_class = 7;
else
selected_class = 0;
@ -548,15 +597,14 @@ void() Perks_Draw =
perk2i = GetPerkImage(getstati(59));
drawpic('3.5 2 0'*IMGSIZEF, perki, '128 128 0', '1 1 1', 1);
drawpic('6 2 0'*IMGSIZEF, perk2i, '128 128 0', '1 1 1', 1);
drawpic('3.5 2 0'*IMGSIZEF*(scrwidth/640), perki, '128 128 0'*(scrwidth/640), '1 1 1', 1);
drawpic('6 2 0'*IMGSIZEF*(scrwidth/640), perk2i, '128 128 0'*(scrwidth/640), '1 1 1', 1);
p1 = PerkNameCentered(1, getstati(60));
p2 = PerkNameCentered(2, getstati(59));
drawstring('4 4.5 0'*IMGSIZEF - '45 0 0', p1, '8 8 8', '1 1 1', 1);
drawstring('6 4.5 0'*IMGSIZEF - '7 0 0', p2, '8 8 8', '1 1 1', 1);
drawstring('4 4.5 0'*IMGSIZEF*(scrwidth/640) - '45 0 0'*(scrwidth/640), p1, '8 8 8'*(scrwidth/640), '1 1 1', 1);
drawstring('6 4.5 0'*IMGSIZEF*(scrwidth/640) - '7 0 0'*(scrwidth/640), p2, '8 8 8'*(scrwidth/640), '1 1 1', 1);
@ -568,42 +616,60 @@ void() Items_Draw =
local float it;
local string itname;
drawpic('0 0 0', "gui/pipboy/items.png", '640 480 0', '1 1 1', 1);
drawpic('0 0 0', "gui/pipboy/items.png", '640 480 0'*(scrwidth/640), '1 1 1', 1);
if (mousepos_y >= 390 && mousepos_y <= 425)
if (mousepos_y >= 390*(scrwidth/640) && mousepos_y <= 425*(scrwidth/640))
{
drawpic('0 0 0', "gui/pipboy/items.png", '640 480 0', '1 1 1', 1);
drawpic('0 0 0', "gui/pipboy/items.png", '640 480 0'*(scrwidth/640), '1 1 1', 1);
if (mousepos_x >= 300 && mousepos_x <= 325)
if (mousepos_x >= 300*(scrwidth/640) && mousepos_x <= 325*(scrwidth/640))
selected_class = 5;
else if (mousepos_x >= 350 && mousepos_x <= 385)
else if (mousepos_x >= 350*(scrwidth/640) && mousepos_x <= 385*(scrwidth/640))
selected_class = 6;
else if (mousepos_x >= 400 && mousepos_x <= 435)
else if (mousepos_x >= 400*(scrwidth/640) && mousepos_x <= 435*(scrwidth/640))
selected_class = 7;
else
selected_class = 0;
}
SlotImage('3 1.25 0'*IMGSIZEF, 1);
SlotImageBig('3 1.25 0'*IMGSIZEF*(scrwidth/640), 1, '180 64 0'*(scrwidth/640));
SlotImage('3 2.75 0'*IMGSIZEF, 2);
SlotImageBig('5.5 2.75 0'*IMGSIZEF*(scrwidth/640), 2, '180 64 0'*(scrwidth/640));
SlotImage('3 4.25 0'*IMGSIZEF, 3);
SlotImageBig('3 3.4 0'*IMGSIZEF*(scrwidth/640), 3, '128 128 0'*(scrwidth/640));
it = getstati(32);
itname = GetItemName(ToIID(it));
drawstring('4 1.5 0'*IMGSIZEF + '0 0 0', itname, '8 8 0', '1 1 1', 1);
drawstring('3 1 0'*IMGSIZEF*(scrwidth/640) + '0 0 0'*(scrwidth/640), itname, '8 8 0'*(scrwidth/640), '1 1 1', 1);
itname = (ftos(GetWeaponDamage(ToIID(it))));
drawstring('6 1.5 0'*IMGSIZEF*(scrwidth/640) + '0 8 0'*(scrwidth/640), strcat("damage: ", itname, "\n"), '8 8 0'*(scrwidth/640), '1 1 1', 1);
itname = (ftos(GetWeaponRange(ToIID(it))));
drawstring('6 1.5 0'*IMGSIZEF*(scrwidth/640) + '0 16 0'*(scrwidth/640), strcat("range: ", itname, "\n"), '8 8 0'*(scrwidth/640), '1 1 1', 1);
itname = (ftos(GetItemWeight(ToIID(it))));
drawstring('6 1.5 0'*IMGSIZEF*(scrwidth/640) + '0 24 0'*(scrwidth/640), strcat("weight: ", itname, "\n"), '8 8 0'*(scrwidth/640), '1 1 1', 1);
it = getstati(33);
itname = GetItemName(ToIID(it));
drawstring('4 3 0'*IMGSIZEF + '0 0 0', itname, '8 8 0', '1 1 1', 1);
drawstring('5.5 2.5 0'*IMGSIZEF*(scrwidth/640) + '0 0 0'*(scrwidth/640), itname, '8 8 0'*(scrwidth/640), '1 1 1', 1);
itname = (ftos(GetWeaponDamage(ToIID(it))));
drawstring('4.5 2.8 0'*IMGSIZEF*(scrwidth/640) + '0 8 0'*(scrwidth/640), strcat("damage: ", itname, "\n"), '8 8 0'*(scrwidth/640), '1 1 1', 1);
itname = (ftos(GetWeaponRange(ToIID(it))));
drawstring('4.5 2.8 0'*IMGSIZEF*(scrwidth/640) + '0 16 0'*(scrwidth/640), strcat("range: ", itname, "\n"), '8 8 0'*(scrwidth/640), '1 1 1', 1);
itname = (ftos(GetItemWeight(ToIID(it))));
drawstring('4.5 2.8 0'*IMGSIZEF*(scrwidth/640) + '0 24 0'*(scrwidth/640), strcat("weight: ", itname, "\n"), '8 8 0'*(scrwidth/640), '1 1 1', 1);
it = getstati(34);
itname = GetItemName(ToIID(it));
drawstring('4 4.5 0'*IMGSIZEF + '0 0 0', itname, '8 8 0', '1 1 1', 1);
drawstring('3 5 0'*IMGSIZEF*(scrwidth/640) + '0 0 0'*(scrwidth/640), itname, '8 8 0'*(scrwidth/640), '1 1 1', 1);
itname = (ftos(GetArmorThreshold(ToIID(it))));
drawstring('5 4.3 0'*IMGSIZEF*(scrwidth/640) + '0 8 0'*(scrwidth/640), strcat("threshold: ", itname, "\n"), '8 8 0'*(scrwidth/640), '1 1 1', 1);
itname = (ftos(GetArmorAbsorb(ToIID(it))));
drawstring('5 4.3 0'*IMGSIZEF*(scrwidth/640) + '0 16 0'*(scrwidth/640), strcat("absorb: ", itname, "\n"), '8 8 0'*(scrwidth/640), '1 1 1', 1);
itname = (ftos(GetItemWeight(ToIID(it))));
drawstring('5 4.3 0'*IMGSIZEF*(scrwidth/640) + '0 24 0'*(scrwidth/640), strcat("weight: ", itname, "\n"), '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawpic(mousepos, "gui/cursor.jpg", '1 1 0'*CURSORSIZE, '1 1 1', 1);
};
@ -615,55 +681,64 @@ void() GainPerk_Draw =
local float it;
local string itname, pn, pd;
drawpic('0 0 0', "gui/pipboy/gainperk.png", '640 480 0', '1 1 1', 1);
drawpic('0 0 0', "gui/pipboy/gainperk.png", '640 480 0'*(scrwidth/640), '1 1 1', 1);
if (mousepos_y >= 2*IMGSIZEF && mousepos_y <= 3*IMGSIZEF)
if (mousepos_y >= 2*IMGSIZEF*(scrwidth/640) && mousepos_y <= 3*IMGSIZEF*(scrwidth/640))
{
if (mousepos_x >= 2*IMGSIZEF && mousepos_x <= 3*IMGSIZEF)
if (mousepos_x >= 2*IMGSIZEF*(scrwidth/640) && mousepos_x <= 3*IMGSIZEF*(scrwidth/640))
which_perk = 1;
else if (mousepos_x >= 3*IMGSIZEF && mousepos_x <= 4*IMGSIZEF)
else if (mousepos_x >= 3*IMGSIZEF*(scrwidth/640) && mousepos_x <= 4*IMGSIZEF*(scrwidth/640))
which_perk = 2;
else if (mousepos_x >= 4*IMGSIZEF && mousepos_x <= 5*IMGSIZEF)
else if (mousepos_x >= 4*IMGSIZEF*(scrwidth/640) && mousepos_x <= 5*IMGSIZEF*(scrwidth/640))
which_perk = 3;
else if (mousepos_x >= 5*IMGSIZEF && mousepos_x <= 6*IMGSIZEF)
else if (mousepos_x >= 5*IMGSIZEF*(scrwidth/640) && mousepos_x <= 6*IMGSIZEF*(scrwidth/640))
which_perk = 4;
else if (mousepos_x >= 6*IMGSIZEF && mousepos_x <= 7*IMGSIZEF)
else if (mousepos_x >= 6*IMGSIZEF*(scrwidth/640) && mousepos_x <= 7*IMGSIZEF*(scrwidth/640))
which_perk = 5;
else
which_perk = 0;
}
if (mousepos_y >= 3*IMGSIZEF && mousepos_y <= 4*IMGSIZEF)
if (mousepos_y >= 3*IMGSIZEF*(scrwidth/640) && mousepos_y <= 4*IMGSIZEF*(scrwidth/640))
{
if (mousepos_x >= 2*IMGSIZEF && mousepos_x <= 3*IMGSIZEF)
if (mousepos_x >= 2*IMGSIZEF*(scrwidth/640) && mousepos_x <= 3*IMGSIZEF*(scrwidth/640))
which_perk = 6;
else if (mousepos_x >= 3*IMGSIZEF && mousepos_x <= 4*IMGSIZEF)
else if (mousepos_x >= 3*IMGSIZEF*(scrwidth/640) && mousepos_x <= 4*IMGSIZEF*(scrwidth/640))
which_perk = 7;
else if (mousepos_x >= 4*IMGSIZEF && mousepos_x <= 5*IMGSIZEF)
else if (mousepos_x >= 4*IMGSIZEF*(scrwidth/640) && mousepos_x <= 5*IMGSIZEF*(scrwidth/640))
which_perk = 8;
else if (mousepos_x >= 5*IMGSIZEF && mousepos_x <= 6*IMGSIZEF)
else if (mousepos_x >= 5*IMGSIZEF*(scrwidth/640) && mousepos_x <= 6*IMGSIZEF*(scrwidth/640))
which_perk = 9;
else if (mousepos_x >= 6*IMGSIZEF && mousepos_x <= 7*IMGSIZEF)
else if (mousepos_x >= 6*IMGSIZEF*(scrwidth/640) && mousepos_x <= 7*IMGSIZEF*(scrwidth/640))
which_perk = 10;
else
which_perk = 0;
}
if (mousepos_y >= 4*IMGSIZEF*(scrwidth/640) && mousepos_y <= 5*IMGSIZEF*(scrwidth/640))
{
if (mousepos_x >= 2*IMGSIZEF*(scrwidth/640) && mousepos_x <= 3*IMGSIZEF*(scrwidth/640))
which_perk = 11;
else
which_perk = 0;
}
drawpic('2 2 0'*IMGSIZEF, "gui/perks/Support Fire.png", '64 64 0', '1 1 1', 1);
drawpic('3 2 0'*IMGSIZEF, "gui/perks/Duck And Cover", '64 64 0', '1 1 1', 1);
drawpic('4 2 0'*IMGSIZEF, "gui/perks/Harmless.png", '64 64 0', '1 1 1', 1);
drawpic('5 2 0'*IMGSIZEF, "gui/perks/Stay Low.png", '64 64 0', '1 1 1', 1);
drawpic('6 2 0'*IMGSIZEF, "gui/perks/Surgical Precision.png", '64 64 0', '1 1 1', 1);
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('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);
drawpic('2 3 0'*IMGSIZEF, "gui/perks/Mutation.png", '64 64 0', '1 1 1', 1);
drawpic('3 3 0'*IMGSIZEF, "gui/perks/Narrow Escape.png", '64 64 0', '1 1 1', 1);
drawpic('4 3 0'*IMGSIZEF, "gui/perks/Schizophrenia.png", '64 64 0', '1 1 1', 1);
drawpic('5 3 0'*IMGSIZEF, "gui/perks/Sleep Tight.png", '64 64 0', '1 1 1', 1);
drawpic('6 3 0'*IMGSIZEF, "gui/perks/Economic Moves.png", '64 64 0', '1 1 1', 1);
drawpic('2 3 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Mutation.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
drawpic('3 3 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Narrow Escape.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
drawpic('4 3 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Schizophrenia.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
drawpic('5 3 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Sleep Tight.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
drawpic('6 3 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Economic Moves.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
drawpic('2 4 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Nuclear Man.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
pn = PerkName(1, which_perk);
pd = GetPerkDesc(which_perk);
drawstring('32 16 0', pn, '8 8 0', '1 1 1', 1);
drawstring('32 32 0', pd, '8 8 0', '1 1 1', 1);
drawstring('32 16 0'*(scrwidth/640), pn, '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('32 32 0'*(scrwidth/640), pd, '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawpic(mousepos, "gui/cursor.jpg", '1 1 0'*CURSORSIZE, '1 1 1', 1);
@ -681,99 +756,101 @@ void() Pipboy_Draw =
if (mousepos_y >= 200 && mousepos_y <= 325)
if (mousepos_y >= 200*(scrwidth/640) && mousepos_y <= 325*(scrwidth/640))
{
if (mousepos_x >= 150 && mousepos_x <= 250)
if (mousepos_x >= 150*(scrwidth/640) && mousepos_x <= 250*(scrwidth/640))
{
drawpic('0 0 0', "gui/pipboy/skills2.jpg", '640 480 0', '1 1 1', 1);
drawpic('0 0 0', "gui/pipboy/skills2.jpg", '640 480 0'*(scrwidth/640), '1 1 1', 1);
selected_class = 1;
}
else if (mousepos_x >= 250 && mousepos_x <= 350)
else if (mousepos_x >= 250*(scrwidth/640) && mousepos_x <= 350*(scrwidth/640))
{
drawpic('0 0 0', "gui/pipboy/skills3.jpg", '640 480 0', '1 1 1', 1);
drawpic('0 0 0', "gui/pipboy/skills3.jpg", '640 480 0'*(scrwidth/640), '1 1 1', 1);
selected_class = 2;
}
else if (mousepos_x >= 350 && mousepos_x <= 450)
else if (mousepos_x >= 350*(scrwidth/640) && mousepos_x <= 450*(scrwidth/640))
{
drawpic('0 0 0', "gui/pipboy/skills4.jpg", '640 480 0', '1 1 1', 1);
drawpic('0 0 0', "gui/pipboy/skills4.jpg", '640 480 0'*(scrwidth/640), '1 1 1', 1);
selected_class = 3;
}
else if (mousepos_x >= 450 && mousepos_x <= 550)
else if (mousepos_x >= 450*(scrwidth/640) && mousepos_x <= 550*(scrwidth/640))
{
drawpic('0 0 0', "gui/pipboy/skills5.jpg", '640 480 0', '1 1 1', 1);
drawpic('0 0 0', "gui/pipboy/skills5.jpg", '640 480 0'*(scrwidth/640), '1 1 1', 1);
selected_class = 4;
}
else
{
drawpic('0 0 0', "gui/pipboy/skills1.jpg", '640 480 0', '1 1 1', 1);
drawpic('0 0 0', "gui/pipboy/skills1.jpg", '640 480 0'*(scrwidth/640), '1 1 1', 1);
selected_class = 0;
}
}
else if (mousepos_y >= 390 && mousepos_y <= 425)
else if (mousepos_y >= 390*(scrwidth/640) && mousepos_y <= 425*(scrwidth/640))
{
drawpic('0 0 0', "gui/pipboy/skills1.jpg", '640 480 0', '1 1 1', 1);
drawpic('0 0 0', "gui/pipboy/skills1.jpg", '640 480 0'*(scrwidth/640), '1 1 1', 1);
if (mousepos_x >= 300 && mousepos_x <= 325)
if (mousepos_x >= 300*(scrwidth/640) && mousepos_x <= 325*(scrwidth/640))
selected_class = 5;
else if (mousepos_x >= 350 && mousepos_x <= 375)
else if (mousepos_x >= 350*(scrwidth/640) && mousepos_x <= 375*(scrwidth/640))
selected_class = 6;
else if (mousepos_x >= 400 && mousepos_x <= 425)
else if (mousepos_x >= 400*(scrwidth/640) && mousepos_x <= 425*(scrwidth/640))
selected_class = 7;
else
selected_class = 0;
}
else
{
drawpic('0 0 0', "gui/pipboy/skills1.jpg", '640 480 0', '1 1 1', 1);
drawpic('0 0 0', "gui/pipboy/skills1.jpg", '640 480 0'*(scrwidth/640), '1 1 1', 1);
selected_class = 0;
}
if (selected_class == 1)
{
drawstring('200 50 0', " combat", '8 8 0', '1 1 1', 1);
drawstring('200 66 0', "place points into this skill for improved", '8 8 0', '1 1 1', 1);
drawstring('200 74 0', "handling of weapons, as well as increased", '8 8 0', '1 1 1', 1);
drawstring('200 82 0', "carry capacity and other aspects of being", '8 8 0', '1 1 1', 1);
drawstring('200 90 0', "trained in combat.", '8 8 0', '1 1 1', 1);
drawstring('200 50 0'*(scrwidth/640), " combat", '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('200 66 0'*(scrwidth/640), "place points into this skill for improved", '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('200 74 0'*(scrwidth/640), "handling of weapons, as well as increased", '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('200 82 0'*(scrwidth/640), "carry capacity and other aspects of being", '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('200 90 0'*(scrwidth/640), "trained in combat.", '8 8 0'*(scrwidth/640), '1 1 1', 1);
}
if (selected_class == 2)
{
drawstring('200 50 0', " doctor", '8 8 0', '1 1 1', 1);
drawstring('200 66 0', "place points into this skill for improved", '8 8 0', '1 1 1', 1);
drawstring('200 74 0', "chem use, which substantially affects the", '8 8 0', '1 1 1', 1);
drawstring('200 82 0', "amount of healing done, as well as all of", '8 8 0', '1 1 1', 1);
drawstring('200 90 0', "the other aspects of first aid.", '8 8 0', '1 1 1', 1);
drawstring('200 50 0'*(scrwidth/640), " doctor", '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('200 66 0'*(scrwidth/640), "place points into this skill for improved", '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('200 74 0'*(scrwidth/640), "chem use, which substantially affects the", '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('200 82 0'*(scrwidth/640), "amount of healing done, as well as all of", '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('200 90 0'*(scrwidth/640), "the other aspects of first aid.", '8 8 0'*(scrwidth/640), '1 1 1', 1);
}
if (selected_class == 3)
{
drawstring('200 50 0', " sneak", '8 8 0', '1 1 1', 1);
drawstring('200 66 0', "place points into this skill to maximize", '8 8 0', '1 1 1', 1);
drawstring('200 74 0', "your ability to remain unseen by enemies.", '8 8 0', '1 1 1', 1);
drawstring('200 82 0', "grants higher sneak ability and how fast", '8 8 0', '1 1 1', 1);
drawstring('200 90 0', "you can pick locks, among other things.", '8 8 0', '1 1 1', 1);
drawstring('200 50 0'*(scrwidth/640), " sneak", '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('200 66 0'*(scrwidth/640), "place points into this skill to maximize", '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('200 74 0'*(scrwidth/640), "your ability to remain unseen by enemies.", '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('200 82 0'*(scrwidth/640), "grants higher sneak ability and how fast", '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('200 90 0'*(scrwidth/640), "you can pick locks, among other things.", '8 8 0'*(scrwidth/640), '1 1 1', 1);
}
if (selected_class == 4)
{
drawstring('200 50 0', " science", '16 16 0', '1 1 1', 1);
drawstring('200 66 0', "place points into this skill to increase", '8 8 0', '1 1 1', 1);
drawstring('200 74 0', "your chances of making useful items from", '8 8 0', '1 1 1', 1);
drawstring('200 82 0', "junk found in the wasteland. use the mix", '8 8 0', '1 1 1', 1);
drawstring('200 90 0', "box found in your inventory screen.", '8 8 0', '1 1 1', 1);
drawstring('200 50 0'*(scrwidth/640), " science", '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('200 66 0'*(scrwidth/640), "place points into this skill to increase", '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('200 74 0'*(scrwidth/640), "your chances of making useful items from", '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('200 82 0'*(scrwidth/640), "junk found in the wasteland. use the mix", '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawstring('200 90 0'*(scrwidth/640), "box found in your inventory screen.", '8 8 0'*(scrwidth/640), '1 1 1', 1);
}
bar = 0;
lvl = getstati(100);
skill = ftos(lvl+1);
while (bar <= lvl)
{
drawpic('210 190 0' - ('0 4 0'*bar), "gui/graph/red.jpg", '16 2 0'*2, '1 1 1', 1);
drawpic('210 190 0'*(scrwidth/640) - ('0 4 0'*bar*(scrwidth/640)), "gui/graph/red.jpg", '16 2 0'*2*(scrwidth/640), '1 1 1', 1);
bar = bar + 1;
}
drawstring('220 190 0' - ('0 4 0'*(lvl+4)), skill, '8 8 0', '1 1 1', 1);
drawstring('220 190 0'*(scrwidth/640) - ('0 4 0'*(lvl+4)*(scrwidth/640)), skill, '8 8 0'*(scrwidth/640), '1 1 1', 1);
bar = 0;
@ -781,30 +858,30 @@ void() Pipboy_Draw =
skill = ftos(lvl+1);
while (bar <= lvl)
{
drawpic('305 190 0' - ('0 4 0'*bar), "gui/graph/green.jpg", '16 2 0'*2, '1 1 1', 1);
drawpic('305 190 0'*(scrwidth/640) - ('0 4 0'*bar*(scrwidth/640)), "gui/graph/green.jpg", '16 2 0'*2*(scrwidth/640), '1 1 1', 1);
bar = bar + 1;
}
drawstring('315 190 0' - ('0 4 0'*(lvl+4)), skill, '8 8 0', '1 1 1', 1);
drawstring('315 190 0'*(scrwidth/640) - ('0 4 0'*(lvl+4)*(scrwidth/640)), skill, '8 8 0'*(scrwidth/640), '1 1 1', 1);
bar = 0;
lvl = getstati(102);
skill = ftos(lvl+1);
while (bar <= lvl)
{
drawpic('395 190 0' - ('0 4 0'*bar), "gui/graph/blue.jpg", '16 2 0'*2, '1 1 1', 1);
drawpic('395 190 0'*(scrwidth/640) - ('0 4 0'*bar*(scrwidth/640)), "gui/graph/blue.jpg", '16 2 0'*2*(scrwidth/640), '1 1 1', 1);
bar = bar + 1;
}
drawstring('405 190 0' - ('0 4 0'*(lvl+4)), skill, '8 8 0', '1 1 1', 1);
drawstring('405 190 0'*(scrwidth/640) - ('0 4 0'*(lvl+4)*(scrwidth/640)), skill, '8 8 0'*(scrwidth/640), '1 1 1', 1);
bar = 0;
lvl = getstati(103);
skill = ftos(lvl+1);
while (bar <= lvl)
{
drawpic('485 190 0' - ('0 4 0'*bar), "gui/graph/yellow.jpg", '16 2 0'*2, '1 1 1', 1);
drawpic('485 190 0'*(scrwidth/640) - ('0 4 0'*bar*(scrwidth/640)), "gui/graph/yellow.jpg", '16 2 0'*2*(scrwidth/640), '1 1 1', 1);
bar = bar + 1;
}
drawstring('495 190 0' - ('0 4 0'*(lvl+4)), skill, '8 8 0', '1 1 1', 1);
drawstring('495 190 0'*(scrwidth/640) - ('0 4 0'*(lvl+4)*(scrwidth/640)), skill, '8 8 0'*(scrwidth/640), '1 1 1', 1);
drawpic(mousepos, "gui/cursor.jpg", '1 1 0'*CURSORSIZE, '1 1 1', 1);
};
@ -823,117 +900,124 @@ void() Invent_Draw =
width = cvar("vid_conwidth");
//how much space have we got for the slider?
drawpic('0 0 0', "gui/pipboy/inventory.jpg", '500 470 0', '1 1 1', 1);
drawpic('0 0 0', "gui/pipboy/inventory.jpg", '500 470 0'*(scrwidth/640), '1 1 1', 1);
local float slotofs;
slotofs = sliderpos*(height - (IMGSIZEF*6)) + (IMGSIZEF*6);
SlotImage('2 1 0'*IMGSIZEF, 5);
SlotImage('2 2 0'*IMGSIZEF, 6);
SlotImage('2 3 0'*IMGSIZEF, 7);
SlotImage('2 4 0'*IMGSIZEF, 8);
SlotImage('2 5 0'*IMGSIZEF, 9);
SlotImage('2 6 0'*IMGSIZEF, 10);
SlotImage('3 1 0'*IMGSIZEF, 11);
SlotImage('3 2 0'*IMGSIZEF, 12);
SlotImage('3 3 0'*IMGSIZEF, 13);
SlotImage('3 4 0'*IMGSIZEF, 14);
SlotImage('3 5 0'*IMGSIZEF, 15);
SlotImage('3 6 0'*IMGSIZEF, 16);
SlotImage('2 1 0'*IMGSIZEF*(scrwidth/640), 5);
SlotImage('2 2 0'*IMGSIZEF*(scrwidth/640), 6);
SlotImage('2 3 0'*IMGSIZEF*(scrwidth/640), 7);
SlotImage('2 4 0'*IMGSIZEF*(scrwidth/640), 8);
SlotImage('2 5 0'*IMGSIZEF*(scrwidth/640), 9);
SlotImage('2 6 0'*IMGSIZEF*(scrwidth/640), 10);
SlotImage('3 1 0'*IMGSIZEF*(scrwidth/640), 11);
SlotImage('3 2 0'*IMGSIZEF*(scrwidth/640), 12);
SlotImage('3 3 0'*IMGSIZEF*(scrwidth/640), 13);
SlotImage('3 4 0'*IMGSIZEF*(scrwidth/640), 14);
SlotImage('3 5 0'*IMGSIZEF*(scrwidth/640), 15);
SlotImage('3 6 0'*IMGSIZEF*(scrwidth/640), 16);
check = getstati(32);
if (check > 0)
SlotImage('6 1 0'*IMGSIZEF - '16 2 0', 1);
SlotImage('6 1 0'*IMGSIZEF*(scrwidth/640) - '16 2 0'*(scrwidth/640), 1);
check = getstati(33);
if (check > 0)
SlotImage('6 2 0'*IMGSIZEF - '16 -5 0', 2);
SlotImage('6 2 0'*IMGSIZEF*(scrwidth/640) - '16 -5 0'*(scrwidth/640), 2);
check = getstati(34);
if (check > 0)
SlotImage('6 3 0'*IMGSIZEF - '16 -13 0', 3);
SlotImage('6 3 0'*IMGSIZEF*(scrwidth/640) - '16 -13 0'*(scrwidth/640), 3);
check = getstati(35);
if (check > 0)
SlotImageSmall('1 12.5 0'*IMGSIZEK*(scrwidth/640), 4);
SlotImageSmall('1 3 0'*IMGSIZEK*(scrwidth/640), 17);
SlotImageSmall('1 4 0'*IMGSIZEK*(scrwidth/640), 18);
SlotImageSmall('1 5 0'*IMGSIZEK*(scrwidth/640), 19);
SlotImageSmall('1 6 0'*IMGSIZEK*(scrwidth/640), 20);
SlotImageSmall('1 7 0'*IMGSIZEK*(scrwidth/640), 21);
SlotImageSmall('1 8 0'*IMGSIZEK*(scrwidth/640), 22);
SlotImageSmall('1 3 0'*IMGSIZEK, 17);
SlotImageSmall('1 4 0'*IMGSIZEK, 18);
SlotImageSmall('1 5 0'*IMGSIZEK, 19);
SlotImageSmall('1 6 0'*IMGSIZEK, 20);
SlotImageSmall('1 7 0'*IMGSIZEK, 21);
SlotImageSmall('1 8 0'*IMGSIZEK, 22);
SlotImageSmall('1 12.5 0'*IMGSIZEK, 4);
check = getstati(97);
if (check > 0)
SlotImageSmall('11 12 0'*IMGSIZEK, 23);
SlotImageSmall('11 12 0'*IMGSIZEK*(scrwidth/640), 23);
check = getstati(98);
if (check > 0)
SlotImageSmall('13 12 0'*IMGSIZEK, 24);
SlotImageSmall('13 12 0'*IMGSIZEK*(scrwidth/640), 24);
if (showcontextmenu && show_inventory)
{
drawfill(contextpos - '8 8 0', '88 24 0'+'96 96 0', '0 0 0', 0.9);
drawfill(contextpos - '8 8 0', '88 24 0'+'32 16 0'*(scrwidth/640), '0 0 0', 1);
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'), "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 + (3 * '0 8 0'), "sell", '8 8 0', '1 1 0' + (op!=3)*'0 0 1', 1);
drawstring(contextpos + (2 * '0 8 0'), "sell", '8 8 0', '1 1 0' + (op!=2)*'0 0 1', 1);
}
else if (showmixmenu && show_inventory)
{
drawfill(contextpos - '8 8 0', '88 24 0'+'96 96 0', '0 0 0', 0.9);
op = floor((mousepos_y - contextpos_y)/8);
drawstring(contextpos + (0 * '0 8 0'), "mix items", '8 8 0', '1 1 0' + (op!=0)*'0 0 1', 1);
}
else
{
if ((mousepos_y >= 12.5*IMGSIZEH && mousepos_y <= 13*IMGSIZEH) && mousepos_x <= IMGSIZEF)
{
slotnum = 4;
}
else if (mousepos_x >= IMGSIZEF)
else if (mousepos_x >= IMGSIZEF*(scrwidth/640) )
{
slotnum = 0;
if (mousepos_x >= 2*IMGSIZEF && mousepos_x <= 3*IMGSIZEF)
if (mousepos_y >= 1*IMGSIZEF && mousepos_y <= 7*IMGSIZEF)
slotnum = floor((mousepos_y)/IMGSIZEF) + 4;
if (mousepos_x >= 2*IMGSIZEF*(scrwidth/640) && mousepos_x <= 3*IMGSIZEF*(scrwidth/640))
if (mousepos_y >= 1*IMGSIZEF*(scrwidth/640) && mousepos_y <= 7*IMGSIZEF*(scrwidth/640))
slotnum = floor((mousepos_y)/(IMGSIZEF*(scrwidth/640))) + 4;
if (mousepos_x >= 3*IMGSIZEF && mousepos_x <= 4*IMGSIZEF)
if (mousepos_y >= 1*IMGSIZEF && mousepos_y <= 7*IMGSIZEF)
slotnum = floor((mousepos_y)/IMGSIZEF) + 10;
if (mousepos_x >= 3*IMGSIZEF*(scrwidth/640) && mousepos_x <= 4*IMGSIZEF*(scrwidth/640))
if (mousepos_y >= 1*IMGSIZEF*(scrwidth/640) && mousepos_y <= 7*IMGSIZEF*(scrwidth/640))
slotnum = floor((mousepos_y)/(IMGSIZEF*(scrwidth/640))) + 10;
if (mousepos_x >= 5.5*IMGSIZEF && mousepos_x <= 6.7*IMGSIZEF)
if (mousepos_y >= 1*IMGSIZEF && mousepos_y <= 2*IMGSIZEF)
if (mousepos_x >= 5.5*IMGSIZEF*(scrwidth/640) && mousepos_x <= 6.7*IMGSIZEF*(scrwidth/640))
if (mousepos_y >= 1*IMGSIZEF*(scrwidth/640) && mousepos_y <= 2*IMGSIZEF*(scrwidth/640))
slotnum = 1;
if (mousepos_x >= 5.5*IMGSIZEF && mousepos_x <= 6.7*IMGSIZEF)
if (mousepos_y >= 2*IMGSIZEF && mousepos_y <= 3*IMGSIZEF)
if (mousepos_x >= 5.5*IMGSIZEF*(scrwidth/640) && mousepos_x <= 6.7*IMGSIZEF*(scrwidth/640))
if (mousepos_y >= 2*IMGSIZEF*(scrwidth/640) && mousepos_y <= 3*IMGSIZEF*(scrwidth/640))
slotnum = 2;
if (mousepos_x >= 5.5*IMGSIZEF && mousepos_x <= 6.7*IMGSIZEF)
if (mousepos_y >= 3*IMGSIZEF && mousepos_y <= 4*IMGSIZEF)
if (mousepos_x >= 5.5*IMGSIZEF*(scrwidth/640) && mousepos_x <= 6.7*IMGSIZEF*(scrwidth/640))
if (mousepos_y >= 3*IMGSIZEF*(scrwidth/640) && mousepos_y <= 4*IMGSIZEF*(scrwidth/640))
slotnum = 3;
if (mousepos_x >= 10.75*IMGSIZEK && mousepos_x <= 12.25*IMGSIZEK)
if (mousepos_y >= 11.75*IMGSIZEK && mousepos_y <= 13.25*IMGSIZEK)
if (mousepos_x >= 10.75*IMGSIZEK*(scrwidth/640) && mousepos_x <= 12.25*IMGSIZEK*(scrwidth/640))
if (mousepos_y >= 11.75*IMGSIZEK*(scrwidth/640) && mousepos_y <= 13.25*IMGSIZEK*(scrwidth/640))
slotnum = 23;
if (mousepos_x >= 12.75*IMGSIZEK && mousepos_x <= 14.25*IMGSIZEK)
if (mousepos_y >= 11.75*IMGSIZEK && mousepos_y <= 13.25*IMGSIZEK)
if (mousepos_x >= 12.75*IMGSIZEK*(scrwidth/640) && mousepos_x <= 14.25*IMGSIZEK*(scrwidth/640))
if (mousepos_y >= 11.75*IMGSIZEK*(scrwidth/640) && mousepos_y <= 13.25*IMGSIZEK*(scrwidth/640))
slotnum = 24;
}
else
{
slotnum = floor((mousepos_y)/IMGSIZEK) + 14;
slotnum = floor((mousepos_y)/(IMGSIZEK*(scrwidth/640))) + 14;
if (slotnum <= 16)
slotnum = 0;
if (slotnum >= 25)
@ -942,7 +1026,7 @@ void() Invent_Draw =
// slotnum = floor((mousepos_y - toppos_y)/8) + 1;
}
drawstring('128 0 0', ftos(slotnum), '8 8 0', '1 1 1', 1);
if (slotnum <= 24)
@ -971,24 +1055,16 @@ if (slotnum <= 24)
}
itname = GetItemName(ToIID(it));
drawstring('32 16 0', itname, '16 16 0', '1 1 1', 1);
drawstring('32 16 0'*(scrwidth/640), itname, '16 16 0'*(scrwidth/640), '1 1 1', 1);
}
else if (slotnum == 98)
{
pn = PerkName(1, getstati(60));
pd = GetPerkDesc(getstati(60));
drawstring('128 32 0', pn, '8 8 0', '1 1 1', 1);
drawstring('128 48 0', pd, '8 8 0', '1 1 1', 1);
}
else if (slotnum == 99)
{
pn = PerkName(2, getstati(59));
pd = GetPerkDesc(getstati(59));
drawstring('128 32 0', pn, '8 8 0', '1 1 1', 1);
drawstring('128 48 0', pd, '8 8 0', '1 1 1', 1);
}
// drawfill(mousepos, '8 8 0', '0 0 0', 0.7);
// drawstring(mousepos, "^", '8 8 0', '1 1 1', 1);
if (mousepos_x > scrwidth*0.95)
mousepos_x = scrwidth*0.95;
if (mousepos_y > scrheight*0.95)
mousepos_y = scrheight*0.95;
if (downslotnum == 0)
drawpic(mousepos, "gui/cursor.jpg", '1 1 0'*CURSORSIZE, '1 1 1', 1);
@ -1103,12 +1179,20 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
else if ((op == 1))
localcmd(strcat("cmd invdrop ", ftos(slotnum), "\n"));
else if (op == 2)
localcmd(strcat("cmd invmix ", ftos(slotnum), "\n"));
else if ((op == 3) && (getstati(108) == 1))
localcmd(strcat("cmd invsell ", ftos(slotnum), "\n"));
showcontextmenu = false;
}
else if (showmixmenu && show_inventory)
{
op = floor((mousepos_y - contextpos_y)/8);
if (op == 0)
localcmd(strcat("cmd invmix ", ftos(slotnum), "\n"));
showmixmenu = false;
}
else if (showcontextmenu && show_trader)
{
op = floor((mousepos_y - contextpos_y)/8);
@ -1134,7 +1218,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
return;
if (which_perk == getstati(59))
return;
if (which_perk >= 1 && which_perk <= 10)
if (which_perk >= 1 && which_perk <= 11)
localcmd(strcat("cmd gainperk ", ftos(which_perk), " ", ftos(perkslot), "\n"));
show_inventory = false;
show_pipboy = false;
@ -1262,7 +1346,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
perkslot = 2;
}
}
else if (slotnum >= 1 && slotnum <= 26)
else if (slotnum >= 1 && slotnum <= 22)
{
//if there's actually an item there
if ((show_inventory) && (getstati(32+slotnum-1) != 0))
@ -1276,10 +1360,20 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
contextpos = mousepos;
}
}
else if (slotnum >= 23 && slotnum <= 24)
{
//if there's actually an item there
if ((show_inventory) && (getstati(97) != 0) && (getstati(98) != 0))
{
showmixmenu = true; //show the context menu
contextpos = mousepos;
}
}
else
{
show_inventory = false; //they clicked outside, fools!
showcontextmenu = false;
showmixmenu = false;
}
}
else

View file

@ -5,7 +5,7 @@ float viewmodelindex;
float scrwidth;
float scrheight;
float scenedraw;
void() DrawScreen =
@ -51,11 +51,12 @@ void() Crosshair_Draw =
void() Position_Draw =
{
float pos, s;
float pos, s, lvl;
string sn;
pos = getstati(54);
s = getstati(58);
lvl = getstati(127);
sn = ftos(s);
if (pos == 0)
@ -70,6 +71,11 @@ void() Position_Draw =
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.20)) +('0 1 0'*(scrheight*0.79)), "gui/hud/sneak.png", '0 0 0'+'72 25 0'*(scrwidth/640), '1 1 1');
//drawstring('0 0 0'+('1 0 0'*(scrwidth*0.20)) +('0 1 0'*(scrheight*0.80)), strcat("%", sn), '8 8 8', '1 1 1', 1);
}
if (lvl >= 200)
{
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.70)) +('0 1 0'*(scrheight*0.80)), "gui/hud/level.png", '0 0 0'+'132 22 0'*(scrwidth/640), '1 1 1');
}
};
void() Chem_Draw =
@ -98,8 +104,8 @@ void() Chem_Draw =
void() Time_Draw =
{
local float xtime, ytime, ztime;
local string qtime, rtime, shadowtime;
local float xtime, ytime, ztime, obj;
local string qtime, rtime, shadowtime, text;
xtime = getstati(104);
ytime = floor(xtime/60);
@ -108,7 +114,22 @@ void() Time_Draw =
rtime = ftos(ztime);
shadowtime = ftos(getstati(104));
drawstring('0 32 0'+('1 0 0'*(scrwidth*0.10))+('0 1 0'*(scrheight*0.90)), strcat("[", qtime, ":", rtime, "]\n"), '8 8 8', '1 1 1', 1);
drawstring('0 0 0'+('1 0 0'*(scrwidth*0.25))+('0 1 0'*(scrheight*0.86)), strcat("[", qtime, ":", rtime, "]\n"), '8 8 8', '1 1 1', 1);
obj = getstati(66);
if (obj == 1)
text = "rescue citizens\n";
if (obj == 2)
text = "capture supplies\n";
if (obj == 3)
text = "assassinate commanders\n";
if (obj == 4)
text = "rescue citizens\n";
drawstring('0 0 0'+('1 0 0'*(scrwidth*0.03))+('0 1 0'*(scrheight*0.86)), text, '8 8 8', '1 1 1', 1);
};
@ -155,23 +176,18 @@ void() Health_Draw =
maxhp = getstati(49);
bar = 0;
top = ceil(150 * (hp/maxhp));
top = ceil(115 * (hp/maxhp));
if (top > 150)
top = 150;
while (bar <= top)
{
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.07)) +('0 1 0'*(scrheight*0.75)) - ('0 1 0'*bar*(scrheight/640)), "gui/graph/green.jpg", '0 0 0'+'12 1 0'*(scrwidth/640), '1 1 1', 1);
if (top > 115)
top = 115;
while (bar < top)
bar = bar + 1;
}
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.07)) +('0 1 0'*(scrheight*0.75)) + ('0 1 0'*(scrheight/640)), "gui/graph/green.jpg", '16 1 0'*(scrheight/640)-'0 1 0'*(scrwidth/640)*bar, '1 1 1', 1);
};
void() Radiation_Draw =
{
local float bar, rad, top;
@ -179,24 +195,23 @@ void() Radiation_Draw =
rad = getstati(106);
bar = 0;
top = ceil(150 * (rad/100));
top = ceil(115 * (rad/100));
if (top > 150)
top = 150;
while (bar <= top)
{
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.02)) +('0 1 0'*(scrheight*0.75)) - ('0 1 0'*bar*(scrheight/640)), "gui/graph/yellow.jpg", '0 0 0'+'12 1 0'*(scrwidth/640), '1 1 1', 1);
if (top > 115)
top = 115;
while (bar < top)
bar = bar + 1;
}
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.02)) +('0 1 0'*(scrheight*0.75)) + ('0 1 0'*(scrheight/640)), "gui/graph/yellow.jpg", '16 1 0'*(scrheight/640)-'0 1 0'*(scrwidth/640)*bar, '1 1 1', 1);
};
void() DoThatViewModelThing =
{
float newframe, newmodel;
@ -241,9 +256,8 @@ void(vector pos, float x) HUD_Image =
local string itname;
if (x <= 16)
it = getstati(31+x);
it = getstati(31+x);
itname = GetItemImage(ToIID(it));
drawpic(pos, strcat("gui/", itname), '48 48 0', '1 1 1', 1);
@ -257,23 +271,17 @@ void(vector pos, float x) HUD_Image =
};
void(vector pos, float slotno) HUD_Weapon_Image =
void(vector pos, float x) HUD_Weapon_Image =
{
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 <= 16)
it = getstati(31+slotno);
it = getstati(31+x);
itname = GetItemImage(ToIID(it));
drawpic(pos, strcat("gui/weapons/", itname), '180 59 0', '1 1 1', 1);
drawpic(pos, strcat("gui/weapons/", itname), '180 59 0'*(scrwidth/640), '1 1 1', 1);
};
@ -295,7 +303,7 @@ void() Ammo_Draw =
top = ceil(35 * (ammo/max));
if (top > 35)
top = 35;
top =35;
while (bar <= top)
{
@ -307,8 +315,7 @@ void() Ammo_Draw =
}
}
if (hand == 2)
else if (hand == 2)
{
weap = ToIID(getstati(33));
ammo = ToStatus(getstati(33));
@ -335,6 +342,79 @@ void() Ammo_Draw =
};
void() HUD_Perks_Draw =
{
local string perki, perk2i;
local float perktime, perktime2, bar, max, top;
perktime = getstati(111);
if (perktime == 0)
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.855)) + ('0 1 0'*(scrheight*0.90)), "gui/graph/green.jpg", '0 0 0'+'4 4 0'*(scrwidth/640), '1 1 1', 1);
perktime2 = getstati(112);
if (perktime2 == 0)
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.855)) + ('0 1 0'*(scrheight*0.96)), "gui/graph/green.jpg", '0 0 0'+'4 4 0'*(scrwidth/640), '1 1 1', 1);
if (getstati(60) > 0)
{
perki = GetPerkImage(getstati(60));
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.865)) +('0 1 0'*(scrheight*0.875)), perki, '28 28 0'*(scrwidth/640), '1 1 1', 1);
}
if (getstati(59) > 0)
{
perk2i = GetPerkImage(getstati(59));
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.865)) +('0 1 0'*(scrheight*0.935)), perk2i, '28 28 0'*(scrwidth/640), '1 1 1', 1);
}
perktime = getstati(111);
if (perktime > 0)
{
max = 2000;
bar = 0;
top = ceil(32 * (perktime/max));
if (top > 32)
top = 32;
while (bar < top)
{
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.865)) +('0 1 0'*(scrheight*0.88)) + ('0 1 0'*bar*(scrheight/640)), "gui/graph/black.jpg", '0 0 0'+'28 1 0'*(scrwidth/640), '1 1 1', 1);
bar = bar + 1;
}
}
perktime = getstati(112);
if (perktime > 0)
{
max = 2000;
bar = 0;
top = ceil(32 * (perktime/max));
if (top > 32)
top = 32;
while (bar < top)
{
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.865)) +('0 1 0'*(scrheight*0.94)) + ('0 1 0'*bar*(scrheight/640)), "gui/graph/black.jpg", '0 0 0'+'28 1 0'*(scrwidth/640), '1 1 1', 1);
bar = bar + 1;
}
}
};
void(float vwidth, float vheight, float do2d) CSQC_UpdateView =
{
float usehud;
@ -343,7 +423,7 @@ void(float vwidth, float vheight, float do2d) CSQC_UpdateView =
scrheight = vheight;
clearscene();
/*
if (0)//!cvar("cg_usehud"))
{
setviewprop(VF_DRAWENGINESBAR, 0);
@ -352,9 +432,9 @@ void(float vwidth, float vheight, float do2d) CSQC_UpdateView =
else
{
setviewprop(VF_DRAWENGINESBAR, 1);
}
}*/
setviewprop(VF_DRAWCROSSHAIR, 1);
setviewprop(VF_DRAWCROSSHAIR, 1);//
//force fullscreen views.
setviewprop(VF_MIN, '0 0 0');
@ -392,6 +472,7 @@ void(float vwidth, float vheight, float do2d) CSQC_UpdateView =
GainPerk_Draw();
else
{
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.06)) +('0 1 0'*(scrheight*0.45)), "gui/hud/health.png", '0 0 0'+'25 155 0'*(scrwidth/640), '1 1 1');
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.01)) +('0 1 0'*(scrheight*0.45)), "gui/hud/radiation.png", '0 0 0'+'25 155 0'*(scrwidth/640), '1 1 1');
drawpic('0 0 0' + ('0 1 0'*(scrheight*0.84)), "gui/hud/hud.png", '0 0 0'+'80 10 0'*(scrwidth/80), '1 1 1');
@ -399,13 +480,27 @@ void(float vwidth, float vheight, float do2d) CSQC_UpdateView =
Health_Draw();
Radiation_Draw();
HUD_Weapon_Image('0 0 0'+('1 0 0'*(scrwidth*0.38)) +('0 1 0'*(scrheight*0.87)), getstati(61));
Ammo_Draw();
if ((getstati(61) == 1) && (getstati(32) > 0))
{
HUD_Weapon_Image('0 0 0'+('1 0 0'*(scrwidth*0.38)) +('0 1 0'*(scrheight*0.87)), getstati(61));
Ammo_Draw();
}
else if ((getstati(61) == 2) && (getstati(33) > 0))
{
HUD_Weapon_Image('0 0 0'+('1 0 0'*(scrwidth*0.38)) +('0 1 0'*(scrheight*0.87)), getstati(61));
Ammo_Draw();
}
SlotImageSmall('0 0 0'+('1 0 0'*(scrwidth*0.72)) +('0 1 0'*(scrheight*0.87)), getstati(5));
SlotImageSmall('0 0 0'+('1 0 0'*(scrwidth*0.79)) +('0 1 0'*(scrheight*0.87)), getstati(6));
if (getstati(36) > 0)
SlotImageSmall('0 0 0'+('1 0 0'*(scrwidth*0.70)) +('0 1 0'*(scrheight*0.90)), 5);
if (getstati(42) > 0)
SlotImageSmall('0 0 0'+('1 0 0'*(scrwidth*0.77)) +('0 1 0'*(scrheight*0.90)), 11);
HUD_Perks_Draw();
Position_Draw();
Chem_Draw();
Time_Draw();
Crosshair_Draw();

View file

@ -1172,83 +1172,83 @@ string(float iid) GetItemName =
return "disruptor";
if (iid == IID_WP_USP)
return "usp (45 acp)";
return "usp";
if (iid == IID_WP_USP_S)
return "usp (silenced)";
return "silenced usp";
if (iid == IID_WP_GLOCK)
return "glock 21 (10mm)";
return "10mm pistol";
if (iid == IID_WP_GLOCK_S)
return "glock 21 (silenced)";
return "silenced 10mm pistol";
if (iid == IID_WP_DEAGLE)
return "desert eagle (.44mag)";
return "desert eagle";
if (iid == IID_WP_DEAGLE_M)
return "desert eagle (silenced)";
return "modified desert eagle";
if (iid == IID_WP_NEEDLER)
return "needler";
return "needler pistol";
if (iid == IID_WP_ALIENBLASTER)
return "alien blaster (energy)";
return "alien blaster";
if (iid == IID_WP_PIPERIFLE)
return "pipe rifle (.44mag)";
return "pipe rifle";
if (iid == IID_WP_PIPERIFLE_S)
return "pipe rifle (silenced)";
return "silenced pipe rifle";
if (iid == IID_WP_PIPERIFLE_R)
return "pipe rifle (rod&spring)";
return "modified pipe rifle";
if (iid == IID_WP_PIPERIFLE_SCOPE)
return "pipe rifle (scope)";
return "scoped pipe rifle";
if (iid == IID_WP_PIPERIFLE_S_R)
return "pipe rifle (silenced, rod&spring)";
return "super piperifle mark i";
if (iid == IID_WP_PIPERIFLE_SCOPE_R)
return "pipe rifle (scope, rod&spring)";
return "super piperifle mark ii";
if (iid == IID_WP_PIPERIFLE_SCOPE_S)
return "pipe rifle (scope, silenced)";
return "super piperifle mark iii";
if (iid == IID_WP_PIPERIFLE_SCOPE_S_R)
return "pipe rifle (scope, silenced, rod&spring)";
return "super piperifle mark iv";
if (iid == IID_WP_WINCHESTER)
return "winchester (12g)";
return "sawed-off shotgun";
if (iid == IID_WP_MOSSBERG)
return "citykiller (12g)";
return "citykiller";
if (iid == IID_WP_JACKHAMMER)
return "jackhammer (12g)";
return "jackhammer";
if (iid == IID_WP_GREASEGUN)
return "grease gun (.45 acp)";
return "grease gun";
if (iid == IID_WP_MP9)
return "mp9 (10mm)";
return "mp9";
if (iid == IID_WP_RANGEMASTER)
return "rangemaster (5.56mm)";
return "rangemaster";
if (iid == IID_WP_RANGEMASTER_SCOPE)
return "rangemaster (x2 SUSAT scope)";
return "scoped rangemaster";
if (iid == IID_WP_AK47)
return "ak-47 (7.62mm warsaw pact)";
return "ak-47";
if (iid == IID_WP_AK112)
return "ak-112 (5mm jhp)";
return "ak-112";
if (iid == IID_WP_AK112_M)
return "light support weapon (5.56mm)";
return "light support weapon";
if (iid == IID_WP_AK74)
return "ak-47 (7.62mm warsaw pact)";
return "ak-47";
if (iid == IID_WP_ACR)
return "bozar (7.62mm)";
return "bozar";
if (iid == IID_WP_DKS1)
return "knight sr-25 widowmaker (7.62mm)";
return "dks-1";
if (iid == IID_WP_DKS1_S)
return "knight sr-25 widowmaker (silenced)";
return "dks-1";
if (iid == IID_WP_MOONLIGHT)
return "moonlight (5.56mm)";
return "moonlight";
if (iid == IID_WP_G11)
return "hk g11 (4mm)";
return "hk g11";
if (iid == IID_WP_GAUSERIFLE)
return "gauss rifle (2mm EC)";
return "gauss rifle";
if (iid == IID_WP_PULSERIFLE)
return "phased plasma rifle (energy)";
return "plasma rifle";
if (iid == IID_WP_TURBOPLASMA)
return "turbo plasma rifle (energy)";
return "turbo plasma rifle";
if (iid == IID_WP_PLASMACARBINE)
return "plasma carbine (energy)";
return "laser pistol";
if (iid == IID_WP_FNFAL)
return "fn fal (7.62mm)";
return "fn fal";
if (iid == IID_WP_ROCKETLAUNCHER)
return "rocket launcher";
if (iid == IID_WP_LASERGATLING)
return "laser minigun (energy)";
return "laser minigun";
if (iid == IID_AM_NEEDLER)
return "needler cartidge";
@ -1279,15 +1279,15 @@ string(float iid) GetItemName =
if (iid == IID_GREN_STUN)
return "stun grenade";
return "stun bomb";
if (iid == IID_GREN_FRAG)
return "nuka grenade";
return "nuka bomb";
if (iid == IID_GREN_EMP)
return "emp grenade";
return "emp bomb";
if (iid == IID_GREN_SMOKE)
return "smoke grenade";
return "smoke bomb";
if (iid == IID_GREN_FLASH)
return "flash grenade";
return "flash bomb";
if (iid == IID_ARM_DESERT)
@ -1435,19 +1435,19 @@ float(float iid) GetBaseValue =
if (iid == IID_WP_PIPERIFLE)
return 15;
if (iid == IID_WP_PIPERIFLE_S)
return 25;
return 250;
if (iid == IID_WP_PIPERIFLE_R)
return 25;
return 250;
if (iid == IID_WP_PIPERIFLE_SCOPE)
return 25;
return 250;
if (iid == IID_WP_PIPERIFLE_S_R)
return 35;
return 350;
if (iid == IID_WP_PIPERIFLE_SCOPE_R)
return 35;
return 350;
if (iid == IID_WP_PIPERIFLE_SCOPE_S)
return 35;
return 350;
if (iid == IID_WP_PIPERIFLE_SCOPE_S_R)
return 50;
return 500;
if (iid == IID_WP_WINCHESTER)
return 50;
if (iid == IID_WP_MOSSBERG)
@ -1502,31 +1502,31 @@ float(float iid) GetBaseValue =
if (iid == IID_AM_NEEDLER)
return 7;
return 35;
if (iid == IID_AM_2MMEC)
return 15;
return 120;
if (iid == IID_AM_10MM)
return 3;
if (iid == IID_AM_556MM)
return 5;
if (iid == IID_AM_5MMHIGHVEL)
return 4;
if (iid == IID_AM_12GAUGESHELLS)
return 4;
if (iid == IID_AM_ENERGYCELL)
return 12;
if (iid == IID_AM_556MM)
return 20;
if (iid == IID_AM_5MMHIGHVEL)
return 16;
if (iid == IID_AM_12GAUGESHELLS)
return 16;
if (iid == IID_AM_ENERGYCELL)
return 48;
if (iid == IID_AM_762MM)
return 8;
return 32;
if (iid == IID_AM_44MAGNUM)
return 6;
return 24;
if (iid == IID_AM_WARSAW)
return 5;
return 20;
if (iid == IID_AM_45ACP)
return 4;
return 16;
if (iid == IID_AM_ROCKET)
return 30;
if (iid == IID_AM_CASELESS)
return 10;
return 40;
if (iid == IID_GREN_STUN)
@ -1550,15 +1550,15 @@ float(float iid) GetBaseValue =
if (iid == IID_ARM_METAL)
return 100;
if (iid == IID_ARM_TESLA)
return 175;
return 125;
if (iid == IID_ARM_COMBAT)
return 300;
return 250;
if (iid == IID_ARM_SEVA)
return 350;
return 275;
if (iid == IID_ARM_FORCE)
return 500;
return 300;
if (iid == IID_ARM_LPOWER)
return 550;
return 450;
if (iid == IID_CHEM_STIMPACK)
@ -1675,15 +1675,15 @@ string(float iid) GetItemDesc =
if (iid == IID_WP_PIPERIFLE_SCOPE)
return "a crude scope has been attached to this pipe rifle";
if (iid == IID_WP_PIPERIFLE_R)
return "a modified pipe rifle with a rod&spring replacement";
return "a modified pipe rifle with a box magazine";
if (iid == IID_WP_PIPERIFLE_S_R)
return "pipe rifle with a silencer and rod&spring replacement";
return "pipe rifle with a silencer and box magazine";
if (iid == IID_WP_PIPERIFLE_SCOPE_R)
return "pipe rifle with a scope and rod&spring replacement";
return "pipe rifle with a scope and box magazine";
if (iid == IID_WP_PIPERIFLE_SCOPE_S)
return "pipe rifle with a scope and silencer";
if (iid == IID_WP_PIPERIFLE_SCOPE_S_R)
return "pipe rifle with a scope, silencer, and rod&spring";
return "the ultimate makeshift rifle!";
if (iid == IID_WP_WINCHESTER)
return "double-barrelled and sawed off";
if (iid == IID_WP_MOSSBERG)
@ -1715,7 +1715,7 @@ string(float iid) GetItemDesc =
if (iid == IID_WP_DKS1)
return "semi-auto sniper rifle";
if (iid == IID_WP_MOONLIGHT)
return "decent rifle with extra utility";
return "great all-around rifle with extra utility";
if (iid == IID_WP_G11)
return "a prototype rifle that uses caseless ammo";
if (iid == IID_WP_GAUSERIFLE)
@ -1733,7 +1733,7 @@ string(float iid) GetItemDesc =
if (iid == IID_WP_LASERGATLING)
return "quite simply, the ultimate in heavy firepower";
if (iid == IID_WP_ACR)
return "fast, powerful, and accurate - a sniper's dream";
return "refinement of the sniper's art";
if (iid == IID_AM_NEEDLER)
@ -1881,249 +1881,234 @@ string(float iid) GetItemDesc =
return strcat("", ftos(iid));
};
string(float iid) GetItemStats =
float(float iid) GetArmorThreshold =
{
if (iid == IID_NONE)
return "";
if (iid == IID_WP_WRENCH)
return "a heavy multi-function wrench";
if (iid == IID_WP_KNIFE)
return "great for stealth attacks";
if (iid == IID_WP_SLEDGE)
return "a futuristic battle axe";
if (iid == IID_WP_SPEAR)
return "a long, sharp polearm";
if (iid == IID_WP_POWERAXE)
return "a futuristic axe of some sort";
if (iid == IID_WP_USP)
return "dmg: 14 rng: 20 ammo: .45 skill: combat";
if (iid == IID_WP_USP_S)
return "dmg: 12 rng: 18 ammo: .45 skill: combat";
if (iid == IID_WP_GLOCK)
return "dmg: 12 rng: 18 ammo: 10mm skill: combat";
if (iid == IID_WP_GLOCK_S)
return "dmg: 10 rng: 16 ammo: 10mm skill: combat";
if (iid == IID_WP_DEAGLE)
return "dmg: 18 rng: 30 ammo: .44 skill: combat";
if (iid == IID_WP_DEAGLE_M)
return "dmg: 18 rng: 30 ammo: .44 skill: combat";
if (iid == IID_WP_NEEDLER)
return "dmg: 16 rng: 20 ammo: nc skill: science";
if (iid == IID_WP_ALIENBLASTER)
return "dmg: 48 rng: 15 ammo: cell skill: science";
if (iid == IID_WP_PIPERIFLE)
return "dmg: 20 rng: 50 ammo: .44 skill: combat";
if (iid == IID_WP_PIPERIFLE_S)
return "dmg: 18 rng: 45 ammo: .44 skill: combat";
if (iid == IID_WP_PIPERIFLE_SCOPE)
return "dmg: 20 rng: 60 ammo: .44 skill: combat";
if (iid == IID_WP_PIPERIFLE_R)
return "dmg: 20 rng: 50 ammo: .44 skill: combat";
if (iid == IID_WP_PIPERIFLE_S_R)
return "dmg: 18 rng: 45 ammo: .44 skill: combat";
if (iid == IID_WP_PIPERIFLE_SCOPE_R)
return "dmg: 20 rng: 60 ammo: .44 skill: combat";
if (iid == IID_WP_PIPERIFLE_SCOPE_S)
return "dmg: 18 rng: 50 ammo: .44 skill: combat";
if (iid == IID_WP_PIPERIFLE_SCOPE_S_R)
return "dmg: 18 rng: 50 ammo: .44 skill: combat";
if (iid == IID_WP_WINCHESTER)
return "dmg: 40 rng: 10 ammo: 12ga skill: combat";
if (iid == IID_WP_MOSSBERG)
return "dmg: 35 rng: 20 ammo: 12ga skill: combat";
if (iid == IID_WP_JACKHAMMER)
return "dmg: 35 rng: 15 ammo: 12ga skill: combat";
if (iid == IID_WP_GREASEGUN)
return "dmg: 14 rng: 15 ammo: .45 skill: combat";
if (iid == IID_WP_GREASEGUN_S)
return "dmg: 12 rng: 10 ammo: .45 skill: combat";
if (iid == IID_WP_MP9)
return "dmg: 12 rng: 15 ammo: 10mm skill: sneak";
if (iid == IID_WP_MP9_S)
return "dmg: 10 rng: 15 ammo: 10mm skill: sneak";
if (iid == IID_WP_RANGEMASTER)
return "dmg: 18 rng: 40 ammo: 5.56 skill: combat";
if (iid == IID_WP_RANGEMASTER_SCOPE)
return "dmg: 18 rng: 50 ammo: 5.56 skill: combat";
if (iid == IID_WP_AK47)
return "an outdated assault rifle with extreme durability";
if (iid == IID_WP_AK112)
return "dmg: 16 rng: 40 ammo: 5mm skill: combat";
if (iid == IID_WP_AK112_M)
return "dmg: 16 rng: 40 ammo: 5mm skill: combat";
if (iid == IID_WP_DKS1)
return "dmg: 40 rng: 80 ammo: 7.62 skill: combat";
if (iid == IID_WP_DKS1_S)
return "dmg: 35 rng: 70 ammo: 7.62 skill: combat";
if (iid == IID_WP_MOONLIGHT)
return "dmg: 16 rng: 40 ammo: 5.56 skill: combat";
if (iid == IID_WP_G11)
return "dmg: 14 rng: 40 ammo: csels skill: combat";
if (iid == IID_WP_GAUSERIFLE)
return "dmg: 30 rng: 90 ammo: 2mmec skill: combat";
if (iid == IID_WP_PULSERIFLE)
return "dmg: 16 rng: 40 ammo: 5mm skill: combat";
if (iid == IID_WP_TURBOPLASMA)
return "dmg: 32 rng: 45 ammo: cell skill: science";
if (iid == IID_WP_PLASMACARBINE)
return "dmg: 28 rng: 30 ammo: cell skill: science";
if (iid == IID_WP_FNFAL)
return "dmg: 32 rng: 60 ammo: 7.62 skill: combat";
if (iid == IID_WP_ROCKETLAUNCHER)
return "dmg: 100 rng: 30 ammo: rkt skill: combat";
if (iid == IID_WP_LASERGATLING)
return "dmg: 24 rng: 60 ammo: cell skill: combat";
if (iid == IID_WP_ACR)
return "dmg: 50 rng: 90 ammo: 7.62 skill: combat";
if (iid == IID_AM_NEEDLER)
return "good armor-peircing properties";
if (iid == IID_AM_2MMEC)
return "virtually ignores armor";
if (iid == IID_AM_10MM)
return "jacketed hollow-points for good damage";
if (iid == IID_AM_556MM)
return "standard rifle round, moderate recoil";
if (iid == IID_AM_5MMHIGHVEL)
return "experimental high-velocity rifle ammo";
if (iid == IID_AM_12GAUGESHELLS)
return "the old standard, has trouble with heavy armor";
if (iid == IID_AM_ENERGYCELL)
return "this energy cell comes from an unknown origin";
if (iid == IID_AM_762MM)
return "good stopping power and armor-piercing performance";
if (iid == IID_AM_44MAGNUM)
return "full metal jacket, hit 'em hard";
if (iid == IID_AM_WARSAW)
return "ancient soviet rifle round, used in the ak47";
if (iid == IID_AM_45ACP)
return "a common pistol round with good stopping power";
if (iid == IID_AM_ROCKET)
return "expensive and extremely lethal";
if (iid == IID_AM_CASELESS)
return "a brick of small-caliber caseless ammo";
if (iid == IID_GREN_FRAG)
return "all-purpose fragmentation grenade";
if (iid == IID_GREN_EMP)
return "useful against robots and cyborgs";
if (iid == IID_GREN_SMOKE)
return "very useful for a quick getaway!";
if (iid == IID_GREN_FLASH)
return "temporarily blinds nearby enemies";
if (iid == IID_GREN_STUN)
return "delivers a forceful shock to nearby enemies";
if (iid == IID_ARM_DESERT)
return "the light armor of a raider; makes a great disguise";
return 2;
if (iid == IID_ARM_LEATHER)
return "lightweight leather armor. provides great mobility.";
return 3;
if (iid == IID_ARM_VANDAL)
return "enhanced leather armor for extra protection.";
return 4;
if (iid == IID_ARM_METAL)
return "gives great protection at a sacrifice to speed.";
return 1;
if (iid == IID_ARM_TESLA)
return "experimental armor with high deflection but low absorb.";
return 5;
if (iid == IID_ARM_COMBAT)
return "this all-purpose armor is designed for combat missions.";
return 7;
if (iid == IID_ARM_SEVA)
return "high-tech suit provides more environmental defense";
return 6;
if (iid == IID_ARM_FORCE)
return "experimental energy-field armor, very low absorb";
return 10;
if (iid == IID_ARM_LPOWER)
return "the heaviest armor with great protection";
return 8;
};
if (iid == IID_CHEM_STIMPACK)
return "advanced healing chem that replaces lost blood";
if (iid == IID_CHEM_MEDICALBAG)
return "first aid kit with many high-tech supplies";
if (iid == IID_CHEM_SUPERSTIM)
return "contains nanobots that heal very fast";
if (iid == IID_CHEM_ADRENALINE)
return "boosts the metabolism, increasing jump and run speed";
if (iid == IID_CHEM_PSYCHO)
return "unknown chemicals, probably of military origin";
if (iid == IID_CHEM_BESERK)
return "unknown chemicals, probably of military origin";
if (iid == IID_CHEM_RADX)
return "powerful anti-radiation pills";
float(float iid) GetArmorAbsorb =
{
if (iid == IID_ARM_DESERT)
return 10;
if (iid == IID_ARM_LEATHER)
return 20;
if (iid == IID_ARM_VANDAL)
return 30;
if (iid == IID_ARM_METAL)
return 50;
if (iid == IID_ARM_TESLA)
return 40;
if (iid == IID_ARM_COMBAT)
return 40;
if (iid == IID_ARM_SEVA)
return 40;
if (iid == IID_ARM_FORCE)
return 10;
if (iid == IID_ARM_LPOWER)
return 50;
};
if (iid == IID_BUILD_MRAMMO)
return "provides extra ammunition";
if (iid == IID_BUILD_SHIELDGEN)
return "protects all nearby allies";
if (iid == IID_BUILD_AUTODOC)
return "the auto-doc will repair injuries";
if (iid == IID_BUILD_ROBOFANG)
return "robofang guardian unit";
if (iid == IID_BUILD_TTURRET)
return "dispatches hostile intruders";
if (iid == IID_BUILD_RTURRET)
return "rocket turret";
if (iid == IID_BUILD_GTURRET)
return "machine-gun turret";
float(float iid) GetWeaponRange =
{
if (iid == IID_NONE)
return 0;
if (iid == IID_EQUIP_MEDIC_BAG)
return "allows more chems to be carried";
if (iid == IID_EQUIP_GOGGLES)
return "protects against visual impairments";
if (iid == IID_EQUIP_SILENCER)
return "attaches to any smallarm";
if (iid == IID_EQUIP_BELTPOUCH)
return "useful for carrying extra grenades";
if (iid == IID_EQUIP_TOOLKIT)
return "for picking all sorts of locks";
if (iid == IID_EQUIP_BACKPACK)
return "this handy bag lets you carry more ammunition";
if (iid == IID_EQUIP_CLIMBINGGEAR)
return "for those hard to reach places";
if (iid == IID_EQUIP_BATTERY)
return "provides prolonged battery life";
if (iid == IID_EQUIP_STEALTHBOY)
return "makes user blurry and hard to see";
if (iid == IID_EQUIP_EXTENDER)
return "gives a weapon slightly longer range and damage";
if (iid == IID_EQUIP_XRAY)
return "allows for enemy detection through walls";
if (iid == IID_WP_KNIFE)
return 5;
if (iid == IID_MISC_NUKACOLA)
return "a bottle of tasty nuka-cola";
if (iid == IID_MISC_JUNK)
return "metallic bits, pipe and other debris";
if (iid == IID_MISC_CHEMICALS)
return "standard household cleaner";
if (iid == IID_MISC_AEROSOL)
return "a half-full aerosol can";
if (iid == IID_MISC_RDXCRYSTAL)
return "a batch of highly unstable explosive crystals";
if (iid == IID_MISC_STEELPIPE)
return "a slightly rusted steel pipe";
if (iid == IID_MISC_DUCKTAPE)
return "ancient, but still highly functional";
if (iid == IID_MISC_LCD)
return "an lcd from a Lameboy DS videogame unit";
if (iid == IID_MISC_CIRCUITBOARD)
return "a corroded circuit board from a remote control";
if (iid == IID_MISC_COPPERWIRE)
return "a small spool of thin copper wire";
if (iid == IID_MISC_HMXCOMPOUND)
return "a small amount of high-grade military explosive";
if (iid == IID_MISC_GUM)
return "trident chewing gum, limited edition watermelon flavor";
if (iid == IID_MISC_XRAYTUBE)
return "??? a strange device ???";
bprint(PRINT_MEDIUM, ftos(iid), " without a desc!\n");
return strcat("", ftos(iid));
if (iid == IID_WP_USP)
return 20;
if (iid == IID_WP_USP_S)
return 15;
if (iid == IID_WP_GLOCK)
return 15;
if (iid == IID_WP_GLOCK_S)
return 10;
if (iid == IID_WP_DEAGLE)
return 25;
if (iid == IID_WP_DEAGLE_M)
return 25;
if (iid == IID_WP_NEEDLER)
return 20;
if (iid == IID_WP_ALIENBLASTER)
return 10;
if (iid == IID_WP_PIPERIFLE)
return 40;
if (iid == IID_WP_PIPERIFLE_S)
return 40;
if (iid == IID_WP_PIPERIFLE_SCOPE)
return 40;
if (iid == IID_WP_PIPERIFLE_R)
return 40;
if (iid == IID_WP_PIPERIFLE_S_R)
return 40;
if (iid == IID_WP_PIPERIFLE_SCOPE_R)
return 40;
if (iid == IID_WP_PIPERIFLE_SCOPE_S)
return 40;
if (iid == IID_WP_PIPERIFLE_SCOPE_S_R)
return 40;
if (iid == IID_WP_WINCHESTER)
return 10;
if (iid == IID_WP_MOSSBERG)
return 10;
if (iid == IID_WP_JACKHAMMER)
return 10;
if (iid == IID_WP_GREASEGUN)
return 20;
if (iid == IID_WP_GREASEGUN_S)
return 20;
if (iid == IID_WP_MP9)
return 15;
if (iid == IID_WP_MP9_S)
return 15;
if (iid == IID_WP_RANGEMASTER)
return 40;
if (iid == IID_WP_RANGEMASTER_SCOPE)
return 50;
if (iid == IID_WP_AK112)
return 40;
if (iid == IID_WP_AK112_M)
return 40;
if (iid == IID_WP_DKS1)
return 60;
if (iid == IID_WP_DKS1_S)
return 60;
if (iid == IID_WP_MOONLIGHT)
return 50;
if (iid == IID_WP_G11)
return 60;
if (iid == IID_WP_GAUSERIFLE)
return 70;
if (iid == IID_WP_PULSERIFLE)
return 50;
if (iid == IID_WP_TURBOPLASMA)
return 40;
if (iid == IID_WP_PLASMACARBINE)
return 40;
if (iid == IID_WP_FNFAL)
return 60;
if (iid == IID_WP_ROCKETLAUNCHER)
return 15;
if (iid == IID_WP_LASERGATLING)
return 35;
if (iid == IID_WP_ACR)
return 90;
return 0;
};
float(float iid) GetWeaponDamage =
{
if (iid == IID_NONE)
return 0;
if (iid == IID_WP_KNIFE)
return 10;
if (iid == IID_WP_USP)
return 14;
if (iid == IID_WP_USP_S)
return 12;
if (iid == IID_WP_GLOCK)
return 12;
if (iid == IID_WP_GLOCK_S)
return 10;
if (iid == IID_WP_DEAGLE)
return 18;
if (iid == IID_WP_DEAGLE_M)
return 18;
if (iid == IID_WP_NEEDLER)
return 16;
if (iid == IID_WP_ALIENBLASTER)
return 20;
if (iid == IID_WP_PIPERIFLE)
return 20;
if (iid == IID_WP_PIPERIFLE_S)
return 20;
if (iid == IID_WP_PIPERIFLE_SCOPE)
return 20;
if (iid == IID_WP_PIPERIFLE_R)
return 20;
if (iid == IID_WP_PIPERIFLE_S_R)
return 20;
if (iid == IID_WP_PIPERIFLE_SCOPE_R)
return 20;
if (iid == IID_WP_PIPERIFLE_SCOPE_S)
return 20;
if (iid == IID_WP_PIPERIFLE_SCOPE_S_R)
return 20;
if (iid == IID_WP_WINCHESTER)
return 35;
if (iid == IID_WP_MOSSBERG)
return 35;
if (iid == IID_WP_JACKHAMMER)
return 35;
if (iid == IID_WP_GREASEGUN)
return 14;
if (iid == IID_WP_GREASEGUN_S)
return 12;
if (iid == IID_WP_MP9)
return 12;
if (iid == IID_WP_MP9_S)
return 10;
if (iid == IID_WP_RANGEMASTER)
return 18;
if (iid == IID_WP_RANGEMASTER_SCOPE)
return 18;
if (iid == IID_WP_AK112)
return 16;
if (iid == IID_WP_AK112_M)
return 16;
if (iid == IID_WP_DKS1)
return 30;
if (iid == IID_WP_DKS1_S)
return 30;
if (iid == IID_WP_MOONLIGHT)
return 16;
if (iid == IID_WP_G11)
return 14;
if (iid == IID_WP_GAUSERIFLE)
return 22;
if (iid == IID_WP_PULSERIFLE)
return 26;
if (iid == IID_WP_TURBOPLASMA)
return 24;
if (iid == IID_WP_PLASMACARBINE)
return 20;
if (iid == IID_WP_FNFAL)
return 20;
if (iid == IID_WP_ROCKETLAUNCHER)
return 75;
if (iid == IID_WP_LASERGATLING)
return 24;
if (iid == IID_WP_ACR)
return 40;
return 0;
};
string(float iid) GetItemImage =
@ -2148,9 +2133,9 @@ string(float iid) GetItemImage =
if (iid == IID_WP_USP_S)
return "usp.jpg";
if (iid == IID_WP_GLOCK)
return "glock.jpg";
return "10mmpistol.jpg";
if (iid == IID_WP_GLOCK_S)
return "glock.jpg";
return "10mmpistol.jpg";
if (iid == IID_WP_DEAGLE)
return "deagle.jpg";
if (iid == IID_WP_DEAGLE_M)
@ -2190,11 +2175,11 @@ string(float iid) GetItemImage =
if (iid == IID_WP_DKS1_S)
return "dks1_s.jpg";
if (iid == IID_WP_MOONLIGHT)
return "moonlight.jpg";
return "XL70E3.jpg";
if (iid == IID_WP_G11)
return "g11.jpg";
if (iid == IID_WP_GAUSERIFLE)
return "grifle.jpg";
return "gauss.jpg";
if (iid == IID_WP_PULSERIFLE)
return "plasma.jpg";
if (iid == IID_WP_TURBOPLASMA)
@ -2591,6 +2576,8 @@ string (float slot, float int) PerkName =
return "Sleep Tight";
if (int == 10)
return "Economic Moves";
if (int == 11)
return "Nuclear Man";
};
string (float slot, float int) PerkNameCentered =
@ -2615,6 +2602,8 @@ string (float slot, float int) PerkNameCentered =
return " Sleep Tight";
if (int == 10)
return " Economic Moves";
if (int == 11)
return " Nuclear Man";
};
@ -2640,6 +2629,8 @@ string(float int) GetPerkImage =
return "gui/perks/Sleep Tight.jpg";
else if (int == 10)
return "gui/perks/Economic Moves.jpg";
else if (int == 11)
return "gui/perks/Nuclear Man.jpg";
else
return "gui/perks/none.jpg";
@ -2651,9 +2642,9 @@ string(float int) GetPerkDesc =
if (int == 1)
return "33% recoil reduction while prone";
else if (int == 2)
return "20% damage resist while taking cover and ducking";
return "Huge dodge chance while taking cover and ducking";
else if (int == 3)
return "enemies tend to ignore you over your friends";
return "Makes enemies attack your friends instead of you";
else if (int == 4)
return "50% damage resist to area attacks while prone";
else if (int == 5)
@ -2668,6 +2659,8 @@ string(float int) GetPerkDesc =
return "Paralyze anything with a sneak attack from a knife";
else if (int == 10)
return "Suffer less time-related penalties for all actions";
else if (int == 11)
return "Eat a small amount of radiation to heal yourself";
else
return "";

View file

@ -370,7 +370,7 @@ void() rad_think =
local entity te;
self.think = rad_think;
self.nextthink = time + 1;
self.nextthink = time + 4;
te = findradius (self.origin, 700);
while (te)

View file

@ -281,7 +281,7 @@ void () hostage_die =
}
hos_deatha1 ();
self.solid = SOLID_NOT;
setsize (self, VEC_ORIGIN, VEC_ORIGIN);
};

View file

@ -112,24 +112,9 @@ local float rnd1, rnd2, rnd3;
if (self.cnt == 20)
remove(self);
rnd1 = self.velocity_x + (-30 + (random() * 20));
rnd2 = self.velocity_y + (-30 + (random() * 20));
rnd3 = self.velocity_z + 30 + random() * 10;
if (random()*100 > 50)
rnd1 = 24;
else
rnd1 = -24;
if (random()*100 > 50)
rnd2 = 24;
else
rnd2 = -24;
if (random()*100 > 50)
rnd3 = -5;
else
rnd3 = 10;
rnd1 = self.velocity_x + (-10 + (random() * 20));
rnd2 = self.velocity_y + (-10 + (random() * 20));
rnd3 = self.velocity_z + 1 + random() * 3;
self.velocity_x = rnd1;
self.velocity_y = rnd2;
@ -204,6 +189,17 @@ void(float slotno) UsePerk =
te = te.chain;
}
}
if ((self.perk1 == 11 && slotno == 1) || (self.perk2 == 11 && 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);
}
};
@ -2112,7 +2108,7 @@ void() ImpulseCommands =
if (self.impulse == 3 && self.currentmenu == "none")
Cmd_InvUse("5");
if (self.impulse == 4 && self.currentmenu == "none")
Cmd_InvUse("6");
Cmd_InvUse("11");
if (self.impulse >= 1 && self.impulse <= 10 && self.currentmenu != "none")
@ -4342,7 +4338,7 @@ void () UseStimpack =
else
{
sound (trace_ent, CHAN_BODY, "items/r_item1.wav", 1, ATTN_NORM);
self.score = self.score + 50;
self.score = self.score + 1;
sprint(trace_ent, PRINT_MEDIUM, self.netname);
sprint(trace_ent, PRINT_MEDIUM, " heals you with a stimpack\n");
sprint(self, PRINT_MEDIUM, "you heal ");
@ -4453,7 +4449,7 @@ void () UseSuperStim =
{
sound (trace_ent, CHAN_BODY, "items/r_item1.wav", 1, ATTN_NORM);
self.score = self.score + 50;
self.score = self.score + 1;
sprint(trace_ent, PRINT_MEDIUM, self.netname);
sprint(trace_ent, PRINT_MEDIUM, " heals you with a superstim!\n");
sprint(self, PRINT_MEDIUM, "you heal ");
@ -4512,6 +4508,7 @@ void () UseMedicalBag =
sound (self, CHAN_BODY, "items/r_item1.wav", 1, ATTN_NORM);
self.health = self.health + 5 + (self.skill_doctor/2);
self.regen = self.regen + 3 + (self.skill_doctor/2);
spawn_healing(self);
}
}
else if (trace_ent.classname == "player")//healing another team-mate
@ -4563,6 +4560,7 @@ void () UseMedicalBag =
self.score = self.score + 1;
trace_ent.health = trace_ent.health + 5 + (self.skill_doctor/2);
trace_ent.regen = trace_ent.regen + 3 + (self.skill_doctor/2);
spawn_healing(trace_ent);
}
}
}

View file

@ -107,6 +107,8 @@ void() SetupStats =
clientstat(108, 2, safezone);
clientstat(109, 2, connected);
clientstat(110, 2, steadyaim);
clientstat(111, 2, perk1timer);
clientstat(112, 2, perk2timer);
clientstat(125, 2, timer);
clientstat(126, 2, popup);
clientstat(127, 2, score);
@ -650,9 +652,9 @@ if (coop == 1) // Players vs Monsters
}
}
else if (musicplay < 50)
else if (musicplay < 20)
musicplay = musicplay + 1;
else if (musicplay >= 100)
else if (musicplay >= 20)
musicplay = 0;
te = find(world, classname, "player");

View file

@ -116,10 +116,7 @@ void() zombie_walk15 =[ $walk15, zombie_walk16 ] {ai_walk(3);};
void() zombie_walk16 =[ $walk16, zombie_walk17 ] {ai_walk(3);};
void() zombie_walk17 =[ $walk17, zombie_walk18 ] {ai_walk(3);};
void() zombie_walk18 =[ $walk18, zombie_walk19 ] {ai_walk(3);};
void() zombie_walk19 =[ $walk19, zombie_walk1 ] {
ai_walk(6);
if (random() < 0.2)
sound (self, CHAN_VOICE, "zombie/z_idle.wav", 1, ATTN_IDLE);};
void() zombie_walk19 =[ $walk19, zombie_walk1 ] {ai_walk(6);};
void() zombie_run1 =[ $run1, zombie_run2 ] {ai_run(4);self.inpain = 0;};
void() zombie_run2 =[ $run2, zombie_run3 ] {ai_run(4);
@ -146,13 +143,7 @@ void() zombie_run14 =[ $run14, zombie_run15 ] {ai_run(4);};
void() zombie_run15 =[ $run15, zombie_run16 ] {ai_run(4);};
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);
if (random() < 0.2)
sound (self, CHAN_VOICE, "zombie/z_idle.wav", 1, ATTN_IDLE);
if (random() > 0.8)
sound (self, CHAN_VOICE, "zombie/z_idle1.wav", 1, ATTN_IDLE);
};
void() zombie_run18 =[ $run18, zombie_run1 ] {ai_run(8);};
/*
=============================================================================
@ -314,7 +305,7 @@ void() zombie_attc12 =[ $attc12, zombie_run1 ] {ai_face();ZombieFireGrenade('-1
void() zombie_claw =
{
local vector delta;
local vector delta, dir;
local float ldmg;
if (!self.enemy)
@ -329,11 +320,22 @@ local float ldmg;
delta = self.enemy.origin - self.origin;
if (vlen(delta) > (80))
if (self.scale == 1.5 && vlen(delta) > (90))
return;
else if (vlen(delta) > (60))
return;
ldmg = 5+random()*15;
if (self.scale == 1.5)
{
ldmg = 10+random()*15;
dir = normalize(self.enemy.origin - self.origin);
self.enemy.radiation = self.enemy.radiation + 50;
self.enemy.velocity = dir * 300;
self.enemy.velocity_z = 300;
self.enemy.avelocity_y = (random()* 300);
}
T_Damage (self.enemy, self, self, ldmg);
};
@ -589,7 +591,7 @@ void () zombie_death =
self.attack = self.attack + 1;
};
void (vector stuff, vector ang) spawn_live_zombie =
void (vector stuff, vector ang, float bodysize) spawn_live_zombie =
{
local entity zombie;
@ -611,6 +613,7 @@ void (vector stuff, vector ang) spawn_live_zombie =
zombie.think = zombie_death;
zombie.th_die = corpse_gib;
zombie.nextthink = time + 0.12;
zombie.scale = bodysize;
};
void() DropBackpack;
@ -619,10 +622,6 @@ void() zombie_die =
{
local float r;
if (random()<0.25)
DropMoney();
if (random()<0.25)
DropMoney();
r = random();
@ -632,8 +631,14 @@ void() zombie_die =
sound (self, CHAN_VOICE, "zombie/z_pain1.wav", 1, ATTN_NORM);
spawn_live_zombie(self.origin, self.angles);
remove(self);
if (self.scale == 1)
{
spawn_live_zombie(self.origin, self.angles, self.scale);
remove(self);
}
else
zdie1();
return;
};
@ -661,7 +666,7 @@ void(entity attacker, float take) zombie_pain =
{
local float r;
if (take < 9)
if (take < 50)
return; // totally ignore
if (self.inpain == 2)
@ -739,7 +744,20 @@ void () spawn_ghoul_copy =
self.think = spawn_ghoul_copy;
self.nextthink = time + 8 + random()*4;
self.nextthink = time + 9 + random()*8;
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;
stuff = self.origin;
@ -748,7 +766,7 @@ void () spawn_ghoul_copy =
loadzombie = 0;
te = findradius (self.origin, 1200);
te = findradius (self.origin, 1500);
while (te)
{
if (te.classname == "player")
@ -758,7 +776,7 @@ void () spawn_ghoul_copy =
}
te = findradius (self.origin, 400);
te = findradius (self.origin, 250);
while (te)
{
if (te.classname == "player")
@ -797,7 +815,7 @@ void () spawn_ghoul_copy =
ze = find(ze, classname, "player");
}
if (zomc > 90*pcount)
if (zomc > 30*pcount)
return;
zombie = spawn ();
@ -808,7 +826,7 @@ void () spawn_ghoul_copy =
setmodel (self, "progs/ghoul.mdl");
setsize (self, '-8 -8 -24', '8 8 24');
self.health = 90;
self.netname = "ghoul";
self.netname = "feral ghoul";
self.max_health = self.health;
self.th_stand = zombie_stand1;
self.th_walk = zombie_walk1;
@ -817,15 +835,19 @@ void () spawn_ghoul_copy =
self.th_die = zombie_die;
self.th_melee = zombie_melee;
self.skin = 0;
self.angles_y = random()*360;
if (random()*100 <= 3)
if (random()*100 <= 8)
{
setsize (self, '-16 -16 -24', '16 16 32');
self.health = 400;
self.netname = "ghoul lord";
setsize (self, '-16 -16 -40 ', '16 16 32');
self.health = 1200;
self.netname = "glowing one";
self.max_health = self.health;
self.scale = 2;
self.scale = 1.5;
self.effects = EF_BLUE;
self.skin = 1;
}
self.origin = stuff + '0 64 0';