git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3421 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
003f374e50
commit
7dfc0e99a4
17 changed files with 304 additions and 239 deletions
|
@ -153,7 +153,9 @@ void() DecodeLevelParms =
|
||||||
|
|
||||||
self.class = 1;
|
self.class = 1;
|
||||||
|
|
||||||
self.current_slot = parm16;
|
if (parm16 > 0)
|
||||||
|
self.current_slot = parm16;
|
||||||
|
|
||||||
self.islot1 = parm17;
|
self.islot1 = parm17;
|
||||||
self.islot2 = parm18;
|
self.islot2 = parm18;
|
||||||
self.islot3 = parm19;
|
self.islot3 = parm19;
|
||||||
|
@ -620,7 +622,7 @@ void() PutClientInServer =
|
||||||
self.takedamage = DAMAGE_AIM;
|
self.takedamage = DAMAGE_AIM;
|
||||||
self.movetype = MOVETYPE_WALK;
|
self.movetype = MOVETYPE_WALK;
|
||||||
self.show_hostile = 0;
|
self.show_hostile = 0;
|
||||||
self.max_health = 100;
|
self.max_health = 100 + self.skill_combat;
|
||||||
self.health = 100;
|
self.health = 100;
|
||||||
self.flags = FL_CLIENT;
|
self.flags = FL_CLIENT;
|
||||||
self.air_finished = time + 12;
|
self.air_finished = time + 12;
|
||||||
|
@ -638,7 +640,7 @@ void() PutClientInServer =
|
||||||
|
|
||||||
|
|
||||||
DecodeLevelParms ();
|
DecodeLevelParms ();
|
||||||
|
/*
|
||||||
if (self.skill_combat == 0 && self.skill_sneak == 0 && self.skill_doctor == 0 && self.skill_science == 0)
|
if (self.skill_combat == 0 && self.skill_sneak == 0 && self.skill_doctor == 0 && self.skill_science == 0)
|
||||||
{
|
{
|
||||||
self.deadflag = DEAD_NO;
|
self.deadflag = DEAD_NO;
|
||||||
|
@ -660,7 +662,7 @@ void() PutClientInServer =
|
||||||
self.active = 1;
|
self.active = 1;
|
||||||
player_stand1 ();
|
player_stand1 ();
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if (self.current_slot == 0)
|
if (self.current_slot == 0)
|
||||||
{
|
{
|
||||||
|
@ -703,7 +705,7 @@ void() PutClientInServer =
|
||||||
self.fixangle = TRUE; // turn this way immediately
|
self.fixangle = TRUE; // turn this way immediately
|
||||||
|
|
||||||
|
|
||||||
self.max_health = 100;
|
self.max_health = 100 + self.skill_combat;
|
||||||
|
|
||||||
self.equipment_slot = 0;
|
self.equipment_slot = 0;
|
||||||
|
|
||||||
|
@ -1312,7 +1314,7 @@ float(entity targ) check_fov_side =
|
||||||
|
|
||||||
void() SneakLevel =
|
void() SneakLevel =
|
||||||
{
|
{
|
||||||
local float sn, st, front, r;
|
local float sn, st, front, r, q;
|
||||||
local entity te;
|
local entity te;
|
||||||
local string report;
|
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%
|
//sneaking along a wall increases chance by 2%
|
||||||
makevectors(self.angles);
|
makevectors(self.angles);
|
||||||
|
@ -1358,16 +1360,9 @@ void() SneakLevel =
|
||||||
if (r > 0 && r <= 600)
|
if (r > 0 && r <= 600)
|
||||||
{
|
{
|
||||||
r = 600 - r;
|
r = 600 - r;
|
||||||
|
q = 3 + (self.skill_sneak/5);
|
||||||
|
|
||||||
|
sn = sn - r/q;
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1431,6 +1426,8 @@ void() ArmorCheck =
|
||||||
if (self.walk == 1)
|
if (self.walk == 1)
|
||||||
self.speedmulti = self.speedmulti * 0.50;
|
self.speedmulti = self.speedmulti * 0.50;
|
||||||
|
|
||||||
|
self.speedmulti = self.speedmulti*(1+(self.skill_sneak*0.01));
|
||||||
|
|
||||||
//Armor
|
//Armor
|
||||||
if (aid == IID_ARM_DESERT)
|
if (aid == IID_ARM_DESERT)
|
||||||
type = 0.10;
|
type = 0.10;
|
||||||
|
@ -1450,8 +1447,6 @@ void() ArmorCheck =
|
||||||
type = 0.15;
|
type = 0.15;
|
||||||
if (aid == IID_ARM_LPOWER)
|
if (aid == IID_ARM_LPOWER)
|
||||||
type = 0.50;
|
type = 0.50;
|
||||||
if (self.class == 3)
|
|
||||||
type += 0.10;
|
|
||||||
if (self.rage == IID_CHEM_PSYCHO)
|
if (self.rage == IID_CHEM_PSYCHO)
|
||||||
type += 0.20;
|
type += 0.20;
|
||||||
|
|
||||||
|
@ -1506,15 +1501,9 @@ void () WeightControl =
|
||||||
wt = wt + GetItemsWeight(self.islot16);
|
wt = wt + GetItemsWeight(self.islot16);
|
||||||
|
|
||||||
self.weight = wt;
|
self.weight = wt;
|
||||||
|
self.max_weight = 30;
|
||||||
|
|
||||||
if (self.class == 1)
|
self.max_weight = self.max_weight + self.skill_combat;
|
||||||
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;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1571,11 +1560,7 @@ void () PositionControl =
|
||||||
if (self.maxspeed < 50)
|
if (self.maxspeed < 50)
|
||||||
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;
|
.float clientcolors;
|
||||||
|
@ -1626,14 +1611,30 @@ void() PlayerPreThink =
|
||||||
DisplayMenu ();
|
DisplayMenu ();
|
||||||
return;
|
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.currentmenu = "gain_skill";
|
||||||
self.missionbrief = 2;
|
self.missionbrief = 2;
|
||||||
DisplayMenu ();
|
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 zoom impulse 60\n");
|
||||||
stuffcmd(self, "alias hostage impulse 65\n");
|
stuffcmd(self, "alias hostage impulse 65\n");
|
||||||
|
|
||||||
stuffcmd(self, "alias stimpack \"cmd invuse superstims+stimpack+bandages\"\n");
|
stuffcmd(self, "alias stimpack impulse 225\n");
|
||||||
stuffcmd(self, "alias bandages \"cmd invuse bandages+superstims+stimpack\"\n");
|
|
||||||
stuffcmd(self, "alias equip \"cmd invuse 4\"\n");
|
stuffcmd(self, "alias equip \"cmd invuse 4\"\n");
|
||||||
stuffcmd(self, "alias q1 \"cmd invuse 5\"\n");
|
stuffcmd(self, "alias q1 \"cmd invuse 5\"\n");
|
||||||
stuffcmd(self, "alias q2 \"cmd invuse 6\"\n");
|
stuffcmd(self, "alias q2 \"cmd invuse 6\"\n");
|
||||||
|
|
|
@ -134,20 +134,17 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
|
||||||
else if (attacker.classname == "player" && total_players == 2)
|
else if (attacker.classname == "player" && total_players == 2)
|
||||||
damage = floor(damage * 0.90);
|
damage = floor(damage * 0.90);
|
||||||
|
|
||||||
if (attacker.classname == "monster" && total_players == 4)
|
if (attacker.classname == "monster")
|
||||||
damage = floor(damage * 1.30);
|
damage = floor(damage * 0.80);
|
||||||
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);
|
|
||||||
|
|
||||||
//getting hurt is slightly painful to the score, play cautiously!
|
//getting hurt is slightly painful to the score, play cautiously!
|
||||||
if (attacker.classname == "monster" && targ.classname == "player")
|
if (attacker.classname == "monster" && targ.classname == "player")
|
||||||
targ.score = targ.score - 6;
|
targ.score = targ.score - 1;
|
||||||
|
|
||||||
//flanking monsters awards points
|
//flanking monsters awards points
|
||||||
if (attacker.classname == "player" && targ.classname == "monster" && targ.enemy != attacker)
|
if (attacker.classname == "player" && targ.classname == "monster" && targ.enemy != attacker)
|
||||||
attacker.score = attacker.score + 5;
|
attacker.score = attacker.score + 1;
|
||||||
|
|
||||||
//aimed shots awards points
|
//aimed shots awards points
|
||||||
if (attacker.classname == "player" && targ.classname == "monster" && attacker.recoil <= 5)
|
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);
|
dot = (vec * v_forward);
|
||||||
|
|
||||||
if (dot > 0.3)
|
if (dot > 0.3)
|
||||||
attacker.score = attacker.score + 5;
|
attacker.score = attacker.score + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//attacking a team-mate is a HUGE penalty
|
//attacking a team-mate is a HUGE penalty
|
||||||
if (attacker.classname == "player" && targ.classname == "player")
|
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");
|
sprint(attacker, 2, "you just shot a teammate! be careful!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
//attacking a hostage is a HUGE penalty
|
//attacking a hostage is a HUGE penalty
|
||||||
if (attacker.classname == "player" && targ.classname == "hostage")
|
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");
|
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);
|
damage = (damage * 3);
|
||||||
|
|
||||||
if (targ.classname == "monster")
|
if (targ.classname == "monster")
|
||||||
attacker.score = attacker.score + 5;
|
attacker.score = attacker.score + 1;
|
||||||
|
|
||||||
helm = targ.armortype;
|
helm = targ.armortype;
|
||||||
if (targ.helmet == 0)
|
if (targ.helmet == 0)
|
||||||
|
@ -559,7 +556,7 @@ take = damage;
|
||||||
while (te)
|
while (te)
|
||||||
{
|
{
|
||||||
if (te.classname == "player")
|
if (te.classname == "player")
|
||||||
te.score = te.score + 10;
|
te.score = te.score + 2;
|
||||||
|
|
||||||
te = te.chain;
|
te = te.chain;
|
||||||
}
|
}
|
||||||
|
@ -655,7 +652,7 @@ void(entity targ, entity inflictor, entity attacker, float damage) J_Damage =
|
||||||
damage = (damage * 3);
|
damage = (damage * 3);
|
||||||
|
|
||||||
if (targ.classname == "monster")
|
if (targ.classname == "monster")
|
||||||
attacker.score = attacker.score + 5;
|
attacker.score = attacker.score + 1;
|
||||||
|
|
||||||
helm = targ.armortype;
|
helm = targ.armortype;
|
||||||
if (targ.helmet == 0)
|
if (targ.helmet == 0)
|
||||||
|
@ -949,7 +946,7 @@ void(entity targ, entity inflictor, entity attacker, float damage) X_Damage =
|
||||||
damage = (damage * 3);
|
damage = (damage * 3);
|
||||||
|
|
||||||
if (targ.classname == "monster")
|
if (targ.classname == "monster")
|
||||||
attacker.score = attacker.score + 5;
|
attacker.score = attacker.score + 1;
|
||||||
|
|
||||||
helm = targ.armortype;
|
helm = targ.armortype;
|
||||||
if (targ.helmet == 0)
|
if (targ.helmet == 0)
|
||||||
|
|
|
@ -4,6 +4,7 @@ float PRINT_MEDIUM = 1;
|
||||||
|
|
||||||
float show_inventory;
|
float show_inventory;
|
||||||
float show_pipboy;
|
float show_pipboy;
|
||||||
|
float show_trader;
|
||||||
|
|
||||||
vector mousepos;
|
vector mousepos;
|
||||||
|
|
||||||
|
@ -34,6 +35,37 @@ float mouseisdown;
|
||||||
#define CURSORSIZE 8
|
#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 =
|
void(vector pos, float slotno) SlotImage =
|
||||||
{
|
{
|
||||||
local float it, mod_s, mod_e;
|
local float it, mod_s, mod_e;
|
||||||
|
@ -71,9 +103,6 @@ void(vector pos, float slotno) SlotImage =
|
||||||
itname = GetItemImage(ToIID(it));
|
itname = GetItemImage(ToIID(it));
|
||||||
drawpic(pos, strcat("gui/", itname), IMGSIZEV, '1 1 1', 1);
|
drawpic(pos, strcat("gui/", itname), IMGSIZEV, '1 1 1', 1);
|
||||||
|
|
||||||
mod_s = getstati(70);
|
|
||||||
mod_e = getstati(71);
|
|
||||||
|
|
||||||
it = ToStatus(it);
|
it = ToStatus(it);
|
||||||
if (it < 1)
|
if (it < 1)
|
||||||
return;
|
return;
|
||||||
|
@ -118,18 +147,6 @@ void(vector pos, float slotno) SlotImageSmall =
|
||||||
itname = GetItemImage(ToIID(it));
|
itname = GetItemImage(ToIID(it));
|
||||||
drawpic(pos, strcat("gui/", itname), IMGSIZEH, '1 1 1', 1);
|
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);
|
it = ToStatus(it);
|
||||||
if (it <= 1)
|
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 =
|
void() Pipboy_Draw =
|
||||||
{
|
{
|
||||||
float width,height,lvl,bar;
|
float width,height,lvl,bar;
|
||||||
|
@ -365,7 +401,7 @@ void() Pipboy_Draw =
|
||||||
|
|
||||||
width = cvar("vid_conwidth");
|
width = cvar("vid_conwidth");
|
||||||
height = cvar("vid_conheight");
|
height = cvar("vid_conheight");
|
||||||
w = '1 1 0'*height;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -429,14 +465,7 @@ void() Invent_Draw =
|
||||||
|
|
||||||
local float slotofs;
|
local float slotofs;
|
||||||
slotofs = sliderpos*(height - (IMGSIZEF*6)) + (IMGSIZEF*6);
|
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 1 0'*IMGSIZEF, 5);
|
||||||
SlotImage('2 2 0'*IMGSIZEF, 6);
|
SlotImage('2 2 0'*IMGSIZEF, 6);
|
||||||
|
@ -467,16 +496,6 @@ void() Invent_Draw =
|
||||||
|
|
||||||
SlotImageSmall('1 12.5 0'*IMGSIZEK, 4);
|
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));
|
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)
|
if (showcontextmenu)
|
||||||
|
@ -513,25 +526,11 @@ void() Invent_Draw =
|
||||||
|
|
||||||
op = floor((mousepos_y - contextpos_y)/8);
|
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 + (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);
|
drawstring(contextpos + (1 * '0 8 0'), "drop", '8 8 0', '1 1 0' + (op!=1)*'0 0 1', 1);
|
||||||
if (getstati(108) == 0)
|
drawstring(contextpos + (2 * '0 8 0'), "mix", '8 8 0', '1 1 0' + (op!=2)*'0 0 1', 1);
|
||||||
drawstring(contextpos + (2 * '0 8 0'), "drop", '8 8 0', '1 1 0' + (op!=2)*'0 0 1', 1);
|
|
||||||
if (getstati(108) == 1)
|
if (getstati(108) == 1)
|
||||||
drawstring(contextpos + (2 * '0 8 0'), "sell", '8 8 0', '1 1 0' + (op!=2)*'0 0 1', 1);
|
drawstring(contextpos + (3 * '0 8 0'), "sell", '8 8 0', '1 1 0' + (op!=3)*'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 + (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
|
else
|
||||||
{
|
{
|
||||||
|
@ -644,6 +643,10 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
{
|
{
|
||||||
show_pipboy = !show_pipboy;
|
show_pipboy = !show_pipboy;
|
||||||
}
|
}
|
||||||
|
if (param1 == 'b' && (getstati(108) == 1))
|
||||||
|
{
|
||||||
|
show_trader = !show_trader;
|
||||||
|
}
|
||||||
else if (!show_inventory)
|
else if (!show_inventory)
|
||||||
return false;
|
return false;
|
||||||
else if (param1 == k_mouse1)
|
else if (param1 == k_mouse1)
|
||||||
|
@ -672,7 +675,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (eventtype == 1 && show_inventory) //key up
|
if (eventtype == 1 && (show_inventory || show_trader || show_pipboy)) //key up
|
||||||
{
|
{
|
||||||
if (param1 == k_mouse1)
|
if (param1 == k_mouse1)
|
||||||
{
|
{
|
||||||
|
@ -682,28 +685,12 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
|
|
||||||
if (op == 0)
|
if (op == 0)
|
||||||
localcmd(strcat("cmd invuse ", ftos(slotnum), "\n"));
|
localcmd(strcat("cmd invuse ", ftos(slotnum), "\n"));
|
||||||
else if (op == 1)
|
else if ((op == 1))
|
||||||
localcmd(strcat("cmd invswap 1 ", ftos(slotnum), "\nimpulse 1\n"));
|
|
||||||
else if ((op == 2) && (getstati(108) == 0))
|
|
||||||
localcmd(strcat("cmd invdrop ", ftos(slotnum), "\n"));
|
localcmd(strcat("cmd invdrop ", ftos(slotnum), "\n"));
|
||||||
else if ((op == 2) && (getstati(108) == 1))
|
else if (op == 2)
|
||||||
localcmd(strcat("cmd invsell ", ftos(slotnum), "\n"));
|
|
||||||
else if (op == 3)
|
|
||||||
localcmd(strcat("cmd invmix ", ftos(slotnum), "\n"));
|
localcmd(strcat("cmd invmix ", ftos(slotnum), "\n"));
|
||||||
else if (op == 4)
|
else if ((op == 3) && (getstati(108) == 1))
|
||||||
localcmd("cmd create flash\n");
|
localcmd(strcat("cmd invsell ", ftos(slotnum), "\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");
|
|
||||||
|
|
||||||
showcontextmenu = false;
|
showcontextmenu = false;
|
||||||
}
|
}
|
||||||
|
@ -744,7 +731,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (eventtype == 2 && show_inventory) //mouse
|
if (eventtype == 2 && (show_inventory || show_trader || show_pipboy)) //mouse
|
||||||
{
|
{
|
||||||
mousepos_x += param1;
|
mousepos_x += param1;
|
||||||
mousepos_y += param2;
|
mousepos_y += param2;
|
||||||
|
|
|
@ -442,6 +442,8 @@ void(float do2d) CSQC_UpdateView =
|
||||||
DrawScreen();
|
DrawScreen();
|
||||||
else if (getstati(109) == 0)
|
else if (getstati(109) == 0)
|
||||||
DrawScreen();
|
DrawScreen();
|
||||||
|
else if (show_trader)
|
||||||
|
Trader_Draw();
|
||||||
else if (show_inventory)
|
else if (show_inventory)
|
||||||
Invent_Draw();
|
Invent_Draw();
|
||||||
else if (show_pipboy)
|
else if (show_pipboy)
|
||||||
|
|
|
@ -343,6 +343,11 @@ void () woof_pain =
|
||||||
{
|
{
|
||||||
if (self.rtime > 0)
|
if (self.rtime > 0)
|
||||||
{
|
{
|
||||||
|
if (random()*100<10)
|
||||||
|
{
|
||||||
|
remove(self);
|
||||||
|
return;
|
||||||
|
}
|
||||||
self.health = 180;
|
self.health = 180;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,12 @@ void () door_go_up;
|
||||||
|
|
||||||
void () door_blocked =
|
void () door_blocked =
|
||||||
{
|
{
|
||||||
|
if (other.classname == "treasure_chest")
|
||||||
|
{
|
||||||
|
remove(other);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
T_Damage (other, self, self, self.dmg);
|
T_Damage (other, self, self, self.dmg);
|
||||||
if ((self.wait >= MULTICAST_ALL))
|
if ((self.wait >= MULTICAST_ALL))
|
||||||
{
|
{
|
||||||
|
@ -159,7 +165,8 @@ void () door_killed =
|
||||||
|
|
||||||
void () OpenDoorBeep =
|
void () OpenDoorBeep =
|
||||||
{
|
{
|
||||||
local float r;
|
local float r,x;
|
||||||
|
|
||||||
|
|
||||||
r = range (self.enemy);
|
r = range (self.enemy);
|
||||||
|
|
||||||
|
@ -175,9 +182,14 @@ void () OpenDoorBeep =
|
||||||
else
|
else
|
||||||
sound (self, CHAN_BODY, "items/lockpick2.wav", 1, ATTN_NORM);
|
sound (self, CHAN_BODY, "items/lockpick2.wav", 1, ATTN_NORM);
|
||||||
|
|
||||||
|
|
||||||
|
x = (2.51 - (2.5*(self.enemy.skill_sneak/30)));
|
||||||
|
|
||||||
|
|
||||||
self.think = OpenDoorBeep;
|
self.think = OpenDoorBeep;
|
||||||
self.nextthink = time + 0.5;
|
self.nextthink = time + x;
|
||||||
if (ToIID(other.islot4) == IID_EQUIP_TOOLKIT)
|
|
||||||
|
if (ToIID(self.enemy.islot4) == IID_EQUIP_TOOLKIT)
|
||||||
self.owner.owner.rtime = self.owner.owner.rtime + 3;
|
self.owner.owner.rtime = self.owner.owner.rtime + 3;
|
||||||
else
|
else
|
||||||
self.owner.owner.rtime = self.owner.owner.rtime + 1;
|
self.owner.owner.rtime = self.owner.owner.rtime + 1;
|
||||||
|
@ -256,32 +268,13 @@ void () door_touch =
|
||||||
}
|
}
|
||||||
else if (self.owner.items == IT_KEY2)
|
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");
|
sprint(other, 2, "picking...\n");
|
||||||
other.attack_finished = time + 7;
|
other.attack_finished = time + 7;
|
||||||
other.rtime = time + 7.5;
|
other.rtime = time + 7.5;
|
||||||
SpawnOpenDoor(self, other);
|
SpawnOpenDoor(self, other);
|
||||||
return;
|
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)
|
if (self.owner.items == IT_KEY1)
|
||||||
sound (self, CHAN_VOICE, self.noise3, 1, ATTN_NORM);
|
sound (self, CHAN_VOICE, self.noise3, 1, ATTN_NORM);
|
||||||
|
|
|
@ -285,7 +285,7 @@ void (vector jojo) spawn_civilian =
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
te = findradius (self.origin, 30);
|
te = findradius (self.origin, 40);
|
||||||
while (te)
|
while (te)
|
||||||
{
|
{
|
||||||
if (te.classname == "player" || te.classname == "monster" && te.health > 0)
|
if (te.classname == "player" || te.classname == "monster" && te.health > 0)
|
||||||
|
|
|
@ -184,6 +184,18 @@ float(float slotno, float iid) FitsInSlot;
|
||||||
.float xslot6;
|
.float xslot6;
|
||||||
.float xslot7;
|
.float xslot7;
|
||||||
.float xslot8;
|
.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
|
#define MAXSLOTS 24
|
||||||
|
|
||||||
|
@ -604,7 +616,7 @@ slot_t(float slot) SlotField =
|
||||||
return islot24;
|
return islot24;
|
||||||
|
|
||||||
|
|
||||||
bprint(PRINT_MEDIUM, "ERROR: Invalid slot number (", ftos(slot), ")\n");
|
//bprint(PRINT_MEDIUM, "ERROR: Invalid slot number (", ftos(slot), ")\n");
|
||||||
return islot1;
|
return islot1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -647,11 +659,11 @@ string(float iid) GetItemVModel =
|
||||||
if (iid == IID_WP_JACKHAMMER)
|
if (iid == IID_WP_JACKHAMMER)
|
||||||
return "progs/v_jackhammer.mdl";
|
return "progs/v_jackhammer.mdl";
|
||||||
if (iid == IID_WP_MP9)
|
if (iid == IID_WP_MP9)
|
||||||
return "progs/v_ump.mdl";
|
return "progs/v_mp9.mdl";
|
||||||
if (iid == IID_WP_MP7)
|
if (iid == IID_WP_MP7)
|
||||||
return "progs/v_smg.mdl";
|
return "progs/v_smg.mdl";
|
||||||
if (iid == IID_WP_MP9_S)
|
if (iid == IID_WP_MP9_S)
|
||||||
return "progs/v_ump.mdl";
|
return "progs/v_mp9.mdl";
|
||||||
if (iid == IID_WP_MP7_S)
|
if (iid == IID_WP_MP7_S)
|
||||||
return "progs/v_smg.mdl";
|
return "progs/v_smg.mdl";
|
||||||
if (iid == IID_WP_RANGEMASTER)
|
if (iid == IID_WP_RANGEMASTER)
|
||||||
|
|
|
@ -207,7 +207,7 @@ void() treasure_touch =
|
||||||
{
|
{
|
||||||
sound (self, CHAN_BODY, "items/locked.wav", 1, ATTN_NORM);
|
sound (self, CHAN_BODY, "items/locked.wav", 1, ATTN_NORM);
|
||||||
sprint(other, 2, "this metal box is locked.\n");
|
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, "you may attempt to pick this\n");
|
||||||
sprint(other, 2, "by pressing your 'action' key\n");
|
sprint(other, 2, "by pressing your 'action' key\n");
|
||||||
|
@ -539,7 +539,7 @@ void () OpenChestBeep =
|
||||||
|
|
||||||
|
|
||||||
self.think = 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.chest = self;
|
||||||
self.enemy.currentmenu = "menu_lockpick";
|
self.enemy.currentmenu = "menu_lockpick";
|
||||||
|
|
||||||
|
@ -929,6 +929,7 @@ void() buyzone1 =
|
||||||
setsize (self, '-16 -16 -24', '16 16 32');
|
setsize (self, '-16 -16 -24', '16 16 32');
|
||||||
setorigin(self, self.origin + '0 0 24');
|
setorigin(self, self.origin + '0 0 24');
|
||||||
self.classname = "merchant";
|
self.classname = "merchant";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void() buyzone2 =
|
void() buyzone2 =
|
||||||
|
|
|
@ -48,7 +48,7 @@ $frame deathb9 deathb10 deathb11
|
||||||
void() go_invisible =
|
void() go_invisible =
|
||||||
{
|
{
|
||||||
setmodel (self, "");
|
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 =
|
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_stand8 =[ $stand8, knight_stand9 ] {ai_stand();};
|
||||||
void() knight_stand9 =[ $stand9, knight_stand1 ] {ai_stand();};
|
void() knight_stand9 =[ $stand9, knight_stand1 ] {ai_stand();};
|
||||||
|
|
||||||
void() knight_walk1 =[ $walk1, knight_walk2 ] {
|
void() knight_walk1 =[ $walk1, knight_walk2 ] {ai_walk(3);};
|
||||||
if (random() < 0.2)
|
|
||||||
sound (self, CHAN_VOICE, "knight/idle.wav", 1, ATTN_IDLE);
|
|
||||||
ai_walk(3);};
|
|
||||||
void() knight_walk2 =[ $walk2, knight_walk3 ] {ai_walk(2);};
|
void() knight_walk2 =[ $walk2, knight_walk3 ] {ai_walk(2);};
|
||||||
void() knight_walk3 =[ $walk3, knight_walk4 ] {ai_walk(3);};
|
void() knight_walk3 =[ $walk3, knight_walk4 ] {ai_walk(3);};
|
||||||
void() knight_walk4 =[ $walk4, knight_walk5 ] {ai_walk(4);};
|
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 ] {
|
void() knight_run1 =[ $runb1, knight_run2 ] {
|
||||||
if ((random() < 0.6) && self.model != "")
|
if ((random() < 0.6) && self.model != "")
|
||||||
go_invisible();
|
go_invisible();
|
||||||
else if (random() < 0.2)
|
|
||||||
sound (self, CHAN_VOICE, "knight/idle.wav", 1, ATTN_IDLE);
|
|
||||||
ai_run(21);};
|
ai_run(21);};
|
||||||
void() knight_run2 =[ $runb2, knight_run3 ] {ai_run(25);};
|
void() knight_run2 =[ $runb2, knight_run3 ] {ai_run(25);};
|
||||||
void() knight_run3 =[ $runb3, knight_run4 ] {ai_run(18);};
|
void() knight_run3 =[ $runb3, knight_run4 ] {ai_run(18);};
|
||||||
|
@ -130,6 +125,16 @@ if (self.takedamage == DAMAGE_NO)
|
||||||
return;
|
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);
|
sound (self, CHAN_WEAPON, "knight/sword1.wav", 1, ATTN_NORM);
|
||||||
ai_charge(0);
|
ai_charge(0);
|
||||||
go_visible();
|
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_die2 =[ $death2, knight_die3 ] {};
|
||||||
void() knight_die3 =[ $death3, knight_die4 ]
|
void() knight_die3 =[ $death3, knight_die4 ]
|
||||||
{self.solid = SOLID_NOT;};
|
{self.solid = SOLID_NOT;};
|
||||||
|
@ -321,7 +327,7 @@ void() monster_knight =
|
||||||
|
|
||||||
setsize (self, '-16 -16 -24', '16 16 40');
|
setsize (self, '-16 -16 -24', '16 16 40');
|
||||||
self.health = 75;
|
self.health = 75;
|
||||||
self.islot3 = SlotVal(IID_ARM_METAL, 1);
|
self.islot3 = SlotVal(IID_ARM_METAL, 1);
|
||||||
self.armornoise = "weapons/ric1.wav";
|
self.armornoise = "weapons/ric1.wav";
|
||||||
self.th_stand = knight_stand1;
|
self.th_stand = knight_stand1;
|
||||||
self.th_walk = knight_walk1;
|
self.th_walk = knight_walk1;
|
||||||
|
|
|
@ -923,6 +923,9 @@ void() brotherhood_merchant =
|
||||||
self.classname = "merchant";
|
self.classname = "merchant";
|
||||||
self.think = shop_face;
|
self.think = shop_face;
|
||||||
self.nextthink = time + 0.5;
|
self.nextthink = time + 0.5;
|
||||||
|
|
||||||
|
self.xslot1 = 412;
|
||||||
|
self.xslot2 = 413;
|
||||||
};
|
};
|
||||||
|
|
||||||
void() brotherhood_sergeant =
|
void() brotherhood_sergeant =
|
||||||
|
|
|
@ -949,8 +949,9 @@ void() W_PlayerMenu =
|
||||||
sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM);
|
sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM);
|
||||||
centerprint(self, "\n");
|
centerprint(self, "\n");
|
||||||
self.currentmenu = "none";
|
self.currentmenu = "none";
|
||||||
//DisplayMenu();
|
PutClientInServer();
|
||||||
self.impulse = 1;
|
self.impulse = 0;
|
||||||
|
self.current_slot = 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (self.impulse == 1 && coop == 0)
|
else if (self.impulse == 1 && coop == 0)
|
||||||
|
|
|
@ -97,6 +97,13 @@ void() plat_outside_touch =
|
||||||
if (other.classname != "player")
|
if (other.classname != "player")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
if (other.classname == "treasure_chest")
|
||||||
|
{
|
||||||
|
remove(other);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (other.health <= 0)
|
if (other.health <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -118,6 +125,12 @@ void() plat_crush =
|
||||||
{
|
{
|
||||||
//dprint ("plat_crush\n");
|
//dprint ("plat_crush\n");
|
||||||
|
|
||||||
|
if (other.classname == "treasure_chest")
|
||||||
|
{
|
||||||
|
remove(other);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
other.deathtype = "squish";
|
other.deathtype = "squish";
|
||||||
T_Damage (other, self, self, 1);
|
T_Damage (other, self, self, 1);
|
||||||
|
|
||||||
|
@ -225,6 +238,13 @@ void() func_train_find;
|
||||||
|
|
||||||
void() train_blocked =
|
void() train_blocked =
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (other.classname == "treasure_chest")
|
||||||
|
{
|
||||||
|
remove(other);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (time < self.attack_finished)
|
if (time < self.attack_finished)
|
||||||
return;
|
return;
|
||||||
self.attack_finished = time + 0.5;
|
self.attack_finished = time + 0.5;
|
||||||
|
|
|
@ -1378,6 +1378,11 @@ void () grunt_pain =
|
||||||
|
|
||||||
if (self.rtime > 0)
|
if (self.rtime > 0)
|
||||||
{
|
{
|
||||||
|
if (random()*100<10)
|
||||||
|
{
|
||||||
|
remove(self);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (random()*100<50)
|
if (random()*100<50)
|
||||||
sound (self, CHAN_VOICE, "player/headshot.wav", 0.75, ATTN_NORM);
|
sound (self, CHAN_VOICE, "player/headshot.wav", 0.75, ATTN_NORM);
|
||||||
else
|
else
|
||||||
|
|
|
@ -199,14 +199,15 @@ void(float damage, float dist, float rate) FireMelee =
|
||||||
|
|
||||||
if (dot < 0.5 && trace_ent.takedamage)
|
if (dot < 0.5 && trace_ent.takedamage)
|
||||||
{
|
{
|
||||||
tdam = self.sneak*random()*3;
|
tdam = 10 + (15*self.skill_sneak);
|
||||||
|
|
||||||
if (getperk(7))
|
if (getperk(7))
|
||||||
tdam = self.sneak*random()*6;
|
tdam = tdam * 2;
|
||||||
|
|
||||||
if (self.steadyaim == 0)
|
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);
|
SpawnBlood (org, 1);
|
||||||
else
|
else
|
||||||
SpawnNonBlood (org, 1);
|
SpawnNonBlood (org, 1);
|
||||||
|
@ -239,7 +240,7 @@ void(float damage, float dist, float rate) FireMelee =
|
||||||
bprint(2, " assassinates ");
|
bprint(2, " assassinates ");
|
||||||
bprint(2, trace_ent.netname);
|
bprint(2, trace_ent.netname);
|
||||||
bprint(2, "!\n");
|
bprint(2, "!\n");
|
||||||
self.score = self.score + 25;
|
self.score = self.score + 5;
|
||||||
|
|
||||||
if (random()*4<2)
|
if (random()*4<2)
|
||||||
sound (trace_ent, CHAN_WEAPON, "player/headshot.wav", 0.25, ATTN_IDLE);
|
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)
|
else if (weap == IID_WP_DKS1_S)
|
||||||
FireAssaultRifle(35, 3, "weapons/moonlight1.wav", 5000, 0.25);
|
FireAssaultRifle(35, 3, "weapons/moonlight1.wav", 5000, 0.25);
|
||||||
else if (weap == IID_WP_WINCHESTER)
|
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)
|
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)
|
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)
|
else if (weap == IID_WP_MP9)
|
||||||
FireSMG(14, 0, "weapons/mp7.wav", 1500, 0.10);
|
FireSMG(14, 0, "weapons/mp7.wav", 1500, 0.10);
|
||||||
else if (weap == IID_WP_MP7)
|
else if (weap == IID_WP_MP7)
|
||||||
|
@ -1758,7 +1759,7 @@ void() CheatCommand =
|
||||||
{
|
{
|
||||||
local float x;
|
local float x;
|
||||||
local string y;
|
local string y;
|
||||||
|
/*
|
||||||
x = self.waterlevel;
|
x = self.waterlevel;
|
||||||
y = ftos(x);
|
y = ftos(x);
|
||||||
|
|
||||||
|
@ -1766,8 +1767,8 @@ void() CheatCommand =
|
||||||
sprint(self, 2, y);
|
sprint(self, 2, y);
|
||||||
sprint(self, 2, "\n");
|
sprint(self, 2, "\n");
|
||||||
self.ammo_shells = 900;
|
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, trace_ent.netname);
|
||||||
sprint(self, PRINT_MEDIUM, " had no stims!\n");
|
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, trace_ent.netname);
|
||||||
sprint(self, PRINT_MEDIUM, " had a stim. using it to heal.\n");
|
sprint(self, PRINT_MEDIUM, " had a stim. using it to heal.\n");
|
||||||
DecreaseDestroySlotOther(trace_ent, x);//take away a stimpack
|
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 =
|
void () Special =
|
||||||
{
|
{
|
||||||
if (self.class == 1)
|
|
||||||
UseMedicalBag();
|
|
||||||
else
|
|
||||||
Sneak();
|
Sneak();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4946,7 +4959,7 @@ void () ExitScreen =
|
||||||
sprint(self, 2, "lock is jammed.\n");
|
sprint(self, 2, "lock is jammed.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (self.class != 2 && self.class != 4)
|
if (self.skill_sneak == 0)
|
||||||
{
|
{
|
||||||
sound (self, CHAN_BODY, "items/locked.wav", 1, ATTN_NORM);
|
sound (self, CHAN_BODY, "items/locked.wav", 1, ATTN_NORM);
|
||||||
sprint(self, 2, "locked!\n");
|
sprint(self, 2, "locked!\n");
|
||||||
|
@ -4970,7 +4983,8 @@ void () ExitScreen =
|
||||||
if (self.currentmenu != "none")
|
if (self.currentmenu != "none")
|
||||||
return;
|
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;
|
rescue = rescue + 1;
|
||||||
//remove(trace_ent);
|
//remove(trace_ent);
|
||||||
spawn_excla(trace_ent, 3000);
|
spawn_excla(trace_ent, 3000);
|
||||||
|
@ -5628,6 +5642,26 @@ void () shop_face =
|
||||||
{
|
{
|
||||||
self.enemy = te;
|
self.enemy = te;
|
||||||
te.safezone = 1;
|
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;
|
te = te.chain;
|
||||||
}
|
}
|
||||||
|
@ -5734,20 +5768,10 @@ void () CharacterSheet =
|
||||||
|
|
||||||
sprint (self, PRINT_HIGH, "<EFBFBD>Score ‘ ");
|
sprint (self, PRINT_HIGH, "<EFBFBD>Score ‘ ");
|
||||||
r1 = (self.score);
|
r1 = (self.score);
|
||||||
r2 = (self.kills);
|
|
||||||
if (r1 == 0)
|
|
||||||
r1 = 1;
|
|
||||||
|
|
||||||
ratio = (r2 / r1);
|
|
||||||
x = ftos (r1);
|
x = ftos (r1);
|
||||||
sprint (self, 2, x);
|
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<EFBFBD>Speed ‘ ");
|
sprint (self, PRINT_HIGH, "\n<EFBFBD>Speed ‘ ");
|
||||||
x = ftos (self.maxspeed);
|
x = ftos (self.maxspeed);
|
||||||
sprint (self, 2, x);
|
sprint (self, 2, x);
|
||||||
|
|
|
@ -68,12 +68,26 @@ void() SetupStats =
|
||||||
clientstat(67, 2, map_ent1);
|
clientstat(67, 2, map_ent1);
|
||||||
clientstat(68, 2, map_ent2);
|
clientstat(68, 2, map_ent2);
|
||||||
clientstat(69, 2, map_ent3);
|
clientstat(69, 2, map_ent3);
|
||||||
clientstat(70, 2, silencer);
|
clientstat(71, 2, xslot1);
|
||||||
clientstat(71, 2, extender);
|
clientstat(72, 2, xslot2);
|
||||||
clientstat(81, 2, skill_combat);
|
clientstat(73, 2, xslot3);
|
||||||
clientstat(82, 2, skill_doctor);
|
clientstat(74, 2, xslot4);
|
||||||
clientstat(83, 2, skill_sneak);
|
clientstat(75, 2, xslot5);
|
||||||
clientstat(84, 2, skill_science);
|
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(91, 2, islot17);
|
||||||
clientstat(92, 2, islot18);
|
clientstat(92, 2, islot18);
|
||||||
clientstat(93, 2, islot19);
|
clientstat(93, 2, islot19);
|
||||||
|
@ -83,14 +97,11 @@ void() SetupStats =
|
||||||
clientstat(97, 2, islot23);
|
clientstat(97, 2, islot23);
|
||||||
clientstat(98, 2, islot24);
|
clientstat(98, 2, islot24);
|
||||||
clientstat(99, 2, recoil);
|
clientstat(99, 2, recoil);
|
||||||
clientstat(100, 2, xslot1);
|
clientstat(81, 2, skill_combat);
|
||||||
clientstat(101, 2, xslot2);
|
clientstat(82, 2, skill_doctor);
|
||||||
clientstat(102, 2, xslot3);
|
clientstat(83, 2, skill_sneak);
|
||||||
clientstat(103, 2, xslot4);
|
clientstat(84, 2, skill_science);
|
||||||
clientstat(104, 2, xslot5);
|
|
||||||
clientstat(105, 2, xslot6);
|
|
||||||
clientstat(106, 2, xslot7);
|
|
||||||
clientstat(107, 2, xslot8);
|
|
||||||
clientstat(108, 2, safezone);
|
clientstat(108, 2, safezone);
|
||||||
clientstat(109, 2, connected);
|
clientstat(109, 2, connected);
|
||||||
clientstat(110, 2, steadyaim);
|
clientstat(110, 2, steadyaim);
|
||||||
|
@ -669,15 +680,12 @@ if (coop == 1) // Players vs Monsters
|
||||||
te = find(te, classname, "player");
|
te = find(te, classname, "player");
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (pcount > 0)
|
|
||||||
// self.timer = self.timer + 0.5;
|
|
||||||
|
|
||||||
if (pcount == 0 && self.timer > 5)
|
if (pcount == 0 && self.timer > 5)
|
||||||
localcmd("restart\n");
|
localcmd("restart\n");
|
||||||
|
|
||||||
if (world.map_obj == OBJ_HOSTAGE)
|
if (world.map_obj == OBJ_HOSTAGE)
|
||||||
{
|
{
|
||||||
time_left = time_left - 1;
|
//time_left = time_left - 1;
|
||||||
|
|
||||||
te = find(world, classname, "rhostage");
|
te = find(world, classname, "rhostage");
|
||||||
while (te)
|
while (te)
|
||||||
|
@ -1088,11 +1096,12 @@ if (coop == 1) // Players vs Monsters
|
||||||
ze = find (ze, classname, "player");
|
ze = find (ze, classname, "player");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (endgame_timer == 10)
|
if (endgame_timer >= 10)
|
||||||
{
|
{
|
||||||
localcmd("serverinfo objective return\n");
|
localcmd("serverinfo objective return\n");
|
||||||
changelevel ("r_bunker");
|
changelevel ("r_bunker");
|
||||||
}
|
}
|
||||||
|
endgame_timer = endgame_timer + 1;
|
||||||
}
|
}
|
||||||
if (pcount == 0 && pdead > 0)
|
if (pcount == 0 && pdead > 0)
|
||||||
endgame_timer = endgame_timer + 1;
|
endgame_timer = endgame_timer + 1;
|
||||||
|
@ -1743,14 +1752,8 @@ void () RecoilControl =
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (te.class == 1)
|
|
||||||
te.recoil = te.recoil - 0.20;
|
te.recoil = te.recoil - (0.20+(te.skill_combat*0.005));
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1967,7 +1970,7 @@ void() worldspawn =
|
||||||
precache_model ("progs/v_pipe.mdl");
|
precache_model ("progs/v_pipe.mdl");
|
||||||
precache_model ("progs/v_double.mdl");
|
precache_model ("progs/v_double.mdl");
|
||||||
precache_model ("progs/v_combat.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_g11.mdl");
|
||||||
precache_model ("progs/v_ak47.mdl");
|
precache_model ("progs/v_ak47.mdl");
|
||||||
precache_model ("progs/v_acr.mdl");
|
precache_model ("progs/v_acr.mdl");
|
||||||
|
@ -2096,6 +2099,8 @@ void() worldspawn =
|
||||||
|
|
||||||
precache_sound ("misc/hosdie1.wav");
|
precache_sound ("misc/hosdie1.wav");
|
||||||
precache_sound ("misc/hosdie2.wav");
|
precache_sound ("misc/hosdie2.wav");
|
||||||
|
precache_sound ("misc/hosdown.wav");
|
||||||
|
precache_sound ("misc/rescued.wav");
|
||||||
|
|
||||||
precache_sound ("player/gib1.wav");
|
precache_sound ("player/gib1.wav");
|
||||||
precache_sound ("player/step1.wav");
|
precache_sound ("player/step1.wav");
|
||||||
|
|
|
@ -524,6 +524,12 @@ void () zombie_death =
|
||||||
{
|
{
|
||||||
if (self.rtime > 0)
|
if (self.rtime > 0)
|
||||||
{
|
{
|
||||||
|
if (random()*100<10)
|
||||||
|
{
|
||||||
|
remove(self);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (random()*100<50)
|
if (random()*100<50)
|
||||||
sound (self, CHAN_VOICE, "player/headshot.wav", 0.75, ATTN_NORM);
|
sound (self, CHAN_VOICE, "player/headshot.wav", 0.75, ATTN_NORM);
|
||||||
else
|
else
|
||||||
|
@ -925,13 +931,8 @@ void() monster_zombie =
|
||||||
self.th_die = zombie_die;
|
self.th_die = zombie_die;
|
||||||
self.th_melee = zombie_melee;
|
self.th_melee = zombie_melee;
|
||||||
|
|
||||||
if (world.map_obj == OBJ_DEADTOWN)
|
|
||||||
{
|
self.th_missile = zombie_missile;
|
||||||
if (random()<0.5)
|
|
||||||
self.th_missile = zombie_missile;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
self.th_missile = zombie_missile;
|
|
||||||
|
|
||||||
self.angles_y = random()*360;
|
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);
|
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 + '0 -128 0');
|
||||||
if (world.map_obj == OBJ_DEADTOWN && random()<0.25)
|
spawn_ghoul(self.origin + '0 128 0');
|
||||||
spawn_ghoul(self.origin + '128 0 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)
|
if (random()<0.25 && world.map_obj == 1)
|
||||||
spawn_civilian(self.origin);
|
spawn_civilian(self.origin);
|
||||||
|
|
Loading…
Reference in a new issue