git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3470 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
2dcd293cc8
commit
596a0d6404
18 changed files with 870 additions and 2504 deletions
|
@ -366,8 +366,11 @@ float() FindTarget =
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (self.charmed == 1)
|
if (self.charmed >= 1)
|
||||||
|
{
|
||||||
|
self.charmed = self.charmed - 1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (sight_entity_time >= time - 0.1 && !(self.spawnflags & 3) )
|
if (sight_entity_time >= time - 0.1 && !(self.spawnflags & 3) )
|
||||||
|
@ -407,8 +410,6 @@ float() FindTarget =
|
||||||
|
|
||||||
if (client.team == 0)//client connecting
|
if (client.team == 0)//client connecting
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (client.class == 0)//client connecting
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
|
|
||||||
if (r == RANGE_NEAR)
|
if (r == RANGE_NEAR)
|
||||||
|
@ -434,27 +435,13 @@ float() FindTarget =
|
||||||
self.alert = self.alert - 1;
|
self.alert = self.alert - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if your sneak level is 70% or higher you will never get caught
|
|
||||||
//alert guards get the full 100% random roll, otherwise 90%
|
if ((client.sneak <= 1) && (client.sneak > 0))
|
||||||
if (self.alert == 0)
|
|
||||||
x = random()*80;
|
|
||||||
else
|
|
||||||
x = random()*100;
|
|
||||||
if (client.sneak >= 70 && client.velocity == '0 0 0')
|
|
||||||
{
|
|
||||||
sprint(client, 2, self.netname);
|
|
||||||
sprint(client, 2, " failed to detect you.\n");
|
|
||||||
}
|
|
||||||
else if (client.sneak > 0 && (x > client.sneak + 15))
|
|
||||||
{
|
{
|
||||||
sprint(client, 2, "you've been detected!\n");
|
sprint(client, 2, "you've been detected!\n");
|
||||||
client.sneak = 0;
|
client.sneak = 0;
|
||||||
}
|
}
|
||||||
else if (client.sneak > 0)
|
|
||||||
{
|
|
||||||
sprint(client, 2, self.netname);
|
|
||||||
sprint(client, 2, " failed to detect you.\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client.sneak > 0)//sneaking players are invisible
|
if (client.sneak > 0)//sneaking players are invisible
|
||||||
|
|
|
@ -41,7 +41,7 @@ void() boss_face =
|
||||||
{
|
{
|
||||||
|
|
||||||
// go for another player if multi player
|
// go for another player if multi player
|
||||||
if (self.enemy.health <= 0 || random() < 0.02 || self.enemy.class == 0 || self.enemy.team == 0)
|
if (self.enemy.health <= 0 || random() < 0.02 || self.enemy.team == 0)
|
||||||
{
|
{
|
||||||
self.enemy = find(self.enemy, classname, "player");
|
self.enemy = find(self.enemy, classname, "player");
|
||||||
if (!self.enemy)
|
if (!self.enemy)
|
||||||
|
|
|
@ -44,7 +44,16 @@ void() SetChangeParms =
|
||||||
if (!self.current_slot) //changing without spawning?
|
if (!self.current_slot) //changing without spawning?
|
||||||
DecodeLevelParms(); //make sure we have our inventory!
|
DecodeLevelParms(); //make sure we have our inventory!
|
||||||
|
|
||||||
|
if (self.supertime > 0)
|
||||||
|
{
|
||||||
|
self.supertime = 0;
|
||||||
|
sprint(self, 2, "you are now back to your normal self.\n");
|
||||||
|
self.skill_combat = self.skill_combat - 20;
|
||||||
|
self.skill_doctor = self.skill_doctor - 20;
|
||||||
|
self.skill_sneak = self.skill_sneak - 20;
|
||||||
|
self.skill_science = self.skill_science - 20;
|
||||||
|
self.skill_speech = self.skill_speech - 20;
|
||||||
|
}
|
||||||
|
|
||||||
self.items = self.items - (self.items &
|
self.items = self.items - (self.items &
|
||||||
(IT_KEY1 | IT_KEY2 | IT_INVISIBILITY | IT_INVULNERABILITY | IT_SUIT | IT_QUAD) );
|
(IT_KEY1 | IT_KEY2 | IT_INVISIBILITY | IT_INVULNERABILITY | IT_SUIT | IT_QUAD) );
|
||||||
|
@ -54,13 +63,12 @@ void() SetChangeParms =
|
||||||
parm6 = self.skill_doctor;
|
parm6 = self.skill_doctor;
|
||||||
parm7 = self.skill_sneak;
|
parm7 = self.skill_sneak;
|
||||||
parm14 = self.skill_science;
|
parm14 = self.skill_science;
|
||||||
|
parm16 = self.skill_speech;
|
||||||
|
|
||||||
|
|
||||||
parm8 = self.ammo_shells;
|
parm8 = self.ammo_shells;
|
||||||
parm9 = self.perk1;
|
parm9 = self.perk1;
|
||||||
parm10 = self.perk2;
|
parm10 = self.perk2;
|
||||||
parm16 = self.current_slot;
|
|
||||||
parm17 = self.islot1;
|
parm17 = self.islot1;
|
||||||
parm18 = self.islot2;
|
parm18 = self.islot2;
|
||||||
parm19 = self.islot3;
|
parm19 = self.islot3;
|
||||||
|
@ -102,7 +110,7 @@ void() SetNewParms =
|
||||||
parm5 = 0;
|
parm5 = 0;
|
||||||
parm6 = 0;
|
parm6 = 0;
|
||||||
parm7 = 0;
|
parm7 = 0;
|
||||||
parm8 = 200;
|
parm8 = 0;
|
||||||
parm9 = 0;
|
parm9 = 0;
|
||||||
parm10 = 0;
|
parm10 = 0;
|
||||||
parm11 = 0;
|
parm11 = 0;
|
||||||
|
@ -138,15 +146,14 @@ void() DecodeLevelParms =
|
||||||
self.skill_doctor = parm6;
|
self.skill_doctor = parm6;
|
||||||
self.skill_sneak = parm7;
|
self.skill_sneak = parm7;
|
||||||
self.skill_science = parm14;
|
self.skill_science = parm14;
|
||||||
|
self.skill_speech = parm16;
|
||||||
|
|
||||||
self.ammo_shells = parm8;
|
self.ammo_shells = parm8;
|
||||||
self.perk1 = parm9;
|
self.perk1 = parm9;
|
||||||
self.perk2 = parm10;
|
self.perk2 = parm10;
|
||||||
|
|
||||||
self.class = 1;
|
|
||||||
|
|
||||||
if (parm16 > 0)
|
self.current_slot = 1;
|
||||||
self.current_slot = parm16;
|
|
||||||
|
|
||||||
self.islot1 = parm17;
|
self.islot1 = parm17;
|
||||||
self.islot2 = parm18;
|
self.islot2 = parm18;
|
||||||
|
@ -616,17 +623,17 @@ void() PutClientInServer =
|
||||||
DecodeLevelParms ();
|
DecodeLevelParms ();
|
||||||
|
|
||||||
|
|
||||||
if (self.current_slot == 0)
|
if (self.islot1 == 0 && self.islot2 == 0 && self.islot3 == 0 && self.islot4 == 0 && self.islot5 == 0 && self.islot6 == 0 && self.islot7 == 0 && self.islot8 == 0 && self.islot9 == 0 && self.islot10 == 0 && self.islot11 == 0 && self.islot12 == 0)
|
||||||
{
|
{
|
||||||
self.islot1 = SlotVal(IID_WP_GLOCK, 15);
|
self.islot1 = SlotVal(IID_WP_GLOCK, 15);
|
||||||
self.islot2 = SlotVal(IID_WP_KNIFE, 1);
|
self.islot2 = SlotVal(IID_WP_KNIFE, 1);
|
||||||
self.islot3 = SlotVal(IID_ARM_LEATHER, 1);
|
self.islot3 = SlotVal(IID_ARM_LEATHER, 1);
|
||||||
self.islot5 = SlotVal(IID_CHEM_STIMPACK, 3);
|
self.islot5 = SlotVal(IID_CHEM_STIMPACK, 5);
|
||||||
self.islot7 = SlotVal(IID_AM_10MM, 30);
|
self.islot7 = SlotVal(IID_AM_10MM, 70);
|
||||||
self.islot8 = 0;
|
self.islot8 = 0;
|
||||||
self.islot9 = 0;
|
self.islot9 = 0;
|
||||||
self.islot10 = 0;
|
self.islot10 = 0;
|
||||||
self.islot11 = 0;
|
self.islot11 = SlotVal(IID_CHEM_MEDICALBAG, 25);
|
||||||
self.islot12 = 0;
|
self.islot12 = 0;
|
||||||
self.islot13 = 0;
|
self.islot13 = 0;
|
||||||
self.islot14 = 0;
|
self.islot14 = 0;
|
||||||
|
@ -657,7 +664,7 @@ void() PutClientInServer =
|
||||||
self.fixangle = TRUE; // turn this way immediately
|
self.fixangle = TRUE; // turn this way immediately
|
||||||
|
|
||||||
|
|
||||||
self.max_health = 100 + self.skill_combat;
|
self.max_health = 80 + (self.skill_combat*4) + (self.skill_doctor*2) + (self.skill_sneak*2) + (self.skill_speech);
|
||||||
|
|
||||||
self.equipment_slot = 0;
|
self.equipment_slot = 0;
|
||||||
|
|
||||||
|
@ -758,16 +765,14 @@ void() PutClientInServer =
|
||||||
}
|
}
|
||||||
|
|
||||||
W_SetCurrentAmmo();
|
W_SetCurrentAmmo();
|
||||||
stuffcmd(self, "sizeup\n");
|
stuffcmd(self, "impulse 2\n");
|
||||||
stuffcmd(self, "sizeup\n");
|
stuffcmd(self, "impulse 1\n");
|
||||||
|
|
||||||
|
|
||||||
if (world.model == "maps/r_bunker.bsp")
|
if (world.model == "maps/r_bunker.bsp")
|
||||||
stuffcmd(self, "play music/afterglow\n");
|
stuffcmd(self, "play music/afterglow\n");
|
||||||
else if (world.map_obj == OBJ_DEADTOWN)
|
else if (world.map_obj == OBJ_DEADTOWN)
|
||||||
stuffcmd(self, "play music/necropolis\n");
|
stuffcmd(self, "play music/necropolis\n");
|
||||||
else
|
|
||||||
stuffcmd(self, "play music/raiders\n");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1212,7 +1217,7 @@ float(entity targ) check_fov =
|
||||||
vec = normalize (self.origin - targ.origin);
|
vec = normalize (self.origin - targ.origin);
|
||||||
dot = vec * v_forward;
|
dot = vec * v_forward;
|
||||||
|
|
||||||
if ( dot > 0.9)
|
if ( dot > 0.5)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1220,6 +1225,19 @@ float(entity targ) check_fov =
|
||||||
return FALSE;
|
return FALSE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
float(entity targ) check_fov_num =
|
||||||
|
{
|
||||||
|
local vector vec;
|
||||||
|
local float dot;
|
||||||
|
|
||||||
|
makevectors (targ.angles);
|
||||||
|
vec = normalize (self.origin - targ.origin);
|
||||||
|
dot = vec * v_forward;
|
||||||
|
|
||||||
|
|
||||||
|
return dot;
|
||||||
|
};
|
||||||
|
|
||||||
float(entity targ) check_fov_side =
|
float(entity targ) check_fov_side =
|
||||||
{
|
{
|
||||||
local vector vec;
|
local vector vec;
|
||||||
|
@ -1241,80 +1259,139 @@ float(entity targ) check_fov_side =
|
||||||
|
|
||||||
void() SneakLevel =
|
void() SneakLevel =
|
||||||
{
|
{
|
||||||
local float sn, st, front, r, q;
|
local float sn, st, front, r, q, x, b, c, y, z, t;
|
||||||
local entity te;
|
local entity te, ze;
|
||||||
local string report;
|
local string report;
|
||||||
|
|
||||||
|
|
||||||
front = 0;
|
front = 0;
|
||||||
|
q = 1200;
|
||||||
te = findradius(self.origin, 1500);
|
q = q - (self.skill_sneak*50);
|
||||||
while (te)
|
|
||||||
{
|
|
||||||
if (visible(te) && te.classname == "monster" && check_fov(te))
|
|
||||||
r = vlen(self.origin - te.origin);
|
|
||||||
|
|
||||||
|
|
||||||
te = te.chain;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
sn = 90 + self.skill_sneak/2;
|
sn = 99;
|
||||||
|
self.sneak = 99;
|
||||||
|
|
||||||
//sneaking along a wall increases chance by 2%
|
|
||||||
makevectors(self.angles);
|
|
||||||
if (pointcontents (self.origin + v_right*64) == CONTENT_SOLID)
|
|
||||||
sn = sn + 2;
|
|
||||||
else if (pointcontents (self.origin - v_right*64) == CONTENT_SOLID)
|
|
||||||
sn = sn + 2;
|
|
||||||
else if (pointcontents (self.origin + v_forward*64) == CONTENT_SOLID)
|
|
||||||
sn = sn + 2;
|
|
||||||
else if (pointcontents (self.origin - v_forward*64) == CONTENT_SOLID)
|
|
||||||
sn = sn + 2;
|
|
||||||
|
|
||||||
//duck or prone gives a 2% bonus to stealth
|
//light level gives a bonus/penalty to stealth
|
||||||
if (self.position > 0)
|
b = light_level(self.origin);
|
||||||
sn = sn + 2;
|
|
||||||
|
if (b <= 50)
|
||||||
|
q = q - (200);
|
||||||
|
if (b >= 200)
|
||||||
|
q = q + (200);
|
||||||
|
|
||||||
|
|
||||||
|
//standing still gives a bonus to stealth
|
||||||
|
if (self.velocity == '0 0 0')
|
||||||
|
q = q - (200);
|
||||||
|
|
||||||
|
|
||||||
|
//stealthboy gives a bonus to stealth
|
||||||
|
st = ToIID(self.islot4);
|
||||||
|
if (st == IID_EQUIP_STEALTHBOY)
|
||||||
|
q = q - (100);
|
||||||
|
|
||||||
|
//combat armor gives a penalty to stealth
|
||||||
|
st = ToIID(self.islot3);
|
||||||
|
if (st == IID_ARM_COMBAT || st == IID_ARM_SEVA)
|
||||||
|
q = q + (100);
|
||||||
|
|
||||||
|
//metal armor gives a large penalty to stealth
|
||||||
|
st = ToIID(self.islot3);
|
||||||
|
if (st == IID_ARM_METAL)
|
||||||
|
q = q + (200);
|
||||||
|
|
||||||
|
//power armor gives a huge penalty to stealth
|
||||||
|
st = ToIID(self.islot3);
|
||||||
|
if (st == IID_ARM_LPOWER)
|
||||||
|
q = q + (300);
|
||||||
|
|
||||||
|
//tesla armor gives a massive penalty to stealth
|
||||||
|
st = ToIID(self.islot3);
|
||||||
|
if (st == IID_ARM_TESLA)
|
||||||
|
q = q + (400);
|
||||||
|
|
||||||
//walking in front of a monster at close range is very bad
|
//walking in front of a monster at close range is very bad
|
||||||
//at longer ranges it isn't so bad to do so
|
//at longer ranges it isn't so bad to do so
|
||||||
//thus even healer and barbarian types can sneak if they do so smartly
|
//thus even healer and barbarian types can sneak if they do so smartly
|
||||||
|
|
||||||
if (r > 0 && r <= 600)
|
|
||||||
{
|
|
||||||
r = 600 - r;
|
|
||||||
q = 3 + (self.skill_sneak/2);
|
|
||||||
//stealthboy gives a bonus to sneak range
|
|
||||||
st = ToIID(self.islot4);
|
|
||||||
if (st == IID_EQUIP_STEALTHBOY)
|
|
||||||
q = 3 + (self.skill_sneak/2) + 3;
|
|
||||||
|
|
||||||
sn = sn - r/q;
|
c = 0;
|
||||||
|
|
||||||
|
te = findradius(self.origin, q);
|
||||||
|
while (te)
|
||||||
|
{
|
||||||
|
if (visible(te) && te.classname == "monster" && (check_fov_num(te) > 0.5) && te.health > 3)
|
||||||
|
{
|
||||||
|
if (c == 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
r = vlen(self.origin - te.origin);
|
||||||
|
t = q * (check_fov_num(te));
|
||||||
|
t = t * (check_fov_num(te));
|
||||||
|
t = t * (check_fov_num(te));
|
||||||
|
y = r / t;
|
||||||
|
ze = te;
|
||||||
|
c = 1;
|
||||||
|
/*
|
||||||
|
bprint(2, "test1: ");
|
||||||
|
bprint(2, ftos(r));
|
||||||
|
bprint(2, " ");
|
||||||
|
bprint(2, ftos(q));
|
||||||
|
bprint(2, " ");
|
||||||
|
bprint(2, ftos(t));
|
||||||
|
bprint(2, "\n");*/
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
r = vlen(self.origin - te.origin);
|
||||||
|
t = q * (check_fov_num(te));
|
||||||
|
t = t * (check_fov_num(te));
|
||||||
|
t = t * (check_fov_num(te));
|
||||||
|
z = r / t;
|
||||||
|
/*
|
||||||
|
bprint(2, "test2: ");
|
||||||
|
bprint(2, ftos(r));
|
||||||
|
bprint(2, " ");
|
||||||
|
bprint(2, ftos(q));
|
||||||
|
bprint(2, " ");
|
||||||
|
bprint(2, ftos(t));
|
||||||
|
bprint(2, "\n");*/
|
||||||
|
|
||||||
|
if (z < y)
|
||||||
|
{
|
||||||
|
ze = te;
|
||||||
|
y = z;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
te = te.chain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//combat armor gives a penalty to stealth
|
if (r > 0 && r <= q)
|
||||||
st = ToIID(self.islot3);
|
{
|
||||||
if (st == IID_ARM_COMBAT || st == IID_ARM_SEVA)
|
sn = 150 * (r/t);
|
||||||
sn = sn - 5;
|
sn = sn - 50;
|
||||||
|
}
|
||||||
|
|
||||||
//metal armor gives a large penalty to stealth
|
if (self.invistime > 0)
|
||||||
st = ToIID(self.islot3);
|
{
|
||||||
if (st == IID_ARM_METAL)
|
bprint(2, "invistime\n");
|
||||||
sn = sn - 10;
|
self.sneak = 99;
|
||||||
|
}
|
||||||
|
|
||||||
//power armor gives a huge penalty to stealth
|
|
||||||
st = ToIID(self.islot3);
|
|
||||||
if (st == IID_ARM_LPOWER)
|
|
||||||
sn = sn - 25;
|
|
||||||
|
|
||||||
//tesla armor gives a massive penalty to stealth
|
if (sn <= 1 && sn > 0)
|
||||||
st = ToIID(self.islot3);
|
{
|
||||||
if (st == IID_ARM_TESLA)
|
sprint(self, 2, "you've been detected!\n");
|
||||||
sn = sn - 40;
|
self.sneak = 0;
|
||||||
|
return;
|
||||||
if (sn <= 5)
|
}
|
||||||
sn = 5;
|
|
||||||
|
|
||||||
if (sn >= 99)
|
if (sn >= 99)
|
||||||
sn = 99;
|
sn = 99;
|
||||||
|
@ -1526,23 +1603,39 @@ void() PlayerPreThink =
|
||||||
|
|
||||||
if (self.score < 200)
|
if (self.score < 200)
|
||||||
{
|
{
|
||||||
if ((self.skill_combat + self.skill_doctor + self.skill_sneak + self.skill_science) <= 10)
|
if ((self.skill_combat + self.skill_doctor + self.skill_sneak + self.skill_science + self.skill_speech) <= 8)
|
||||||
{
|
{
|
||||||
self.score = 200;
|
self.score = 200;
|
||||||
|
|
||||||
sound (self, CHAN_BODY, "misc/secret.wav", 1, ATTN_NORM);
|
sound (self, CHAN_BODY, "misc/levelup.wav", 1, ATTN_NORM);
|
||||||
|
sprint(self, 2, "you have gained a level!\npress 'p' to assign a skill point.\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (self.score > 200)
|
||||||
|
{
|
||||||
|
if ((self.skill_combat + self.skill_doctor + self.skill_sneak + self.skill_science + self.skill_speech) > 8)
|
||||||
|
{
|
||||||
|
self.score = 200;
|
||||||
|
|
||||||
|
sound (self, CHAN_BODY, "misc/levelup.wav", 1, ATTN_NORM);
|
||||||
sprint(self, 2, "you have gained a level!\npress 'p' to assign a skill point.\n");
|
sprint(self, 2, "you have gained a level!\npress 'p' to assign a skill point.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//perk1timer and perk2timer are "cooldowns" for each perk
|
//perk1timer and perk2timer are "cooldowns" for each perk
|
||||||
if (self.perk1timer > 0)
|
if (self.perk1timer > 0)
|
||||||
self.perk1timer = self.perk1timer - 1;
|
self.perk1timer = self.perk1timer - 1;
|
||||||
|
|
||||||
if (self.perk2timer > 0)
|
if (self.perk2timer > 0)
|
||||||
self.perk2timer = self.perk2timer - 1;
|
self.perk2timer = self.perk2timer - 1;
|
||||||
|
|
||||||
|
//speech skill provides faster perk regeneration
|
||||||
|
if (random()*40 < self.skill_speech)
|
||||||
|
{
|
||||||
|
if (self.perk1timer > 0)
|
||||||
|
self.perk1timer = self.perk1timer - 1;
|
||||||
|
if (self.perk2timer > 0)
|
||||||
|
self.perk2timer = self.perk2timer - 1;
|
||||||
|
}
|
||||||
|
|
||||||
self.shadowtime = time_left;
|
self.shadowtime = time_left;
|
||||||
|
|
||||||
|
@ -1558,13 +1651,36 @@ void() PlayerPreThink =
|
||||||
PositionControl();
|
PositionControl();
|
||||||
WeightControl();
|
WeightControl();
|
||||||
ArmorCheck();
|
ArmorCheck();
|
||||||
SneakLevel();
|
if (self.sneak > 0)
|
||||||
|
SneakLevel();
|
||||||
self.accept = 0;
|
self.accept = 0;
|
||||||
|
|
||||||
self.endinfo1 = rescue;
|
self.endinfo1 = rescue;
|
||||||
self.endinfo2 = dead_hostage;
|
self.endinfo2 = dead_hostage;
|
||||||
self.endinfo3 = hostages;
|
self.endinfo3 = hostages;
|
||||||
|
|
||||||
|
if (self.invistime > 1)
|
||||||
|
self.invistime = self.invistime -1;
|
||||||
|
else if (self.invistime == 1)
|
||||||
|
{
|
||||||
|
self.invistime = 0;
|
||||||
|
sound (self, CHAN_BODY, "items/inv2.wav", 1, ATTN_NORM);
|
||||||
|
sprint(self, 2, "your disguise wears off.\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (self.supertime > 1)
|
||||||
|
self.supertime = self.supertime -1;
|
||||||
|
else if (self.supertime == 1)
|
||||||
|
{
|
||||||
|
self.supertime = 0;
|
||||||
|
sound (self, CHAN_BODY, "items/damage2.wav", 1, ATTN_NORM);
|
||||||
|
sprint(self, 2, "you are now back to your normal self.\n");
|
||||||
|
self.skill_combat = self.skill_combat - 20;
|
||||||
|
self.skill_doctor = self.skill_doctor - 20;
|
||||||
|
self.skill_sneak = self.skill_sneak - 20;
|
||||||
|
self.skill_science = self.skill_science - 20;
|
||||||
|
self.skill_speech = self.skill_speech - 20;
|
||||||
|
}
|
||||||
|
|
||||||
local float lgrip, rgrip;
|
local float lgrip, rgrip;
|
||||||
|
|
||||||
|
@ -1652,8 +1768,6 @@ void() PlayerPreThink =
|
||||||
stuffcmd(self, "play music/afterglow\n");
|
stuffcmd(self, "play music/afterglow\n");
|
||||||
else if (world.map_obj == OBJ_DEADTOWN)
|
else if (world.map_obj == OBJ_DEADTOWN)
|
||||||
stuffcmd(self, "play music/necropolis\n");
|
stuffcmd(self, "play music/necropolis\n");
|
||||||
else
|
|
||||||
stuffcmd(self, "play music/raiders\n");
|
|
||||||
|
|
||||||
self.musictimer = 1;
|
self.musictimer = 1;
|
||||||
}
|
}
|
||||||
|
@ -1809,7 +1923,7 @@ void() CheckPowerups =
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
self.items = self.items - (self.items & IT_INVISIBILITY);
|
self.items = self.items - (self.items & IT_INVISIBILITY);
|
||||||
if (self.ghost == 1 || self.class == 0 || self.team == 0)
|
if (self.ghost == 1 || self.team == 0)
|
||||||
{
|
{
|
||||||
self.modelindex = modelindex_gone;
|
self.modelindex = modelindex_gone;
|
||||||
return;
|
return;
|
||||||
|
@ -2250,12 +2364,12 @@ void(entity targ, entity attacker) ClientObituary =
|
||||||
if (attacker.critical == 3) //headshot
|
if (attacker.critical == 3) //headshot
|
||||||
{
|
{
|
||||||
bprint (PRINT_MEDIUM, "X ");
|
bprint (PRINT_MEDIUM, "X ");
|
||||||
attacker.score = attacker.score + 25;
|
attacker.score = attacker.score + 1;
|
||||||
}
|
}
|
||||||
if (attacker.critical == 777) //through the wall
|
if (attacker.critical == 777) //through the wall
|
||||||
{
|
{
|
||||||
bprint (PRINT_MEDIUM, "% ");
|
bprint (PRINT_MEDIUM, "% ");
|
||||||
attacker.score = attacker.score + 50;
|
attacker.score = attacker.score + 5;
|
||||||
}
|
}
|
||||||
if (attacker.critical == 778) //wall headshot
|
if (attacker.critical == 778) //wall headshot
|
||||||
{
|
{
|
||||||
|
@ -2265,7 +2379,7 @@ void(entity targ, entity attacker) ClientObituary =
|
||||||
if (attacker.velocity_z != 0)
|
if (attacker.velocity_z != 0)
|
||||||
{
|
{
|
||||||
bprint (PRINT_MEDIUM, "@ ");
|
bprint (PRINT_MEDIUM, "@ ");
|
||||||
attacker.score = attacker.score - 50;
|
attacker.score = attacker.score - 2;
|
||||||
}
|
}
|
||||||
// if (attacker.current_slot == 1 && attacker.mag1 == 0)
|
// if (attacker.current_slot == 1 && attacker.mag1 == 0)
|
||||||
// bprint (PRINT_MEDIUM, "! ");
|
// bprint (PRINT_MEDIUM, "! ");
|
||||||
|
@ -2575,89 +2689,5 @@ void(entity targ, entity attacker) ClientObituary =
|
||||||
|
|
||||||
void() Identify =
|
void() Identify =
|
||||||
{
|
{
|
||||||
local string c1, c2, c3, c5;
|
return;
|
||||||
local float tmp;
|
|
||||||
|
|
||||||
makevectors (self.v_angle);
|
|
||||||
traceline (self.origin, (self.origin + (v_forward * 2000)), 32, self);
|
|
||||||
if (trace_ent.classname == "player" && self.currentmenu == "none" && self.team == trace_ent.team)
|
|
||||||
{
|
|
||||||
if (trace_ent.class == 1)
|
|
||||||
c1 = "\nfirst aid\n";
|
|
||||||
else if (trace_ent.class == 2)
|
|
||||||
c1 = "\nstealth\n";
|
|
||||||
else if (trace_ent.class == 3)
|
|
||||||
c1 = "\ncombat\n";
|
|
||||||
else if (trace_ent.class == 4)
|
|
||||||
c1 = "\nscience\n";
|
|
||||||
else
|
|
||||||
c1 = "\n";
|
|
||||||
|
|
||||||
if (trace_ent.health <= 0)
|
|
||||||
c2 = "dead";
|
|
||||||
c2 = ftos (trace_ent.health);
|
|
||||||
c3 = GetItemName (ToIID(ItemInSlot(trace_ent, trace_ent.current_slot)));
|
|
||||||
|
|
||||||
if (trace_ent.islot3 == 0)
|
|
||||||
c5 = "no armor";
|
|
||||||
else
|
|
||||||
c5 = GetItemName(ToIID(trace_ent.islot3));
|
|
||||||
|
|
||||||
centerprint (self, trace_ent.netname, c1, c2, "\n", c3, "\n", c5);
|
|
||||||
}
|
|
||||||
if (trace_ent.classname == "robowolf" && self.currentmenu == "none")
|
|
||||||
{
|
|
||||||
c1 = "robo-fang\n";
|
|
||||||
c2 = "robot construct\nowned by ";
|
|
||||||
c3 = trace_ent.track.netname;
|
|
||||||
if (trace_ent.team == self.team)
|
|
||||||
c5 = "\nfriendly\n";
|
|
||||||
else
|
|
||||||
c5 = "\nhostile\n";
|
|
||||||
|
|
||||||
centerprint (self, trace_ent.netname, c1, c2, c3, c5, "", "");
|
|
||||||
}
|
|
||||||
if (trace_ent.classname == "station" && self.currentmenu == "none")
|
|
||||||
{
|
|
||||||
c1 = trace_ent.netname;
|
|
||||||
if (self.armortype == 0)
|
|
||||||
c2 = "uncompleted";
|
|
||||||
else if (trace_ent.health >= trace_ent.max_health)
|
|
||||||
c2 = "online";
|
|
||||||
else if (trace_ent.health >= trace_ent.max_health*0.75)
|
|
||||||
c2 = "banged up";
|
|
||||||
else if (trace_ent.health >= trace_ent.max_health*0.50)
|
|
||||||
c2 = "damaged";
|
|
||||||
else
|
|
||||||
c2 = "almost destroyed";
|
|
||||||
|
|
||||||
c3 = trace_ent.track.netname;
|
|
||||||
|
|
||||||
centerprint (self, c1, "\nstationary bot", "\n", c2, "\n", "owned by ", c3);
|
|
||||||
}
|
|
||||||
if (trace_ent.classname == "monster" && self.currentmenu == "none")
|
|
||||||
{
|
|
||||||
c1 = "hostile";
|
|
||||||
|
|
||||||
tmp = ToIID(trace_ent.islot3);
|
|
||||||
if (tmp == 0)
|
|
||||||
c2 = "natural armor";
|
|
||||||
else if (tmp == IID_ARM_LEATHER)
|
|
||||||
c2 = "lightly armored";
|
|
||||||
else
|
|
||||||
c2 = GetItemName(ToIID(trace_ent.islot3));
|
|
||||||
|
|
||||||
if (trace_ent.weapon == 1)
|
|
||||||
c3 = "rifle";
|
|
||||||
if (trace_ent.weapon == 2)
|
|
||||||
c3 = "pistol";
|
|
||||||
if (trace_ent.weapon == 3)
|
|
||||||
c3 = "shotgun";
|
|
||||||
if (trace_ent.weapon == 4)
|
|
||||||
c3 = "smg";
|
|
||||||
if (trace_ent.weapon >= 5)
|
|
||||||
c3 = "assault rifle";
|
|
||||||
|
|
||||||
centerprint (self, trace_ent.netname, "\n", c1, "\n", c2, "\n", c3);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -164,18 +164,6 @@ void(string arg1) Cmd_InvUse =
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iid == IID_BUILD_MRAMMO ||
|
|
||||||
iid == IID_BUILD_SHIELDGEN ||
|
|
||||||
iid == IID_BUILD_AUTODOC ||
|
|
||||||
iid == IID_BUILD_ROBOFANG ||
|
|
||||||
iid == IID_BUILD_TTURRET ||
|
|
||||||
iid == IID_BUILD_RTURRET ||
|
|
||||||
iid == IID_BUILD_GTURRET)
|
|
||||||
{
|
|
||||||
if (spawn_station(iid))
|
|
||||||
DecreaseDestroySlot(slotno);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (iid == IID_EQUIP_CLIMBINGGEAR)
|
if (iid == IID_EQUIP_CLIMBINGGEAR)
|
||||||
{
|
{
|
||||||
|
@ -210,30 +198,9 @@ void(string arg1) Cmd_InvUse =
|
||||||
Sneak();
|
Sneak();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (iid == IID_EQUIP_SILENCER)
|
|
||||||
{
|
|
||||||
AttachSilencer();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (iid == IID_WP_WRENCH)
|
|
||||||
{
|
|
||||||
FireToolkit();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (iid == IID_EQUIP_HOVERBOOTS)
|
|
||||||
{
|
|
||||||
if (self.equipment_slot == slotno)
|
|
||||||
{
|
|
||||||
self.equipment_slot = 0;
|
|
||||||
sprint(self, PRINT_HIGH, "Hoverboots deactivated\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
self.equipment_slot = slotno;
|
|
||||||
sprint(self, PRINT_HIGH, "Hoverboots activated\n");
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
sprint(self, PRINT_HIGH, "Don't know how to 'use' item\n");
|
sprint(self, PRINT_HIGH, "Don't know how to 'use' item\n");
|
||||||
};
|
};
|
||||||
|
@ -281,6 +248,8 @@ void(string arg1) Cmd_GainLevel =
|
||||||
self.skill_sneak = self.skill_sneak + 1;
|
self.skill_sneak = self.skill_sneak + 1;
|
||||||
else if (arg1 == "science")
|
else if (arg1 == "science")
|
||||||
self.skill_science = self.skill_science + 1;
|
self.skill_science = self.skill_science + 1;
|
||||||
|
else if (arg1 == "speech")
|
||||||
|
self.skill_speech = self.skill_speech + 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
void(string arg1, string arg2) Cmd_GainPerk =
|
void(string arg1, string arg2) Cmd_GainPerk =
|
||||||
|
@ -401,6 +370,8 @@ void(string arg1) Cmd_InvBuy =
|
||||||
iid = ToIID(item);
|
iid = ToIID(item);
|
||||||
amount = ToStatus(item);
|
amount = ToStatus(item);
|
||||||
money = GetBaseValue(iid);
|
money = GetBaseValue(iid);
|
||||||
|
money = ceil(money * (1 - (self.skill_speech/30)));
|
||||||
|
|
||||||
if (self.ammo_shells < money)
|
if (self.ammo_shells < money)
|
||||||
{
|
{
|
||||||
sprint(self, 2, "not enough money.\n");
|
sprint(self, 2, "not enough money.\n");
|
||||||
|
@ -456,7 +427,8 @@ void(string arg1) Cmd_InvSell =
|
||||||
|
|
||||||
SetItemSlot(self, slotno, 0);
|
SetItemSlot(self, slotno, 0);
|
||||||
x = GetBaseValue(iid);
|
x = GetBaseValue(iid);
|
||||||
x = x / 5;
|
x = ceil(x * (1 + (self.skill_speech/30)));
|
||||||
|
x = ceil(x / 5);
|
||||||
y = ftos(x);
|
y = ftos(x);
|
||||||
z = GetItemName(iid);
|
z = GetItemName(iid);
|
||||||
|
|
||||||
|
@ -765,390 +737,6 @@ void(string arg1) Cmd_InvMix =
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void(string arg1) Cmd_InvCreate =
|
|
||||||
{
|
|
||||||
local float it, iid;
|
|
||||||
local float slotno, q, w, x, y, z;
|
|
||||||
local float weap;
|
|
||||||
|
|
||||||
if (arg1 == "flash")
|
|
||||||
{
|
|
||||||
|
|
||||||
x = SlotOfItem(self, IID_MISC_NUKACOLA);
|
|
||||||
if (x == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need nukacola + chemicals + aerosol can\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
y = SlotOfItem(self, IID_MISC_CHEMICALS);
|
|
||||||
if (y == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need nukacola + chemicals + aerosol can\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
z = SlotOfItem(self, IID_MISC_AEROSOL);
|
|
||||||
if (z == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need nukacola + chemicals + aerosol can\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
DecreaseDestroySlot(x);
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
DecreaseDestroySlot(z);
|
|
||||||
|
|
||||||
if ((random()<0.50) && (self.class == 1))
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you failed to create a flash bomb.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ((random()<0.25) && (self.class == 2))
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you failed to create a flash bomb.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ((random()<0.75) && (self.class == 3))
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you failed to create a flash bomb.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TryGiveStackable(self, IID_GREN_FLASH, 1);
|
|
||||||
sprint(self, PRINT_MEDIUM, "flash bomb created.\n");
|
|
||||||
}
|
|
||||||
if (arg1 == "grenade")
|
|
||||||
{
|
|
||||||
x = SlotOfItem(self, IID_MISC_RDXCRYSTAL);
|
|
||||||
if (x == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need rdx crystals, chemicals, aerosol can\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
y = SlotOfItem(self, IID_MISC_CHEMICALS);
|
|
||||||
if (y == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need rdx crystals, chemicals, aerosol can\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
z = SlotOfItem(self, IID_MISC_AEROSOL);
|
|
||||||
if (z == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need rdx crystals, chemicals, aerosol can\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
DecreaseDestroySlot(x);
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
DecreaseDestroySlot(z);
|
|
||||||
|
|
||||||
if ((random()<0.75) && (self.class == 1))
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you failed to create a grenade.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ((random()<0.75) && (self.class == 2))
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you failed to create a grenade.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ((random()<0.75) && (self.class == 3))
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you failed to create a grenade.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TryGiveStackable(self, IID_GREN_FRAG, 1);
|
|
||||||
sprint(self, PRINT_MEDIUM, "homemade bomb created.\n");
|
|
||||||
}
|
|
||||||
if (arg1 == "silencer")
|
|
||||||
{
|
|
||||||
x = SlotOfItem(self, IID_MISC_DUCKTAPE);
|
|
||||||
if (x == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need junk + aerosol can + duck tape\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
y = SlotOfItem(self, IID_MISC_JUNK);
|
|
||||||
if (y == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need junk + aerosol can + duck tape\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
z = SlotOfItem(self, IID_MISC_AEROSOL);
|
|
||||||
if (z == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need junk + aerosol can + duck tape\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
DecreaseDestroySlot(x);
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
DecreaseDestroySlot(z);
|
|
||||||
|
|
||||||
if ((random()<0.25) && (self.class == 1))
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you failed to create a silencer.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ((random()<0.10) && (self.class == 2))
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you failed to create a silencer.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ((random()<0.50) && (self.class == 3))
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you failed to create a silencer.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
AddNonStackable(self, IID_EQUIP_SILENCER, 1);
|
|
||||||
sprint(self, PRINT_MEDIUM, "silencer created.\n");
|
|
||||||
}
|
|
||||||
if (arg1 == "stun")
|
|
||||||
{
|
|
||||||
x = SlotOfItem(self, IID_MISC_NUKACOLA);
|
|
||||||
if (x == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need nukacola + chemicals\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
y = SlotOfItem(self, IID_MISC_CHEMICALS);
|
|
||||||
if (y == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need nukacola + chemicals\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
DecreaseDestroySlot(x);
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
|
|
||||||
if ((random()<0.40) && (self.class < 4))
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you failed to create a stun grenade.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TryGiveStackable(self, IID_GREN_STUN, 1);
|
|
||||||
sprint(self, PRINT_MEDIUM, "stun grenade created.\n");
|
|
||||||
}
|
|
||||||
if (arg1 == "extender")
|
|
||||||
{
|
|
||||||
y = SlotOfItem(self, IID_MISC_STEELPIPE);
|
|
||||||
if (y == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need steel pipe + duck tape\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
z = SlotOfItem(self, IID_MISC_DUCKTAPE);
|
|
||||||
if (z == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need junk, aerosol can\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
DecreaseDestroySlot(z);
|
|
||||||
|
|
||||||
AddNonStackable(self, IID_EQUIP_EXTENDER, 1);
|
|
||||||
sprint(self, PRINT_MEDIUM, "barrel extender created.\n");
|
|
||||||
}
|
|
||||||
if (arg1 == "xray")
|
|
||||||
{
|
|
||||||
y = SlotOfItem(self, IID_MISC_LCD);
|
|
||||||
if (y == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
y = SlotOfItem(self, IID_MISC_CIRCUITBOARD);
|
|
||||||
if (y == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
z = SlotOfItem(self, IID_MISC_GUM);
|
|
||||||
if (z == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
q = SlotOfItem(self, IID_MISC_XRAYTUBE);
|
|
||||||
if (q == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
w = SlotOfItem(self, IID_MISC_COPPERWIRE);
|
|
||||||
if (w == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
DecreaseDestroySlot(q);
|
|
||||||
DecreaseDestroySlot(w);
|
|
||||||
DecreaseDestroySlot(x);
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
DecreaseDestroySlot(z);
|
|
||||||
|
|
||||||
if ((random()<0.90) && (self.class < 4))
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you failed to create an x-ray device.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
AddNonStackable(self, IID_EQUIP_XRAY, 1);
|
|
||||||
sprint(self, PRINT_MEDIUM, "x-ray device created!\n");
|
|
||||||
}
|
|
||||||
if (arg1 == "modify")
|
|
||||||
{
|
|
||||||
weap = ToIID(self.(SlotField(self.current_slot)));
|
|
||||||
|
|
||||||
if (weap == IID_WP_PULSERIFLE)
|
|
||||||
{
|
|
||||||
y = SlotOfItem(self, IID_MISC_DUCKTAPE);
|
|
||||||
if (y == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
x = SlotOfItem(self, IID_MISC_CIRCUITBOARD);
|
|
||||||
if (x == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
z = SlotOfItem(self, IID_MISC_NUKACOLA);
|
|
||||||
if (z == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
q = SlotOfItem(self, IID_MISC_XRAYTUBE);
|
|
||||||
if (q == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
w = SlotOfItem(self, IID_MISC_COPPERWIRE);
|
|
||||||
if (w == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
DecreaseDestroySlot(q);
|
|
||||||
DecreaseDestroySlot(w);
|
|
||||||
DecreaseDestroySlot(x);
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
DecreaseDestroySlot(z);
|
|
||||||
|
|
||||||
if (ToIID(self.islot1) == IID_WP_PULSERIFLE)
|
|
||||||
SetItemSlot(self, 1, SlotVal(IID_WP_TURBOPLASMA, 40));
|
|
||||||
else if (ToIID(self.islot2) == IID_WP_PULSERIFLE)
|
|
||||||
SetItemSlot(self, 2, SlotVal(IID_WP_TURBOPLASMA, 40));
|
|
||||||
|
|
||||||
|
|
||||||
if ((random()<0.25))
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you try to modify your plasma rifle by hotwiring\n");
|
|
||||||
sprint(self, PRINT_MEDIUM, "the bolt carrier and venting off excess gasses \n");
|
|
||||||
sprint(self, PRINT_MEDIUM, "but you end up destroying it...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
AddNonStackable(self, IID_WP_TURBOPLASMA, 1);
|
|
||||||
sprint(self, PRINT_MEDIUM, "turbo plasma rifle created\n");
|
|
||||||
}
|
|
||||||
if (weap == IID_WP_AK112)
|
|
||||||
{
|
|
||||||
y = SlotOfItem(self, IID_MISC_DUCKTAPE);
|
|
||||||
if (y == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
x = SlotOfItem(self, IID_MISC_JUNK);
|
|
||||||
if (x == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
z = SlotOfItem(self, IID_MISC_AEROSOL);
|
|
||||||
if (z == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
w = SlotOfItem(self, IID_MISC_COPPERWIRE);
|
|
||||||
if (w == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
DecreaseDestroySlot(w);
|
|
||||||
DecreaseDestroySlot(x);
|
|
||||||
DecreaseDestroySlot(z);
|
|
||||||
|
|
||||||
if (ToIID(self.islot1) == IID_WP_AK112)
|
|
||||||
SetItemSlot(self, 1, SlotVal(IID_WP_AK112_M, 50));
|
|
||||||
else if (ToIID(self.islot2) == IID_WP_AK112)
|
|
||||||
SetItemSlot(self, 2, SlotVal(IID_WP_AK112_M, 50));
|
|
||||||
|
|
||||||
sprint(self, PRINT_MEDIUM, "created expanded magazine for ak-112\n");
|
|
||||||
}
|
|
||||||
if (weap == IID_WP_DEAGLE)
|
|
||||||
{
|
|
||||||
y = SlotOfItem(self, IID_MISC_DUCKTAPE);
|
|
||||||
if (y == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
x = SlotOfItem(self, IID_MISC_JUNK);
|
|
||||||
if (x == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
z = SlotOfItem(self, IID_MISC_AEROSOL);
|
|
||||||
if (z == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
w = SlotOfItem(self, IID_MISC_COPPERWIRE);
|
|
||||||
if (w == 0)
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "you need the proper ingredients...\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
DecreaseDestroySlot(w);
|
|
||||||
DecreaseDestroySlot(x);
|
|
||||||
DecreaseDestroySlot(z);
|
|
||||||
|
|
||||||
if (ToIID(self.islot1) == IID_WP_DEAGLE)
|
|
||||||
SetItemSlot(self, 1, SlotVal(IID_WP_DEAGLE_M, 10));
|
|
||||||
else if (ToIID(self.islot2) == IID_WP_DEAGLE)
|
|
||||||
SetItemSlot(self, 2, SlotVal(IID_WP_DEAGLE_M, 10));
|
|
||||||
|
|
||||||
sprint(self, PRINT_MEDIUM, "created expanded magazine for deagle\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sprint(self, PRINT_MEDIUM, "can't modify currently held weapon.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
void(string arg1, string arg2) Cmd_InvSwap =
|
void(string arg1, string arg2) Cmd_InvSwap =
|
||||||
{
|
{
|
||||||
|
@ -1264,12 +852,6 @@ void(string line) SV_ParseClientCommand =
|
||||||
return;
|
return;
|
||||||
Cmd_InvMix(argv(1));
|
Cmd_InvMix(argv(1));
|
||||||
}
|
}
|
||||||
else if (cmd == "create")
|
|
||||||
{
|
|
||||||
if (self.deadflag)
|
|
||||||
return;
|
|
||||||
Cmd_InvCreate(argv(1));
|
|
||||||
}
|
|
||||||
else if (cmd == "invswap")
|
else if (cmd == "invswap")
|
||||||
{
|
{
|
||||||
if (self.deadflag || self.current_slot==0)
|
if (self.deadflag || self.current_slot==0)
|
||||||
|
|
|
@ -103,6 +103,27 @@ void(entity targ, entity attacker) Killed =
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void(entity targ, entity attacker) ArmorNoise =
|
||||||
|
{
|
||||||
|
local float r;
|
||||||
|
|
||||||
|
if (targ.classname != "player" && targ.classname != "monster")
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (attacker.classname != "player" && attacker.classname != "monster")
|
||||||
|
return;
|
||||||
|
|
||||||
|
r = random();
|
||||||
|
|
||||||
|
if (r <= 0.33)
|
||||||
|
sound (targ, CHAN_WEAPON, "contact/armor1.wav", 1, ATTN_NORM);
|
||||||
|
else if (r <= 0.67)
|
||||||
|
sound (targ, CHAN_WEAPON, "contact/armor2.wav", 1, ATTN_NORM);
|
||||||
|
else
|
||||||
|
sound (targ, CHAN_WEAPON, "contact/armor3.wav", 1, ATTN_NORM);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
============
|
============
|
||||||
T_Damage
|
T_Damage
|
||||||
|
@ -137,6 +158,12 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
|
||||||
if (targ.classname == "player")
|
if (targ.classname == "player")
|
||||||
damage = floor(damage * 0.60);*/
|
damage = floor(damage * 0.60);*/
|
||||||
|
|
||||||
|
|
||||||
|
if (challenge_rating <= 6 && attacker.classname == "monster")
|
||||||
|
damage = damage * 0.70;
|
||||||
|
if (challenge_rating <= 9 && attacker.classname == "monster")
|
||||||
|
damage = damage * 0.80;
|
||||||
|
|
||||||
if (targ.radiation > 0)
|
if (targ.radiation > 0)
|
||||||
{
|
{
|
||||||
radpenalty = 1 + (targ.radiation/200);
|
radpenalty = 1 + (targ.radiation/200);
|
||||||
|
@ -303,7 +330,7 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
|
||||||
|
|
||||||
if (attacker.classname == "monster")
|
if (attacker.classname == "monster")
|
||||||
{
|
{
|
||||||
if (random()*100>= 98)
|
if (random()*100>= 95)
|
||||||
attacker.critical = 3;
|
attacker.critical = 3;
|
||||||
else
|
else
|
||||||
attacker.critical = 0;
|
attacker.critical = 0;
|
||||||
|
@ -314,33 +341,7 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
|
||||||
if (attacker.critical == 3)
|
if (attacker.critical == 3)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (random()<0.005)
|
damage = (damage * 2);
|
||||||
severity = 64;
|
|
||||||
|
|
||||||
|
|
||||||
severity = 0 + random()*20;
|
|
||||||
|
|
||||||
if ((attacker.perk1 == 17 || attacker.perk2 == 17) && random()<0.05)
|
|
||||||
{
|
|
||||||
severity = severity + 15;
|
|
||||||
sprint(self, 2, "!ONE IN A MILLION\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (attacker.class == 2)
|
|
||||||
severity = severity + 5;
|
|
||||||
|
|
||||||
if (targ.classname == "player")
|
|
||||||
damage = (damage * 2);
|
|
||||||
else if (severity >= 64)
|
|
||||||
damage = (damage * 10);
|
|
||||||
else if (severity >= 30)
|
|
||||||
damage = (damage * 6);
|
|
||||||
else if (severity >= 20)
|
|
||||||
damage = (damage * 5);
|
|
||||||
else if (severity >= 15)
|
|
||||||
damage = (damage * 4);
|
|
||||||
else
|
|
||||||
damage = (damage * 3);
|
|
||||||
|
|
||||||
if (targ.classname == "monster")
|
if (targ.classname == "monster")
|
||||||
attacker.score = attacker.score + 1;
|
attacker.score = attacker.score + 1;
|
||||||
|
@ -368,15 +369,8 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (damage <= 0 && (attacker.classname == "monster" || attacker.classname == "player"))
|
|
||||||
{
|
|
||||||
damage = 0;
|
|
||||||
sound (targ, CHAN_BODY, targ.armornoise, 1, ATTN_NORM);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (attacker.classname == "monster" || attacker.classname == "player")
|
|
||||||
sound (targ, CHAN_ITEM, targ.armornoise, 1, ATTN_NORM);
|
|
||||||
|
|
||||||
|
|
||||||
// add to the damage total for clients, which will be sent as a single
|
// add to the damage total for clients, which will be sent as a single
|
||||||
|
@ -455,8 +449,6 @@ take = damage;
|
||||||
//fix: soldiers inherent armor bonus applies to armor absorb
|
//fix: soldiers inherent armor bonus applies to armor absorb
|
||||||
//fix: psycho drug gives similar benefits to a soldiers bonus
|
//fix: psycho drug gives similar benefits to a soldiers bonus
|
||||||
|
|
||||||
if (targ.class == 3)
|
|
||||||
take -= 1;
|
|
||||||
if (self.rage == IID_CHEM_PSYCHO)
|
if (self.rage == IID_CHEM_PSYCHO)
|
||||||
take -= 3;
|
take -= 3;
|
||||||
|
|
||||||
|
@ -547,6 +539,7 @@ take = damage;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ArmorNoise(targ, attacker);
|
||||||
|
|
||||||
if (targ.hold <= 0)
|
if (targ.hold <= 0)
|
||||||
targ.health = targ.health - take;
|
targ.health = targ.health - take;
|
||||||
|
@ -612,559 +605,6 @@ take = damage;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
============
|
|
||||||
J_Damage
|
|
||||||
|
|
||||||
This is a special function that is called for weapons using JHP ammo.
|
|
||||||
JHP ammo does extra damage against things wearing no armor or little
|
|
||||||
armor, but less damage against heavily armored foes.
|
|
||||||
============
|
|
||||||
*/
|
|
||||||
|
|
||||||
void(entity targ, entity inflictor, entity attacker, float damage) J_Damage =
|
|
||||||
{
|
|
||||||
local entity oldself;
|
|
||||||
local float save;
|
|
||||||
local float take, severity, helm;
|
|
||||||
local string attackerteam, targteam;
|
|
||||||
|
|
||||||
|
|
||||||
if (!targ.takedamage)
|
|
||||||
return;
|
|
||||||
|
|
||||||
damage = damage * 1.25;
|
|
||||||
damage = floor(damage);
|
|
||||||
|
|
||||||
// used by buttons and triggers to set activator for target firing
|
|
||||||
damage_attacker = attacker;
|
|
||||||
|
|
||||||
if (attacker.critical == 3 && targ.classname != "car")//attacker scored a headshot/critical
|
|
||||||
{
|
|
||||||
if (attacker.critical == 3)
|
|
||||||
{
|
|
||||||
severity = 0 + random()*20;
|
|
||||||
|
|
||||||
if (attacker.class == 3)
|
|
||||||
severity = severity + 2;
|
|
||||||
|
|
||||||
if (severity >= 19)
|
|
||||||
damage = (damage * 5);
|
|
||||||
else if (severity >= 14)
|
|
||||||
damage = (damage * 4);
|
|
||||||
else
|
|
||||||
damage = (damage * 3);
|
|
||||||
|
|
||||||
if (targ.classname == "monster")
|
|
||||||
attacker.score = attacker.score + 1;
|
|
||||||
|
|
||||||
helm = targ.armortype;
|
|
||||||
if (targ.helmet == 0)
|
|
||||||
{
|
|
||||||
sound (targ, CHAN_VOICE, "player/headshot.wav", 1, ATTN_NORM);
|
|
||||||
helm = 0;
|
|
||||||
}
|
|
||||||
if (targ.helmet == AS_STRAIGHT)
|
|
||||||
{
|
|
||||||
sound (targ, CHAN_BODY, "weapons/helmet.wav", 1, ATTN_NORM);
|
|
||||||
helm = 0.30;
|
|
||||||
}
|
|
||||||
if (targ.helmet == AS_SLIDING)
|
|
||||||
{
|
|
||||||
sound (targ, CHAN_BODY, "weapons/helmet.wav", 1, ATTN_NORM);
|
|
||||||
helm = 0.45;
|
|
||||||
}
|
|
||||||
|
|
||||||
damage = (damage - (damage * helm));
|
|
||||||
|
|
||||||
makevectors (targ.v_angle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//sneak attack: if you attack a creature who isn't fighting you, bonus damage
|
|
||||||
if (attacker.perk1 == 7 || attacker.perk2 == 7)
|
|
||||||
{
|
|
||||||
if (targ.enemy != attacker)
|
|
||||||
{
|
|
||||||
sprint(attacker, 2, "!SNEAK ATTACK\n");
|
|
||||||
if (damage <= 10)
|
|
||||||
damage = damage * 3;
|
|
||||||
else if (damage <= 20)
|
|
||||||
damage = damage * 2;
|
|
||||||
else if (damage <= 30)
|
|
||||||
damage = damage * 1.5;
|
|
||||||
else
|
|
||||||
damage = damage * 1.25;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (damage <= 0)
|
|
||||||
{
|
|
||||||
damage = 0;
|
|
||||||
sound (targ, CHAN_BODY, targ.armornoise, 1, ATTN_NORM);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
sound (targ, CHAN_ITEM, targ.armornoise, 1, ATTN_NORM);
|
|
||||||
|
|
||||||
|
|
||||||
// add to the damage total for clients, which will be sent as a single
|
|
||||||
// message at the end of the frame
|
|
||||||
// FIXME: remove after combining shotgun blasts?
|
|
||||||
if (targ.flags & FL_CLIENT)
|
|
||||||
{
|
|
||||||
targ.dmg_take = targ.dmg_take + take;
|
|
||||||
targ.dmg_save = targ.dmg_save + save;
|
|
||||||
targ.dmg_inflictor = inflictor;
|
|
||||||
}
|
|
||||||
|
|
||||||
damage_inflictor = inflictor;
|
|
||||||
|
|
||||||
/*
|
|
||||||
// figure momentum add
|
|
||||||
if ( (inflictor != world) && (targ.movetype == MOVETYPE_WALK) )
|
|
||||||
{
|
|
||||||
dir = targ.origin - (inflictor.absmin + inflictor.absmax) * 0.5;
|
|
||||||
dir = normalize(dir);
|
|
||||||
// Set kickback for smaller weapons
|
|
||||||
//Zoid -- use normal NQ kickback
|
|
||||||
// // Read: only if it's not yourself doing the damage
|
|
||||||
// if ( (damage < 60) & ((attacker.classname == "player") & (targ.classname == "player")) & ( attacker.netname != targ.netname))
|
|
||||||
// targ.velocity = targ.velocity + dir * damage * 11;
|
|
||||||
// else
|
|
||||||
// Otherwise, these rules apply to rockets and grenades
|
|
||||||
// for blast velocity
|
|
||||||
targ.velocity = targ.velocity + dir * damage * 8;
|
|
||||||
|
|
||||||
// Rocket Jump modifiers
|
|
||||||
if ( (rj > 1) & ((attacker.classname == "player") & (targ.classname == "player")) & ( attacker.netname == targ.netname))
|
|
||||||
targ.velocity = targ.velocity + dir * damage * rj;
|
|
||||||
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// check for godmode or invincibility
|
|
||||||
if (targ.flags & FL_GODMODE)
|
|
||||||
return;
|
|
||||||
if (targ.invincible_finished >= time)
|
|
||||||
{
|
|
||||||
if (self.invincible_sound < time)
|
|
||||||
{
|
|
||||||
sound (targ, CHAN_ITEM, "items/protect3.wav", 1, ATTN_NORM);
|
|
||||||
self.invincible_sound = time + 2;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// team play damage avoidance
|
|
||||||
//ZOID 12-13-96: self.team doesn't work in QW. Use keys
|
|
||||||
attackerteam = infokey(attacker, "team");
|
|
||||||
targteam = infokey(targ, "team");
|
|
||||||
|
|
||||||
if ((teamplay == 1) && (targteam == attackerteam) &&
|
|
||||||
(attacker.classname == "player") && (attackerteam != "") &&
|
|
||||||
inflictor.classname !="door")
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ((teamplay == 3) && (targteam == attackerteam) &&
|
|
||||||
(attacker.classname == "player") && (attackerteam != "") &&
|
|
||||||
(targ != attacker)&& inflictor.classname !="door")
|
|
||||||
return;
|
|
||||||
|
|
||||||
|
|
||||||
take = damage;
|
|
||||||
|
|
||||||
// do the damage
|
|
||||||
//different sorts of armour simply subtract different ammounts
|
|
||||||
//this makes armor like the force armor good against many small rounds
|
|
||||||
//(SMG, shotguns, swords, etc) but useless against big damage (grenades)
|
|
||||||
//power armor, which has the best of both worlds, is also the heaviest :p
|
|
||||||
|
|
||||||
switch(ToIID(targ.islot3))
|
|
||||||
{
|
|
||||||
case IID_ARM_DESERT:
|
|
||||||
take -= 1;
|
|
||||||
break;
|
|
||||||
case IID_ARM_LEATHER:
|
|
||||||
take -= 1;
|
|
||||||
break;
|
|
||||||
case IID_ARM_VANDAL:
|
|
||||||
take -= 15;
|
|
||||||
break;
|
|
||||||
case IID_ARM_METAL:
|
|
||||||
take -= 10;
|
|
||||||
break;
|
|
||||||
case IID_ARM_TESLA:
|
|
||||||
take -= 25;
|
|
||||||
break;
|
|
||||||
case IID_ARM_COMBAT:
|
|
||||||
take -= 20;
|
|
||||||
break;
|
|
||||||
case IID_ARM_SEVA:
|
|
||||||
take -= 20;
|
|
||||||
break;
|
|
||||||
case IID_ARM_FORCE:
|
|
||||||
take -= 30;
|
|
||||||
break;
|
|
||||||
case IID_ARM_LPOWER:
|
|
||||||
take -= 25;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(ToIID(targ.islot3))
|
|
||||||
{
|
|
||||||
case IID_ARM_LEATHER:
|
|
||||||
take = take * 0.70;
|
|
||||||
break;
|
|
||||||
case IID_ARM_VANDAL:
|
|
||||||
take = take * 0.60;
|
|
||||||
break;
|
|
||||||
case IID_ARM_METAL:
|
|
||||||
take = take * 0.40;
|
|
||||||
break;
|
|
||||||
case IID_ARM_TESLA:
|
|
||||||
take = take * 0.55;
|
|
||||||
break;
|
|
||||||
case IID_ARM_COMBAT:
|
|
||||||
take = take * 0.50;
|
|
||||||
break;
|
|
||||||
case IID_ARM_SEVA:
|
|
||||||
take = take * 0.45;
|
|
||||||
break;
|
|
||||||
case IID_ARM_FORCE:
|
|
||||||
take = take * 0.80;
|
|
||||||
break;
|
|
||||||
case IID_ARM_LPOWER:
|
|
||||||
take = take * 0.40;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (targ.classname == "player" && targ.zoom > 0)
|
|
||||||
{
|
|
||||||
targ.maxspeed = targ.maxspeed * 0.20;
|
|
||||||
stuffcmd(targ, "v_idlescale 20\n");
|
|
||||||
}
|
|
||||||
else if (take > 20 && targ.classname == "player")
|
|
||||||
{
|
|
||||||
targ.maxspeed = targ.maxspeed * 0.20;
|
|
||||||
stuffcmd(targ, "v_cshift 100 0 0 100\n");
|
|
||||||
stuffcmd(targ, "v_idlescale 30\n");
|
|
||||||
}
|
|
||||||
else if (take > 0)
|
|
||||||
{
|
|
||||||
targ.maxspeed = targ.maxspeed * 0.30;
|
|
||||||
stuffcmd(targ, "v_cshift 100 0 0 50\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (take <= 0)
|
|
||||||
{
|
|
||||||
take = 0;
|
|
||||||
sound (targ, CHAN_BODY, targ.armornoise, 1, ATTN_NORM);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
targ.health = targ.health - take;
|
|
||||||
|
|
||||||
if (targ.health <= 0)
|
|
||||||
{
|
|
||||||
Killed (targ, attacker);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// react to the damage
|
|
||||||
oldself = self;
|
|
||||||
self = targ;
|
|
||||||
|
|
||||||
/*SERVER
|
|
||||||
if ( (self.flags & FL_MONSTER) && attacker != world)
|
|
||||||
{
|
|
||||||
// get mad unless of the same class (except for soldiers)
|
|
||||||
if (self != attacker && attacker != self.enemy)
|
|
||||||
{
|
|
||||||
if ( (self.classname != attacker.classname)
|
|
||||||
|| (self.classname == "monster" ) )
|
|
||||||
{
|
|
||||||
if (self.enemy.classname == "player")
|
|
||||||
self.oldenemy = self.enemy;
|
|
||||||
self.enemy = attacker;
|
|
||||||
FoundTarget ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if (self.th_pain)
|
|
||||||
{
|
|
||||||
self.th_pain (attacker, take);
|
|
||||||
}
|
|
||||||
|
|
||||||
self = oldself;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
============
|
|
||||||
X_Damage
|
|
||||||
|
|
||||||
The purpose of X_Damage is to allow certain weapons to bypass armor
|
|
||||||
which is a very large part of the game.
|
|
||||||
============
|
|
||||||
*/
|
|
||||||
|
|
||||||
void(entity targ, entity inflictor, entity attacker, float damage) X_Damage =
|
|
||||||
{
|
|
||||||
local entity oldself;
|
|
||||||
local float save;
|
|
||||||
local float take, severity, helm;
|
|
||||||
local string attackerteam, targteam;
|
|
||||||
|
|
||||||
|
|
||||||
if (!targ.takedamage)
|
|
||||||
return;
|
|
||||||
|
|
||||||
damage = damage * 0.75;
|
|
||||||
damage = floor(damage);
|
|
||||||
|
|
||||||
// used by buttons and triggers to set activator for target firing
|
|
||||||
damage_attacker = attacker;
|
|
||||||
|
|
||||||
if (attacker.critical == 3 && targ.classname != "car")//attacker scored a headshot/critical
|
|
||||||
{
|
|
||||||
if (attacker.critical == 3)
|
|
||||||
{
|
|
||||||
severity = 0 + random()*20;
|
|
||||||
|
|
||||||
if (attacker.class == 2)
|
|
||||||
severity = severity + 4;
|
|
||||||
|
|
||||||
if (severity >= 19)
|
|
||||||
damage = (damage * 5);
|
|
||||||
else if (severity >= 14)
|
|
||||||
damage = (damage * 4);
|
|
||||||
else
|
|
||||||
damage = (damage * 3);
|
|
||||||
|
|
||||||
if (targ.classname == "monster")
|
|
||||||
attacker.score = attacker.score + 1;
|
|
||||||
|
|
||||||
helm = targ.armortype;
|
|
||||||
if (targ.helmet == 0)
|
|
||||||
{
|
|
||||||
sound (targ, CHAN_VOICE, "player/headshot.wav", 1, ATTN_NORM);
|
|
||||||
helm = 0;
|
|
||||||
}
|
|
||||||
if (targ.helmet == AS_STRAIGHT)
|
|
||||||
{
|
|
||||||
sound (targ, CHAN_BODY, "weapons/helmet.wav", 1, ATTN_NORM);
|
|
||||||
helm = 0.15;
|
|
||||||
}
|
|
||||||
if (targ.helmet == AS_SLIDING)
|
|
||||||
{
|
|
||||||
sound (targ, CHAN_BODY, "weapons/helmet.wav", 1, ATTN_NORM);
|
|
||||||
helm = 0.22;
|
|
||||||
}
|
|
||||||
|
|
||||||
damage = (damage - (damage * helm));
|
|
||||||
|
|
||||||
makevectors (targ.v_angle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (damage <= 0)
|
|
||||||
{
|
|
||||||
damage = 0;
|
|
||||||
sound (targ, CHAN_BODY, targ.armornoise, 1, ATTN_NORM);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
sound (targ, CHAN_BODY, targ.armornoise, 1, ATTN_NORM);
|
|
||||||
|
|
||||||
// save damage based on the target's armor level
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
take = ceil(damage);
|
|
||||||
|
|
||||||
// add to the damage total for clients, which will be sent as a single
|
|
||||||
// message at the end of the frame
|
|
||||||
// FIXME: remove after combining shotgun blasts?
|
|
||||||
if (targ.flags & FL_CLIENT)
|
|
||||||
{
|
|
||||||
targ.dmg_take = targ.dmg_take + take;
|
|
||||||
targ.dmg_save = targ.dmg_save + save;
|
|
||||||
targ.dmg_inflictor = inflictor;
|
|
||||||
}
|
|
||||||
|
|
||||||
damage_inflictor = inflictor;
|
|
||||||
|
|
||||||
/*
|
|
||||||
// figure momentum add
|
|
||||||
if ( (inflictor != world) && (targ.movetype == MOVETYPE_WALK) )
|
|
||||||
{
|
|
||||||
dir = targ.origin - (inflictor.absmin + inflictor.absmax) * 0.5;
|
|
||||||
dir = normalize(dir);
|
|
||||||
// Set kickback for smaller weapons
|
|
||||||
//Zoid -- use normal NQ kickback
|
|
||||||
// // Read: only if it's not yourself doing the damage
|
|
||||||
// if ( (damage < 60) & ((attacker.classname == "player") & (targ.classname == "player")) & ( attacker.netname != targ.netname))
|
|
||||||
// targ.velocity = targ.velocity + dir * damage * 11;
|
|
||||||
// else
|
|
||||||
// Otherwise, these rules apply to rockets and grenades
|
|
||||||
// for blast velocity
|
|
||||||
targ.velocity = targ.velocity + dir * damage * 8;
|
|
||||||
|
|
||||||
// Rocket Jump modifiers
|
|
||||||
if ( (rj > 1) & ((attacker.classname == "player") & (targ.classname == "player")) & ( attacker.netname == targ.netname))
|
|
||||||
targ.velocity = targ.velocity + dir * damage * rj;
|
|
||||||
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// check for godmode or invincibility
|
|
||||||
if (targ.flags & FL_GODMODE)
|
|
||||||
return;
|
|
||||||
if (targ.invincible_finished >= time)
|
|
||||||
{
|
|
||||||
if (self.invincible_sound < time)
|
|
||||||
{
|
|
||||||
sound (targ, CHAN_ITEM, "items/protect3.wav", 1, ATTN_NORM);
|
|
||||||
self.invincible_sound = time + 2;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// team play damage avoidance
|
|
||||||
//ZOID 12-13-96: self.team doesn't work in QW. Use keys
|
|
||||||
attackerteam = infokey(attacker, "team");
|
|
||||||
targteam = infokey(targ, "team");
|
|
||||||
|
|
||||||
if ((teamplay == 1) && (targteam == attackerteam) &&
|
|
||||||
(attacker.classname == "player") && (attackerteam != "") &&
|
|
||||||
inflictor.classname !="door")
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ((teamplay == 3) && (targteam == attackerteam) &&
|
|
||||||
(attacker.classname == "player") && (attackerteam != "") &&
|
|
||||||
(targ != attacker)&& inflictor.classname !="door")
|
|
||||||
return;
|
|
||||||
|
|
||||||
|
|
||||||
// do the damage
|
|
||||||
//different sorts of armour simply subtract different ammounts
|
|
||||||
//this makes armor like the force armor good against many small rounds
|
|
||||||
//(SMG, shotguns, swords, etc) but useless against big damage (grenades)
|
|
||||||
//power armor, which has the best of both worlds, is also the heaviest :p
|
|
||||||
|
|
||||||
switch(ToIID(targ.islot3))
|
|
||||||
{
|
|
||||||
case IID_ARM_METAL:
|
|
||||||
take -= 1;
|
|
||||||
break;
|
|
||||||
case IID_ARM_SEVA:
|
|
||||||
take -= 1;
|
|
||||||
break;
|
|
||||||
case IID_ARM_FORCE:
|
|
||||||
take -= 3;
|
|
||||||
break;
|
|
||||||
case IID_ARM_LPOWER:
|
|
||||||
take -= 2;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(ToIID(targ.islot3))
|
|
||||||
{
|
|
||||||
case IID_ARM_LEATHER:
|
|
||||||
take = take * 0.90;
|
|
||||||
break;
|
|
||||||
case IID_ARM_VANDAL:
|
|
||||||
take = take * 0.75;
|
|
||||||
break;
|
|
||||||
case IID_ARM_METAL:
|
|
||||||
take = take * 0.90;
|
|
||||||
break;
|
|
||||||
case IID_ARM_COMBAT:
|
|
||||||
take = take * 0.90;
|
|
||||||
break;
|
|
||||||
case IID_ARM_SEVA:
|
|
||||||
take = take * 0.80;
|
|
||||||
break;
|
|
||||||
case IID_ARM_LPOWER:
|
|
||||||
take = take * 0.75;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (targ.classname == "player" && targ.zoom > 0)
|
|
||||||
{
|
|
||||||
targ.maxspeed = targ.maxspeed * 0.33;
|
|
||||||
stuffcmd(targ, "v_idlescale 20\n");
|
|
||||||
}
|
|
||||||
else if (take > 20 && targ.classname == "player")
|
|
||||||
{
|
|
||||||
targ.maxspeed = targ.maxspeed * 0.25;
|
|
||||||
stuffcmd(targ, "v_cshift 100 0 0 100\n");
|
|
||||||
stuffcmd(targ, "v_idlescale 30\n");
|
|
||||||
}
|
|
||||||
else if (take > 0)
|
|
||||||
{
|
|
||||||
targ.maxspeed = targ.maxspeed * 0.50;
|
|
||||||
stuffcmd(targ, "v_cshift 100 0 0 50\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (take <= 0)
|
|
||||||
{
|
|
||||||
take = 0;
|
|
||||||
sound (targ, CHAN_BODY, targ.armornoise, 1, ATTN_NORM);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
targ.health = targ.health - take;
|
|
||||||
|
|
||||||
if (targ.health <= 0)
|
|
||||||
{
|
|
||||||
Killed (targ, attacker);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// react to the damage
|
|
||||||
oldself = self;
|
|
||||||
self = targ;
|
|
||||||
|
|
||||||
/*SERVER
|
|
||||||
if ( (self.flags & FL_MONSTER) && attacker != world)
|
|
||||||
{
|
|
||||||
// get mad unless of the same class (except for soldiers)
|
|
||||||
if (self != attacker && attacker != self.enemy)
|
|
||||||
{
|
|
||||||
if ( (self.classname != attacker.classname)
|
|
||||||
|| (self.classname == "monster" ) )
|
|
||||||
{
|
|
||||||
if (self.enemy.classname == "player")
|
|
||||||
self.oldenemy = self.enemy;
|
|
||||||
self.enemy = attacker;
|
|
||||||
FoundTarget ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if (self.th_pain)
|
|
||||||
{
|
|
||||||
self.th_pain (attacker, take);
|
|
||||||
}
|
|
||||||
|
|
||||||
self = oldself;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
============
|
============
|
||||||
|
|
|
@ -154,10 +154,6 @@ void(vector pos, float slotno, vector imgsize) SlotImageBig =
|
||||||
it = getstati(97);
|
it = getstati(97);
|
||||||
if (slotno == 24)
|
if (slotno == 24)
|
||||||
it = getstati(98);
|
it = getstati(98);
|
||||||
if (slotno == 25)
|
|
||||||
it = getstati(104);
|
|
||||||
if (slotno == 26)
|
|
||||||
it = getstati(105);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
itname = GetItemImage(ToIID(it));
|
itname = GetItemImage(ToIID(it));
|
||||||
|
@ -203,10 +199,6 @@ void(vector pos, float slotno) SlotImageSmall =
|
||||||
it = getstati(97);
|
it = getstati(97);
|
||||||
if (slotno == 24)
|
if (slotno == 24)
|
||||||
it = getstati(98);
|
it = getstati(98);
|
||||||
if (slotno == 25)
|
|
||||||
it = getstati(104);
|
|
||||||
if (slotno == 26)
|
|
||||||
it = getstati(105);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
itname = GetItemImage(ToIID(it));
|
itname = GetItemImage(ToIID(it));
|
||||||
|
@ -545,6 +537,7 @@ void() Trader_Draw =
|
||||||
drawstring('32 16 0', itname, '8 8 0', '1 1 1', 1);
|
drawstring('32 16 0', itname, '8 8 0', '1 1 1', 1);
|
||||||
|
|
||||||
price = GetBaseValue(ToIID(it));
|
price = GetBaseValue(ToIID(it));
|
||||||
|
price = ceil(price * (1 - (getstati(104)/30)));
|
||||||
price2 = ftos(price);
|
price2 = ftos(price);
|
||||||
money = getstati(50);
|
money = getstati(50);
|
||||||
money2 = ftos(money);
|
money2 = ftos(money);
|
||||||
|
@ -570,9 +563,9 @@ void() Perks_Draw =
|
||||||
if (mousepos_y >= 2.0*IMGSIZEF*(scrwidth/640) && mousepos_y <= 4*IMGSIZEF*(scrwidth/640))
|
if (mousepos_y >= 2.0*IMGSIZEF*(scrwidth/640) && mousepos_y <= 4*IMGSIZEF*(scrwidth/640))
|
||||||
{
|
{
|
||||||
if (mousepos_x >= 3*IMGSIZEF*(scrwidth/640) && mousepos_x <= 5.5*IMGSIZEF*(scrwidth/640))
|
if (mousepos_x >= 3*IMGSIZEF*(scrwidth/640) && mousepos_x <= 5.5*IMGSIZEF*(scrwidth/640))
|
||||||
selected_class = 8;
|
|
||||||
else if (mousepos_x >= 6*IMGSIZEF*(scrwidth/640) && mousepos_x <= 7.5*IMGSIZEF*(scrwidth/640))
|
|
||||||
selected_class = 9;
|
selected_class = 9;
|
||||||
|
else if (mousepos_x >= 6*IMGSIZEF*(scrwidth/640) && mousepos_x <= 7.5*IMGSIZEF*(scrwidth/640))
|
||||||
|
selected_class = 10;
|
||||||
else
|
else
|
||||||
selected_class = 0;
|
selected_class = 0;
|
||||||
}
|
}
|
||||||
|
@ -581,12 +574,12 @@ void() Perks_Draw =
|
||||||
|
|
||||||
|
|
||||||
if (mousepos_x >= 300*(scrwidth/640) && mousepos_x <= 335*(scrwidth/640))
|
if (mousepos_x >= 300*(scrwidth/640) && mousepos_x <= 335*(scrwidth/640))
|
||||||
selected_class = 5;
|
|
||||||
else if (mousepos_x >= 350*(scrwidth/640) && mousepos_x <= 385*(scrwidth/640))
|
|
||||||
selected_class = 6;
|
selected_class = 6;
|
||||||
|
else if (mousepos_x >= 350*(scrwidth/640) && mousepos_x <= 385*(scrwidth/640))
|
||||||
|
selected_class = 7;
|
||||||
|
|
||||||
else if (mousepos_x >= 400*(scrwidth/640) && mousepos_x <= 435*(scrwidth/640))
|
else if (mousepos_x >= 400*(scrwidth/640) && mousepos_x <= 435*(scrwidth/640))
|
||||||
selected_class = 7;
|
selected_class = 8;
|
||||||
else
|
else
|
||||||
selected_class = 0;
|
selected_class = 0;
|
||||||
}
|
}
|
||||||
|
@ -614,7 +607,7 @@ void() Perks_Draw =
|
||||||
void() Items_Draw =
|
void() Items_Draw =
|
||||||
{
|
{
|
||||||
local float it;
|
local float it;
|
||||||
local string itname;
|
local string itname, w1, w2;
|
||||||
|
|
||||||
drawpic('0 0 0', "gui/pipboy/items.png", '640 480 0'*(scrwidth/640), '1 1 1', 1);
|
drawpic('0 0 0', "gui/pipboy/items.png", '640 480 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
|
@ -624,12 +617,12 @@ void() Items_Draw =
|
||||||
drawpic('0 0 0', "gui/pipboy/items.png", '640 480 0'*(scrwidth/640), '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*(scrwidth/640) && mousepos_x <= 325*(scrwidth/640))
|
if (mousepos_x >= 300*(scrwidth/640) && mousepos_x <= 325*(scrwidth/640))
|
||||||
selected_class = 5;
|
|
||||||
else if (mousepos_x >= 350*(scrwidth/640) && mousepos_x <= 385*(scrwidth/640))
|
|
||||||
selected_class = 6;
|
selected_class = 6;
|
||||||
|
else if (mousepos_x >= 350*(scrwidth/640) && mousepos_x <= 385*(scrwidth/640))
|
||||||
|
selected_class = 7;
|
||||||
|
|
||||||
else if (mousepos_x >= 400*(scrwidth/640) && mousepos_x <= 435*(scrwidth/640))
|
else if (mousepos_x >= 400*(scrwidth/640) && mousepos_x <= 435*(scrwidth/640))
|
||||||
selected_class = 7;
|
selected_class = 8;
|
||||||
else
|
else
|
||||||
selected_class = 0;
|
selected_class = 0;
|
||||||
}
|
}
|
||||||
|
@ -671,6 +664,12 @@ void() Items_Draw =
|
||||||
itname = (ftos(GetItemWeight(ToIID(it))));
|
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);
|
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);
|
||||||
|
|
||||||
|
w1 = ftos(getstati(52));
|
||||||
|
w2 = ftos(getstati(53));
|
||||||
|
|
||||||
|
drawstring('7 5 0'*IMGSIZEF*(scrwidth/640) + '0 0 0'*(scrwidth/640), "weight\n", '8 8 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
drawstring('7 5 0'*IMGSIZEF*(scrwidth/640) + '0 8 0'*(scrwidth/640), strcat(w1, "/", w2, "\n"), '8 8 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
drawpic(mousepos, "gui/cursor.jpg", '1 1 0'*CURSORSIZE, '1 1 1', 1);
|
drawpic(mousepos, "gui/cursor.jpg", '1 1 0'*CURSORSIZE, '1 1 1', 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -679,7 +678,7 @@ void() Items_Draw =
|
||||||
void() GainPerk_Draw =
|
void() GainPerk_Draw =
|
||||||
{
|
{
|
||||||
local float it;
|
local float it;
|
||||||
local string itname, pn, pd;
|
local string itname, pn, pd, pd2;
|
||||||
|
|
||||||
drawpic('0 0 0', "gui/pipboy/gainperk.png", '640 480 0'*(scrwidth/640), '1 1 1', 1);
|
drawpic('0 0 0', "gui/pipboy/gainperk.png", '640 480 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
|
@ -730,16 +729,17 @@ void() GainPerk_Draw =
|
||||||
drawpic('2 3 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Mutation.png", '64 64 0'*(scrwidth/640), '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('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('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('5 3 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Placebo Effect.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('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);
|
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);
|
pn = PerkName(1, which_perk);
|
||||||
pd = GetPerkDesc(which_perk);
|
pd = GetPerkDesc(which_perk);
|
||||||
|
pd2 = GetPerkDesc2(which_perk);
|
||||||
drawstring('32 16 0'*(scrwidth/640), pn, '8 8 0'*(scrwidth/640), '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);
|
drawstring('32 32 0'*(scrwidth/640), pd, '8 8 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
drawstring('32 40 0'*(scrwidth/640), pd2, '8 8 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
drawpic(mousepos, "gui/cursor.jpg", '1 1 0'*CURSORSIZE, '1 1 1', 1);
|
drawpic(mousepos, "gui/cursor.jpg", '1 1 0'*CURSORSIZE, '1 1 1', 1);
|
||||||
};
|
};
|
||||||
|
@ -751,106 +751,70 @@ void() Pipboy_Draw =
|
||||||
string skill;
|
string skill;
|
||||||
vector w;
|
vector w;
|
||||||
|
|
||||||
width = cvar("vid_conwidth");
|
|
||||||
height = cvar("vid_conheight");
|
|
||||||
|
|
||||||
|
|
||||||
|
if (mousepos_x >= 192 && mousepos_x <= 512)
|
||||||
|
if (mousepos_y >= 240 && mousepos_y <= 304)
|
||||||
|
selected_class = ceil((mousepos_x-191)/64);
|
||||||
|
|
||||||
|
|
||||||
if (mousepos_y >= 200*(scrwidth/640) && mousepos_y <= 325*(scrwidth/640))
|
|
||||||
{
|
|
||||||
if (mousepos_x >= 150*(scrwidth/640) && mousepos_x <= 250*(scrwidth/640))
|
|
||||||
{
|
|
||||||
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*(scrwidth/640) && mousepos_x <= 350*(scrwidth/640))
|
|
||||||
{
|
|
||||||
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*(scrwidth/640) && mousepos_x <= 450*(scrwidth/640))
|
|
||||||
{
|
|
||||||
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*(scrwidth/640) && mousepos_x <= 550*(scrwidth/640))
|
|
||||||
{
|
|
||||||
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'*(scrwidth/640), '1 1 1', 1);
|
|
||||||
selected_class = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (mousepos_y >= 390*(scrwidth/640) && mousepos_y <= 425*(scrwidth/640))
|
else if (mousepos_y >= 390*(scrwidth/640) && mousepos_y <= 425*(scrwidth/640))
|
||||||
{
|
{
|
||||||
|
|
||||||
drawpic('0 0 0', "gui/pipboy/skills1.jpg", '640 480 0'*(scrwidth/640), '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*(scrwidth/640) && mousepos_x <= 325*(scrwidth/640))
|
if (mousepos_x >= 300*(scrwidth/640) && mousepos_x <= 325*(scrwidth/640))
|
||||||
selected_class = 5;
|
|
||||||
else if (mousepos_x >= 350*(scrwidth/640) && mousepos_x <= 375*(scrwidth/640))
|
|
||||||
selected_class = 6;
|
selected_class = 6;
|
||||||
|
else if (mousepos_x >= 350*(scrwidth/640) && mousepos_x <= 385*(scrwidth/640))
|
||||||
else if (mousepos_x >= 400*(scrwidth/640) && mousepos_x <= 425*(scrwidth/640))
|
|
||||||
selected_class = 7;
|
selected_class = 7;
|
||||||
|
|
||||||
|
else if (mousepos_x >= 400*(scrwidth/640) && mousepos_x <= 435*(scrwidth/640))
|
||||||
|
selected_class = 8;
|
||||||
else
|
else
|
||||||
selected_class = 0;
|
selected_class = 0;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
drawpic('0 0 0', "gui/pipboy/pipboy.png", '640 480 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
drawpic('0 0 0', "gui/pipboy/skills1.jpg", '640 480 0'*(scrwidth/640), '1 1 1', 1);
|
|
||||||
selected_class = 0;
|
|
||||||
}
|
drawpic('192 256 0'*(scrwidth/640), "gui/pipboy/combat.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
drawpic('256 256 0'*(scrwidth/640), "gui/pipboy/doctor.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
drawpic('320 256 0'*(scrwidth/640), "gui/pipboy/sneak.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
drawpic('384 256 0'*(scrwidth/640), "gui/pipboy/science.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
drawpic('448 256 0'*(scrwidth/640), "gui/pipboy/speech.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
|
if (selected_class == 1)
|
||||||
|
drawpic('128 64 0'*(scrwidth/640), "gui/pipboy/combat.png", '128 128 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
else if (selected_class == 2)
|
||||||
|
drawpic('128 64 0'*(scrwidth/640), "gui/pipboy/doctor.png", '128 128 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
else if (selected_class == 3)
|
||||||
|
drawpic('128 64 0'*(scrwidth/640), "gui/pipboy/sneak.png", '128 128 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
else if (selected_class == 4)
|
||||||
|
drawpic('128 64 0'*(scrwidth/640), "gui/pipboy/science.png", '128 128 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
else if (selected_class == 5)
|
||||||
|
drawpic('128 64 0'*(scrwidth/640), "gui/pipboy/speech.png", '128 128 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
|
|
||||||
if (selected_class == 1)
|
if (selected_class == 1)
|
||||||
{
|
drawstring('196 64 0'*(scrwidth/640), "combat", '16 16 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
drawstring('200 50 0'*(scrwidth/640), " combat", '8 8 0'*(scrwidth/640), '1 1 1', 1);
|
else if (selected_class == 2)
|
||||||
drawstring('200 66 0'*(scrwidth/640), "place points into this skill for improved", '8 8 0'*(scrwidth/640), '1 1 1', 1);
|
drawstring('196 64 0'*(scrwidth/640), "doctor", '16 16 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);
|
else if (selected_class == 3)
|
||||||
drawstring('200 82 0'*(scrwidth/640), "carry capacity and other aspects of being", '8 8 0'*(scrwidth/640), '1 1 1', 1);
|
drawstring('196 64 0'*(scrwidth/640), "sneak", '16 16 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);
|
else if (selected_class == 4)
|
||||||
}
|
drawstring('196 64 0'*(scrwidth/640), "science", '16 16 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
if (selected_class == 2)
|
else if (selected_class == 5)
|
||||||
{
|
drawstring('196 64 0'*(scrwidth/640), "speech", '16 16 0'*(scrwidth/640), '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'*(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'*(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;
|
bar = 0;
|
||||||
lvl = getstati(100);
|
lvl = getstati(100);
|
||||||
skill = ftos(lvl+1);
|
skill = ftos(lvl+1);
|
||||||
while (bar <= lvl)
|
while (bar <= lvl)
|
||||||
{
|
{
|
||||||
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);
|
drawpic('208 230 0'*(scrwidth/640) - ('0 4 0'*bar*(scrwidth/640)), "gui/pipboy/graph/red.jpg", '16 2 0'*2*(scrwidth/640), '1 1 1', 1);
|
||||||
bar = bar + 1;
|
bar = bar + 1;
|
||||||
}
|
}
|
||||||
drawstring('220 190 0'*(scrwidth/640) - ('0 4 0'*(lvl+4)*(scrwidth/640)), skill, '8 8 0'*(scrwidth/640), '1 1 1', 1);
|
drawstring('218 230 0'*(scrwidth/640) - ('0 4 0'*(lvl+4)*(scrwidth/640)), skill, '12 12 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
|
|
||||||
bar = 0;
|
bar = 0;
|
||||||
|
@ -858,30 +822,41 @@ void() Pipboy_Draw =
|
||||||
skill = ftos(lvl+1);
|
skill = ftos(lvl+1);
|
||||||
while (bar <= lvl)
|
while (bar <= lvl)
|
||||||
{
|
{
|
||||||
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);
|
drawpic('272 230 0'*(scrwidth/640) - ('0 4 0'*bar*(scrwidth/640)), "gui/pipboy/graph/green.jpg", '16 2 0'*2*(scrwidth/640), '1 1 1', 1);
|
||||||
bar = bar + 1;
|
bar = bar + 1;
|
||||||
}
|
}
|
||||||
drawstring('315 190 0'*(scrwidth/640) - ('0 4 0'*(lvl+4)*(scrwidth/640)), skill, '8 8 0'*(scrwidth/640), '1 1 1', 1);
|
drawstring('280 230 0'*(scrwidth/640) - ('0 4 0'*(lvl+4)*(scrwidth/640)), skill, '12 12 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
bar = 0;
|
bar = 0;
|
||||||
lvl = getstati(102);
|
lvl = getstati(102);
|
||||||
skill = ftos(lvl+1);
|
skill = ftos(lvl+1);
|
||||||
while (bar <= lvl)
|
while (bar <= lvl)
|
||||||
{
|
{
|
||||||
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);
|
drawpic('336 230 0'*(scrwidth/640) - ('0 4 0'*bar*(scrwidth/640)), "gui/pipboy/graph/blue.jpg", '16 2 0'*2*(scrwidth/640), '1 1 1', 1);
|
||||||
bar = bar + 1;
|
bar = bar + 1;
|
||||||
}
|
}
|
||||||
drawstring('405 190 0'*(scrwidth/640) - ('0 4 0'*(lvl+4)*(scrwidth/640)), skill, '8 8 0'*(scrwidth/640), '1 1 1', 1);
|
drawstring('346 230 0'*(scrwidth/640) - ('0 4 0'*(lvl+4)*(scrwidth/640)), skill, '12 12 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
bar = 0;
|
bar = 0;
|
||||||
lvl = getstati(103);
|
lvl = getstati(103);
|
||||||
skill = ftos(lvl+1);
|
skill = ftos(lvl+1);
|
||||||
while (bar <= lvl)
|
while (bar <= lvl)
|
||||||
{
|
{
|
||||||
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);
|
drawpic('400 230 0'*(scrwidth/640) - ('0 4 0'*bar*(scrwidth/640)), "gui/pipboy/graph/yellow.jpg", '16 2 0'*2*(scrwidth/640), '1 1 1', 1);
|
||||||
bar = bar + 1;
|
bar = bar + 1;
|
||||||
}
|
}
|
||||||
drawstring('495 190 0'*(scrwidth/640) - ('0 4 0'*(lvl+4)*(scrwidth/640)), skill, '8 8 0'*(scrwidth/640), '1 1 1', 1);
|
drawstring('410 230 0'*(scrwidth/640) - ('0 4 0'*(lvl+4)*(scrwidth/640)), skill, '12 12 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
|
|
||||||
|
bar = 0;
|
||||||
|
lvl = getstati(104);
|
||||||
|
skill = ftos(lvl+1);
|
||||||
|
while (bar <= lvl)
|
||||||
|
{
|
||||||
|
drawpic('464 230 0'*(scrwidth/640) - ('0 4 0'*bar*(scrwidth/640)), "gui/pipboy/graph/gray.jpg", '16 2 0'*2*(scrwidth/640), '1 1 1', 1);
|
||||||
|
bar = bar + 1;
|
||||||
|
}
|
||||||
|
drawstring('472 230 0'*(scrwidth/640) - ('0 4 0'*(lvl+4)*(scrwidth/640)), skill, '12 12 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
drawpic(mousepos, "gui/cursor.jpg", '1 1 0'*CURSORSIZE, '1 1 1', 1);
|
drawpic(mousepos, "gui/cursor.jpg", '1 1 0'*CURSORSIZE, '1 1 1', 1);
|
||||||
};
|
};
|
||||||
|
@ -1238,6 +1213,8 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
else if (selected_class == 4)
|
else if (selected_class == 4)
|
||||||
localcmd("cmd gainlevel science\n");
|
localcmd("cmd gainlevel science\n");
|
||||||
else if (selected_class == 5)
|
else if (selected_class == 5)
|
||||||
|
localcmd("cmd gainlevel speech\n");
|
||||||
|
else if (selected_class == 6)
|
||||||
{
|
{
|
||||||
show_inventory = false;
|
show_inventory = false;
|
||||||
show_pipboy = true;
|
show_pipboy = true;
|
||||||
|
@ -1246,7 +1223,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
show_items = false;
|
show_items = false;
|
||||||
show_gainperk = false;
|
show_gainperk = false;
|
||||||
}
|
}
|
||||||
else if (selected_class == 6)
|
else if (selected_class == 7)
|
||||||
{
|
{
|
||||||
show_inventory = false;
|
show_inventory = false;
|
||||||
show_pipboy = false;
|
show_pipboy = false;
|
||||||
|
@ -1255,7 +1232,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
show_items = true;
|
show_items = true;
|
||||||
show_gainperk = false;
|
show_gainperk = false;
|
||||||
}
|
}
|
||||||
else if (selected_class == 7)
|
else if (selected_class == 8)
|
||||||
{
|
{
|
||||||
show_inventory = false;
|
show_inventory = false;
|
||||||
show_pipboy = false;
|
show_pipboy = false;
|
||||||
|
@ -1268,7 +1245,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
}
|
}
|
||||||
else if (show_items)
|
else if (show_items)
|
||||||
{
|
{
|
||||||
if (selected_class == 5)
|
if (selected_class == 6)
|
||||||
{
|
{
|
||||||
show_inventory = false;
|
show_inventory = false;
|
||||||
show_pipboy = true;
|
show_pipboy = true;
|
||||||
|
@ -1277,7 +1254,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
show_items = false;
|
show_items = false;
|
||||||
show_gainperk = false;
|
show_gainperk = false;
|
||||||
}
|
}
|
||||||
else if (selected_class == 6)
|
else if (selected_class == 7)
|
||||||
{
|
{
|
||||||
show_inventory = false;
|
show_inventory = false;
|
||||||
show_pipboy = false;
|
show_pipboy = false;
|
||||||
|
@ -1286,7 +1263,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
show_items = true;
|
show_items = true;
|
||||||
show_gainperk = false;
|
show_gainperk = false;
|
||||||
}
|
}
|
||||||
else if (selected_class == 7)
|
else if (selected_class == 8)
|
||||||
{
|
{
|
||||||
show_inventory = false;
|
show_inventory = false;
|
||||||
show_pipboy = false;
|
show_pipboy = false;
|
||||||
|
@ -1298,7 +1275,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
}
|
}
|
||||||
else if (show_perks)
|
else if (show_perks)
|
||||||
{
|
{
|
||||||
if (selected_class == 5)
|
if (selected_class == 6)
|
||||||
{
|
{
|
||||||
show_inventory = false;
|
show_inventory = false;
|
||||||
show_pipboy = true;
|
show_pipboy = true;
|
||||||
|
@ -1307,7 +1284,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
show_items = false;
|
show_items = false;
|
||||||
show_gainperk = false;
|
show_gainperk = false;
|
||||||
}
|
}
|
||||||
else if (selected_class == 6)
|
else if (selected_class == 7)
|
||||||
{
|
{
|
||||||
show_inventory = false;
|
show_inventory = false;
|
||||||
show_pipboy = false;
|
show_pipboy = false;
|
||||||
|
@ -1316,7 +1293,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
show_items = true;
|
show_items = true;
|
||||||
show_gainperk = false;
|
show_gainperk = false;
|
||||||
}
|
}
|
||||||
else if (selected_class == 7)
|
else if (selected_class == 8)
|
||||||
{
|
{
|
||||||
show_inventory = false;
|
show_inventory = false;
|
||||||
show_pipboy = false;
|
show_pipboy = false;
|
||||||
|
@ -1325,7 +1302,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
show_items = false;
|
show_items = false;
|
||||||
show_gainperk = false;
|
show_gainperk = false;
|
||||||
}
|
}
|
||||||
else if (selected_class == 8)
|
else if (selected_class == 9)
|
||||||
{
|
{
|
||||||
show_inventory = false;
|
show_inventory = false;
|
||||||
show_pipboy = false;
|
show_pipboy = false;
|
||||||
|
@ -1335,7 +1312,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
show_gainperk = true;
|
show_gainperk = true;
|
||||||
perkslot = 1;
|
perkslot = 1;
|
||||||
}
|
}
|
||||||
else if (selected_class == 9)
|
else if (selected_class == 10)
|
||||||
{
|
{
|
||||||
show_inventory = false;
|
show_inventory = false;
|
||||||
show_pipboy = false;
|
show_pipboy = false;
|
||||||
|
|
|
@ -51,7 +51,7 @@ void() Crosshair_Draw =
|
||||||
|
|
||||||
void() Position_Draw =
|
void() Position_Draw =
|
||||||
{
|
{
|
||||||
float pos, s, lvl;
|
float pos, s, lvl, bar, top;
|
||||||
string sn;
|
string sn;
|
||||||
|
|
||||||
pos = getstati(54);
|
pos = getstati(54);
|
||||||
|
@ -68,8 +68,24 @@ void() Position_Draw =
|
||||||
|
|
||||||
if (s > 0)
|
if (s > 0)
|
||||||
{
|
{
|
||||||
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');
|
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.22)) +('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);
|
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.01)) +('0 1 0'*(scrheight*0.79)), "gui/hud/sneakbar.png", '0 0 0'+'135 25 0'*(scrwidth/640), '1 1 1');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
bar = 0;
|
||||||
|
top = ceil(117 * (s/100));
|
||||||
|
if (top > 117)
|
||||||
|
top = 117;
|
||||||
|
|
||||||
|
while (bar < top)
|
||||||
|
bar = bar + 1;
|
||||||
|
|
||||||
|
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.0225)) +('0 1 0'*(scrheight*0.8025)) + ('0 1 0'*(scrheight/640)), "gui/pipboy/graph/blue.jpg", '1 16 0'*(scrheight/640)+'1 0 0'*(scrwidth/640)*bar, '1 1 1', 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//drawstring('0 0 0'+('1 0 0'*(scrwidth*0.20)) +('0 1 0'*(scrheight*0.78)), strcat("%", sn), '12 12 12'*(scrheight/640), '1 1 1', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lvl >= 200)
|
if (lvl >= 200)
|
||||||
|
@ -107,12 +123,12 @@ void() Time_Draw =
|
||||||
local float xtime, ytime, ztime, obj;
|
local float xtime, ytime, ztime, obj;
|
||||||
local string qtime, rtime, shadowtime, text, text2;
|
local string qtime, rtime, shadowtime, text, text2;
|
||||||
|
|
||||||
xtime = getstati(104);
|
xtime = getstati(63);
|
||||||
ytime = floor(xtime/60);
|
ytime = floor(xtime/60);
|
||||||
ztime = xtime - (ytime*60);
|
ztime = xtime - (ytime*60);
|
||||||
qtime = ftos(ytime);
|
qtime = ftos(ytime);
|
||||||
rtime = ftos(ztime);
|
rtime = ftos(ztime);
|
||||||
shadowtime = ftos(getstati(104));
|
shadowtime = ftos(getstati(63));
|
||||||
|
|
||||||
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);
|
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);
|
||||||
|
|
||||||
|
@ -199,7 +215,7 @@ void() Health_Draw =
|
||||||
while (bar < top)
|
while (bar < top)
|
||||||
bar = bar + 1;
|
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);
|
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.07)) +('0 1 0'*(scrheight*0.75)) + ('0 1 0'*(scrheight/640)), "gui/pipboy/graph/green.jpg", '16 1 0'*(scrheight/640)-'0 1 0'*(scrwidth/640)*bar, '1 1 1', 1);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -218,7 +234,7 @@ void() Radiation_Draw =
|
||||||
while (bar < top)
|
while (bar < top)
|
||||||
bar = bar + 1;
|
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);
|
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.02)) +('0 1 0'*(scrheight*0.75)) + ('0 1 0'*(scrheight/640)), "gui/pipboy/graph/yellow.jpg", '16 1 0'*(scrheight/640)-'0 1 0'*(scrwidth/640)*bar, '1 1 1', 1);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -323,7 +339,7 @@ void() Ammo_Draw =
|
||||||
while (bar <= top)
|
while (bar <= top)
|
||||||
{
|
{
|
||||||
|
|
||||||
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.38)) +('0 1 0'*(scrheight*0.99)) - ('0 2 0'*bar*(scrheight/640)), "gui/graph/green.jpg", '0 0 0'+'8 1 0'*(scrwidth/640), '1 1 1', 1);
|
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.38)) +('0 1 0'*(scrheight*0.99)) - ('0 2 0'*bar*(scrheight/640)), "gui/pipboy/graph/green.jpg", '0 0 0'+'8 1 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
|
|
||||||
bar = bar + 1;
|
bar = bar + 1;
|
||||||
|
@ -346,7 +362,7 @@ void() Ammo_Draw =
|
||||||
while (bar <= top)
|
while (bar <= top)
|
||||||
{
|
{
|
||||||
|
|
||||||
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.38)) +('0 1 0'*(scrheight*0.99)) - ('0 2 0'*bar*(scrheight/640)), "gui/graph/green.jpg", '0 0 0'+'8 1 0'*(scrwidth/640), '1 1 1', 1);
|
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.38)) +('0 1 0'*(scrheight*0.99)) - ('0 2 0'*bar*(scrheight/640)), "gui/pipboy/graph/green.jpg", '0 0 0'+'8 1 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
|
|
||||||
bar = bar + 1;
|
bar = bar + 1;
|
||||||
|
@ -366,11 +382,11 @@ void() HUD_Perks_Draw =
|
||||||
|
|
||||||
perktime = getstati(111);
|
perktime = getstati(111);
|
||||||
if (perktime == 0)
|
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);
|
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.855)) + ('0 1 0'*(scrheight*0.90)), "gui/pipboy/graph/green.jpg", '0 0 0'+'4 4 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
perktime2 = getstati(112);
|
perktime2 = getstati(112);
|
||||||
if (perktime2 == 0)
|
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);
|
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.855)) + ('0 1 0'*(scrheight*0.96)), "gui/pipboy/graph/green.jpg", '0 0 0'+'4 4 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
|
|
||||||
if (getstati(60) > 0)
|
if (getstati(60) > 0)
|
||||||
|
@ -399,7 +415,7 @@ void() HUD_Perks_Draw =
|
||||||
while (bar < top)
|
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);
|
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.865)) +('0 1 0'*(scrheight*0.88)) + ('0 1 0'*bar*(scrheight/640)), "gui/pipboy/graph/black.jpg", '0 0 0'+'28 1 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
|
|
||||||
bar = bar + 1;
|
bar = bar + 1;
|
||||||
|
@ -420,7 +436,7 @@ void() HUD_Perks_Draw =
|
||||||
while (bar < top)
|
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);
|
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.865)) +('0 1 0'*(scrheight*0.94)) + ('0 1 0'*bar*(scrheight/640)), "gui/pipboy/graph/black.jpg", '0 0 0'+'28 1 0'*(scrwidth/640), '1 1 1', 1);
|
||||||
|
|
||||||
|
|
||||||
bar = bar + 1;
|
bar = bar + 1;
|
||||||
|
|
|
@ -632,29 +632,14 @@ float intermission_running;
|
||||||
.float ghostcnt;
|
.float ghostcnt;
|
||||||
.float dtime;
|
.float dtime;
|
||||||
.float active;
|
.float active;
|
||||||
.float class;
|
|
||||||
.float tclass;
|
|
||||||
.float xclass;
|
|
||||||
.float zone;
|
.float zone;
|
||||||
.float missionbrief;
|
.float missionbrief;
|
||||||
.float silencer;
|
|
||||||
.float extender;
|
|
||||||
//.float vote1;
|
|
||||||
//.float vote2;
|
|
||||||
//.float vote3;
|
|
||||||
//.float vote4;
|
|
||||||
//.float vote5;
|
|
||||||
//.float vote6;
|
|
||||||
//.float vote7;
|
|
||||||
//.float override;
|
|
||||||
.entity track;
|
.entity track;
|
||||||
//.float recharge;
|
|
||||||
.float processed;
|
.float processed;
|
||||||
.float current_slot;
|
.float current_slot;
|
||||||
.float attack;
|
.float attack;
|
||||||
.float position;
|
.float position;
|
||||||
.float recoil;
|
.float recoil;
|
||||||
.float heat;
|
|
||||||
.float hold;
|
.float hold;
|
||||||
.float critical;
|
.float critical;
|
||||||
.float helmet;
|
.float helmet;
|
||||||
|
@ -668,6 +653,8 @@ float intermission_running;
|
||||||
.float equipment_slot;
|
.float equipment_slot;
|
||||||
.float has_radio;
|
.float has_radio;
|
||||||
.float score;
|
.float score;
|
||||||
|
.float supertime;
|
||||||
|
.float invistime;
|
||||||
.float endinfo1;
|
.float endinfo1;
|
||||||
.float endinfo2;
|
.float endinfo2;
|
||||||
.float endinfo3;
|
.float endinfo3;
|
||||||
|
@ -687,10 +674,12 @@ float intermission_running;
|
||||||
.float skill_doctor;
|
.float skill_doctor;
|
||||||
.float skill_sneak;
|
.float skill_sneak;
|
||||||
.float skill_science;
|
.float skill_science;
|
||||||
|
.float skill_speech;
|
||||||
.float shadowskill_combat;
|
.float shadowskill_combat;
|
||||||
.float shadowskill_doctor;
|
.float shadowskill_doctor;
|
||||||
.float shadowskill_sneak;
|
.float shadowskill_sneak;
|
||||||
.float shadowskill_science;
|
.float shadowskill_science;
|
||||||
|
.float shadowskill_speech;
|
||||||
|
|
||||||
.float musictimer;
|
.float musictimer;
|
||||||
|
|
||||||
|
@ -755,6 +744,7 @@ float intermission_running;
|
||||||
.float perk2timer;
|
.float perk2timer;
|
||||||
.float shadowtime;
|
.float shadowtime;
|
||||||
.float announcercache;
|
.float announcercache;
|
||||||
|
.float crawltime;
|
||||||
string announcer;
|
string announcer;
|
||||||
|
|
||||||
.float charmed;
|
.float charmed;
|
||||||
|
|
|
@ -172,45 +172,9 @@ void() Sniff =
|
||||||
sound (self, CHAN_VOICE, "dog/dsight.wav", 1, ATTN_NORM);
|
sound (self, CHAN_VOICE, "dog/dsight.wav", 1, ATTN_NORM);
|
||||||
|
|
||||||
self.rtime = time + 5;
|
self.rtime = time + 5;
|
||||||
if (te.class == 2 && random()*100 > 99)
|
|
||||||
{
|
|
||||||
spawn_excla(te, 1);
|
|
||||||
te.sneak = 0;
|
|
||||||
sprint(te, 2, "detected!\n");
|
|
||||||
self.enemy = te;
|
|
||||||
FoundTarget();
|
|
||||||
}
|
|
||||||
else if (te.class != 2 && random()*100 > 80)
|
|
||||||
{
|
|
||||||
spawn_excla(te, 1);
|
|
||||||
te.sneak = 0;
|
|
||||||
sprint(te, 2, "detected!\n");
|
|
||||||
self.enemy = te;
|
|
||||||
FoundTarget();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self.classname != "robofang")
|
|
||||||
return;
|
|
||||||
|
|
||||||
x = 20;
|
|
||||||
te = findradius (self.origin, 500);
|
|
||||||
while (te)
|
|
||||||
{
|
|
||||||
if (te.classname == "monster" && te.enemy == self.owner)
|
|
||||||
{
|
|
||||||
if (self.rtime < time)
|
|
||||||
sound (self, CHAN_VOICE, "dog/dsight.wav", 1, ATTN_NORM);
|
|
||||||
self.rtime = time + 5;
|
|
||||||
self.enemy = te;
|
|
||||||
FoundTarget();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
te = te.chain;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void() dog_run1 =[ $run1 , dog_run2 ] {
|
void() dog_run1 =[ $run1 , dog_run2 ] {
|
||||||
|
|
|
@ -654,11 +654,11 @@ string(float iid) GetItemVModel =
|
||||||
if (iid == IID_WP_KNIFE)
|
if (iid == IID_WP_KNIFE)
|
||||||
return "progs/v_knife.mdl";
|
return "progs/v_knife.mdl";
|
||||||
if (iid == IID_WP_SLEDGE)
|
if (iid == IID_WP_SLEDGE)
|
||||||
return "progs/v_axe.mdl";
|
return "progs/v_disruptor.mdl";
|
||||||
if (iid == IID_WP_SPEAR)
|
if (iid == IID_WP_SPEAR)
|
||||||
return "progs/v_spear.mdl";
|
return "progs/v_spear.mdl";
|
||||||
if (iid == IID_WP_POWERAXE)
|
if (iid == IID_WP_POWERAXE)
|
||||||
return "progs/v_axe.mdl";
|
return "progs/v_disruptor.mdl";
|
||||||
if (iid == IID_WP_USP)
|
if (iid == IID_WP_USP)
|
||||||
return "progs/v_usp.mdl";
|
return "progs/v_usp.mdl";
|
||||||
if (iid == IID_WP_USP_S)
|
if (iid == IID_WP_USP_S)
|
||||||
|
@ -2581,7 +2581,7 @@ string (float slot, float int) PerkName =
|
||||||
if (int == 8)
|
if (int == 8)
|
||||||
return "Schizophrenia";
|
return "Schizophrenia";
|
||||||
if (int == 9)
|
if (int == 9)
|
||||||
return "Sleep Tight";
|
return "Place Effect";
|
||||||
if (int == 10)
|
if (int == 10)
|
||||||
return "Economic Moves";
|
return "Economic Moves";
|
||||||
if (int == 11)
|
if (int == 11)
|
||||||
|
@ -2607,7 +2607,7 @@ string (float slot, float int) PerkNameCentered =
|
||||||
if (int == 8)
|
if (int == 8)
|
||||||
return " Schizophrenia";
|
return " Schizophrenia";
|
||||||
if (int == 9)
|
if (int == 9)
|
||||||
return " Sleep Tight";
|
return " Place Effect";
|
||||||
if (int == 10)
|
if (int == 10)
|
||||||
return " Economic Moves";
|
return " Economic Moves";
|
||||||
if (int == 11)
|
if (int == 11)
|
||||||
|
@ -2634,7 +2634,7 @@ string(float int) GetPerkImage =
|
||||||
else if (int == 8)
|
else if (int == 8)
|
||||||
return "gui/perks/Schizophrenia.jpg";
|
return "gui/perks/Schizophrenia.jpg";
|
||||||
else if (int == 9)
|
else if (int == 9)
|
||||||
return "gui/perks/Sleep Tight.jpg";
|
return "gui/perks/Placebo Effect.jpg";
|
||||||
else if (int == 10)
|
else if (int == 10)
|
||||||
return "gui/perks/Economic Moves.jpg";
|
return "gui/perks/Economic Moves.jpg";
|
||||||
else if (int == 11)
|
else if (int == 11)
|
||||||
|
@ -2648,28 +2648,163 @@ string(float int) GetPerkImage =
|
||||||
string(float int) GetPerkDesc =
|
string(float int) GetPerkDesc =
|
||||||
{
|
{
|
||||||
if (int == 1)
|
if (int == 1)
|
||||||
return "Recoil is drastically reduced while lying down";
|
return "For those who like climbing into the trenches! This perk";
|
||||||
else if (int == 2)
|
else if (int == 2)
|
||||||
return "Makes enemies attack your friends instead of you";
|
return "Being a hero is overrated! You try your best to not look";
|
||||||
else if (int == 3)
|
else if (int == 3)
|
||||||
return "You can make enemies attack their friends";
|
return "Your black heart has a weird effect over the denizens of";
|
||||||
else if (int == 4)
|
else if (int == 4)
|
||||||
return "50% damage resist to area attacks while prone";
|
return "You know how to take cover! While prone, any attack that";
|
||||||
else if (int == 5)
|
else if (int == 5)
|
||||||
return "Aimed attacks get a damage bonus equal to Doctor skill";
|
return "You have gained in-depth knowledge of vital organs. Your";
|
||||||
else if (int == 6)
|
else if (int == 6)
|
||||||
return "This perk randomly functions as two perks";
|
return "The radiation has mutated your body slightly. A critical";
|
||||||
else if (int == 7)
|
else if (int == 7)
|
||||||
return "Provides you a few hassle-free seconds to escape danger";
|
return "For when your friend really, really needs that stimpack!";
|
||||||
else if (int == 8)
|
else if (int == 8)
|
||||||
return "Your skill levels surge in power from an unknown source";
|
return "You are haunted by the ghost of a wasteland wanderer who";
|
||||||
else if (int == 9)
|
else if (int == 9)
|
||||||
return "Paralyze anything with a sneak attack from a knife";
|
return "Through convincing acts you can force people (even you!)";
|
||||||
else if (int == 10)
|
else if (int == 10)
|
||||||
return "Suffer less time-related penalties for all actions";
|
return "You can move more effectively than most people. Movement";
|
||||||
else if (int == 11)
|
else if (int == 11)
|
||||||
return "Eat a small amount of radiation to heal yourself";
|
return "Your body has adapted to radiation to the point that you";
|
||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
string(float int) GetPerkDesc2 =
|
||||||
|
{
|
||||||
|
if (int == 1)
|
||||||
|
return "will drastically reduce recoil while lying down.";
|
||||||
|
else if (int == 2)
|
||||||
|
return "dangerous - making monsters attack your friends!";
|
||||||
|
else if (int == 3)
|
||||||
|
return "the wasteland - you can turn a few to your side!";
|
||||||
|
else if (int == 4)
|
||||||
|
return "is non-aimed deals much less damage to you.";
|
||||||
|
else if (int == 5)
|
||||||
|
return "aimed attacks get a damage bonus equal to Doctor skill.";
|
||||||
|
else if (int == 6)
|
||||||
|
return "hit no longer has quite the same sting it once had.";
|
||||||
|
else if (int == 7)
|
||||||
|
return "Provides you a few free seconds to escape danger.";
|
||||||
|
else if (int == 8)
|
||||||
|
return "sometimes takes over your body, boosting all skills.";
|
||||||
|
else if (int == 9)
|
||||||
|
return "to believe your stimpak is much better than it is.";
|
||||||
|
else if (int == 10)
|
||||||
|
return "actions suffer much less time-related penalties.";
|
||||||
|
else if (int == 11)
|
||||||
|
return "can absorb small amounts, healing you as well!";
|
||||||
|
else
|
||||||
|
return "";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
float(float iid) GetItemThreatLevel =
|
||||||
|
{
|
||||||
|
if (iid == IID_NONE)
|
||||||
|
return 0;
|
||||||
|
if (iid == IID_WP_KNIFE)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_SLEDGE)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_SPEAR)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_POWERAXE)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_USP)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_USP_S)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_GLOCK)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_GLOCK_S)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_DEAGLE)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_DEAGLE_M)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_NEEDLER)
|
||||||
|
return 3;
|
||||||
|
if (iid == IID_WP_ALIENBLASTER)
|
||||||
|
return 3;
|
||||||
|
if (iid == IID_WP_PIPERIFLE)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_WINCHESTER)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_MOSSBERG)
|
||||||
|
return 3;
|
||||||
|
if (iid == IID_WP_JACKHAMMER)
|
||||||
|
return 5;
|
||||||
|
if (iid == IID_WP_GREASEGUN)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_GREASEGUN_S)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_MP9)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_MP9_S)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_RANGEMASTER)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_RANGEMASTER_SCOPE)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_WP_AK112)
|
||||||
|
return 3;
|
||||||
|
if (iid == IID_WP_AK47)
|
||||||
|
return 3;
|
||||||
|
if (iid == IID_WP_AK112_M)
|
||||||
|
return 3;
|
||||||
|
if (iid == IID_WP_AK74)
|
||||||
|
return 5;
|
||||||
|
if (iid == IID_WP_ACR)
|
||||||
|
return 5;
|
||||||
|
if (iid == IID_WP_DKS1)
|
||||||
|
return 3;
|
||||||
|
if (iid == IID_WP_DKS1_S)
|
||||||
|
return 3;
|
||||||
|
if (iid == IID_WP_MOONLIGHT)
|
||||||
|
return 5;
|
||||||
|
if (iid == IID_WP_G11)
|
||||||
|
return 5;
|
||||||
|
if (iid == IID_WP_GAUSERIFLE)
|
||||||
|
return 7;
|
||||||
|
if (iid == IID_WP_PULSERIFLE)
|
||||||
|
return 7;
|
||||||
|
if (iid == IID_WP_TURBOPLASMA)
|
||||||
|
return 7;
|
||||||
|
if (iid == IID_WP_PLASMACARBINE)
|
||||||
|
return 7;
|
||||||
|
if (iid == IID_WP_FNFAL)
|
||||||
|
return 5;
|
||||||
|
if (iid == IID_WP_ROCKETLAUNCHER)
|
||||||
|
return 7;
|
||||||
|
if (iid == IID_WP_LASERGATLING)
|
||||||
|
return 7;
|
||||||
|
|
||||||
|
|
||||||
|
if (iid == IID_ARM_LEATHER)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_ARM_VANDAL)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_ARM_METAL)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_ARM_TESLA)
|
||||||
|
return 1;
|
||||||
|
if (iid == IID_ARM_COMBAT)
|
||||||
|
return 3;
|
||||||
|
if (iid == IID_ARM_SEVA)
|
||||||
|
return 3;
|
||||||
|
if (iid == IID_ARM_FORCE)
|
||||||
|
return 5;
|
||||||
|
if (iid == IID_ARM_LPOWER)
|
||||||
|
return 7;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// bprint(PRINT_MEDIUM, ftos(iid), " without a threat level!\n");
|
||||||
|
return 0;
|
||||||
};
|
};
|
|
@ -229,7 +229,7 @@ void() bomb_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 is a high-tech bomb.\n");
|
sprint(other, 2, "this is a high-tech bomb.\n");
|
||||||
if (other.class == 4)
|
if (other.skill_science > 0)
|
||||||
{
|
{
|
||||||
sprint(other, 2, "you may attempt to deactivate this\n");
|
sprint(other, 2, "you may attempt to deactivate this\n");
|
||||||
sprint(other, 2, "bomb by pressing your 'action' key\n");
|
sprint(other, 2, "bomb by pressing your 'action' key\n");
|
||||||
|
|
|
@ -1020,7 +1020,7 @@ void() brotherhood_soldier =
|
||||||
setsize (self, '-16 -16 -24', '16 16 32');
|
setsize (self, '-16 -16 -24', '16 16 32');
|
||||||
self.takedamage = DAMAGE_NO;
|
self.takedamage = DAMAGE_NO;
|
||||||
|
|
||||||
self.xslot1 = SlotVal(IID_AM_45ACP, 100);
|
self.xslot1 = SlotVal(IID_WP_SLEDGE, 1);
|
||||||
self.xslot2 = SlotVal(IID_AM_10MM, 100);
|
self.xslot2 = SlotVal(IID_AM_10MM, 100);
|
||||||
self.xslot3 = SlotVal(IID_AM_12GAUGESHELLS, 100);
|
self.xslot3 = SlotVal(IID_AM_12GAUGESHELLS, 100);
|
||||||
self.xslot4 = SlotVal(IID_AM_5MMHIGHVEL, 100);
|
self.xslot4 = SlotVal(IID_AM_5MMHIGHVEL, 100);
|
||||||
|
|
|
@ -79,176 +79,8 @@ void(float cost, float iid, float amount) BuyStackableMulti =
|
||||||
//finds existing grenades, otherwise, empty slot
|
//finds existing grenades, otherwise, empty slot
|
||||||
};
|
};
|
||||||
|
|
||||||
void() BuyBandages =
|
|
||||||
{
|
|
||||||
local string y;
|
|
||||||
|
|
||||||
if (self.ammo_shells < 2)
|
|
||||||
{
|
|
||||||
self.currentmenu = "none";
|
|
||||||
sprint(self, PRINT_HIGH, "not enough money.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.class != 2)
|
|
||||||
{
|
|
||||||
self.currentmenu = "none";
|
|
||||||
sprint(self, PRINT_HIGH, "not a medic.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.bandages >= 50)
|
|
||||||
{
|
|
||||||
self.currentmenu = "none";
|
|
||||||
sprint(self, PRINT_HIGH, "too many bandages.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
sound (self, CHAN_BODY, "misc/item1.wav", 1, ATTN_NORM);
|
|
||||||
self.bandages = self.bandages + 25;
|
|
||||||
self.ammo_shells = self.ammo_shells - 2;
|
|
||||||
if (self.bandages > 50)
|
|
||||||
self.bandages = 50;
|
|
||||||
y = ftos(self.bandages);
|
|
||||||
sprint(self, PRINT_HIGH, "you now have ");
|
|
||||||
sprint(self, PRINT_HIGH, y);
|
|
||||||
sprint(self, PRINT_HIGH, "/50 bandages.\n");
|
|
||||||
};
|
|
||||||
|
|
||||||
void(float cost, float type, float count) BuyChem =
|
|
||||||
{
|
|
||||||
local string chemname;
|
|
||||||
local float max;
|
|
||||||
local float alreadygot;
|
|
||||||
local float typex;
|
|
||||||
|
|
||||||
if (self.ammo_shells < cost)
|
|
||||||
{
|
|
||||||
self.currentmenu = "none";
|
|
||||||
sprint(self, PRINT_HIGH, "not enough money.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//only medics and engineers can buy superstims
|
|
||||||
if (type == IID_CHEM_SUPERSTIM && self.class != 1 && self.class != 4)
|
|
||||||
{
|
|
||||||
self.currentmenu = "none";
|
|
||||||
sprint(self, PRINT_HIGH, "you'll need a higher first aid skill\n");
|
|
||||||
sprint(self, PRINT_HIGH, "for authorization to purchase those.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//only medics and engineers can buy adrenaline
|
|
||||||
if (type == IID_CHEM_ADRENALINE && self.class != 1 && self.class != 4)
|
|
||||||
{
|
|
||||||
self.currentmenu = "none";
|
|
||||||
sprint(self, PRINT_HIGH, "you'll need a higher first aid skill\n");
|
|
||||||
sprint(self, PRINT_HIGH, "for authorization to purchase those.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//only medics can buy psycho
|
|
||||||
if (type == IID_CHEM_PSYCHO && self.class != 1)
|
|
||||||
{
|
|
||||||
self.currentmenu = "none";
|
|
||||||
sprint(self, PRINT_HIGH, "you'll need a higher first aid skill\n");
|
|
||||||
sprint(self, PRINT_HIGH, "for authorization to purchase those.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//only medics can buy berserk
|
|
||||||
if (type == IID_CHEM_BESERK && self.class != 1)
|
|
||||||
{
|
|
||||||
self.currentmenu = "none";
|
|
||||||
sprint(self, PRINT_HIGH, "you'll need a higher first aid skill\n");
|
|
||||||
sprint(self, PRINT_HIGH, "for authorization to purchase those.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//only medics can buy the doctor bag
|
|
||||||
if (type == IID_CHEM_MEDICALBAG && self.class != 1)
|
|
||||||
{
|
|
||||||
self.currentmenu = "none";
|
|
||||||
sprint(self, PRINT_HIGH, "you will need a higher doctor skill\n");
|
|
||||||
sprint(self, PRINT_HIGH, "for authorization to purchase those.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type == IID_CHEM_STIMPACK)
|
|
||||||
max = 4;
|
|
||||||
if (type == IID_CHEM_SUPERSTIM)
|
|
||||||
max = 1;
|
|
||||||
if (type == IID_CHEM_MEDICALBAG)
|
|
||||||
max = 50;
|
|
||||||
if (type == IID_CHEM_ADRENALINE)
|
|
||||||
max = 25;
|
|
||||||
if (type == IID_CHEM_PSYCHO)
|
|
||||||
max = 25;
|
|
||||||
if (type == IID_CHEM_BESERK)
|
|
||||||
max = 25;
|
|
||||||
if (type == IID_CHEM_RADX)
|
|
||||||
max = 5;
|
|
||||||
|
|
||||||
if (self.class == 1)
|
|
||||||
max = max + 1;
|
|
||||||
|
|
||||||
if (ToIID(self.islot4) == IID_EQUIP_MEDIC_BAG)
|
|
||||||
max = max * 2;
|
|
||||||
|
|
||||||
alreadygot = TotalQuantity(self, type);
|
|
||||||
if (alreadygot >= max)
|
|
||||||
{
|
|
||||||
self.currentmenu = "none";
|
|
||||||
sprint(self, PRINT_HIGH, "you can't hold any more of those chems.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//can only carry two types of chem
|
|
||||||
typex = 0;
|
|
||||||
if (SlotOfItem(self, IID_CHEM_STIMPACK) > 0)
|
|
||||||
typex = typex + 1;
|
|
||||||
if (SlotOfItem(self, IID_CHEM_SUPERSTIM) > 0)
|
|
||||||
typex = typex + 1;
|
|
||||||
if (SlotOfItem(self, IID_CHEM_MEDICALBAG) > 0)
|
|
||||||
typex = typex + 1;
|
|
||||||
if (SlotOfItem(self, IID_CHEM_ADRENALINE) > 0)
|
|
||||||
typex = typex + 1;
|
|
||||||
if (SlotOfItem(self, IID_CHEM_PSYCHO) > 0)
|
|
||||||
typex = typex + 1;
|
|
||||||
if (SlotOfItem(self, IID_CHEM_BESERK) > 0)
|
|
||||||
typex = typex + 1;
|
|
||||||
if (SlotOfItem(self, IID_CHEM_RADX) > 0)
|
|
||||||
typex = typex + 1;
|
|
||||||
|
|
||||||
max = 2;
|
|
||||||
|
|
||||||
if (self.class == 1)
|
|
||||||
max = 4;
|
|
||||||
if (ToIID(self.islot4) == IID_EQUIP_MEDIC_BAG)
|
|
||||||
max = 4;
|
|
||||||
|
|
||||||
if (typex >= max)
|
|
||||||
{
|
|
||||||
self.currentmenu = "none";
|
|
||||||
sprint(self, PRINT_HIGH, "only authorized to carry ");
|
|
||||||
if (max == 2)
|
|
||||||
sprint(self, PRINT_HIGH, "two types of chems (non-medic)\n");
|
|
||||||
else
|
|
||||||
sprint(self, PRINT_HIGH, "four types of chems (medic)\n");
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!TryGiveStackable(self, type, count))
|
|
||||||
{
|
|
||||||
sprint(self, 2, "full inventory.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
sound (self, CHAN_BODY, "misc/item1.wav", 1, ATTN_NORM);
|
|
||||||
self.ammo_shells = self.ammo_shells - cost;
|
|
||||||
chemname = GetItemName(type);
|
|
||||||
sprint(self, PRINT_HIGH, chemname);
|
|
||||||
sprint(self, PRINT_HIGH, " purchased.\n");
|
|
||||||
};
|
|
||||||
|
|
||||||
void(string type) ChangeAmmo =
|
void(string type) ChangeAmmo =
|
||||||
{
|
{
|
||||||
|
@ -452,394 +284,6 @@ void() W_PlayerMenu =
|
||||||
|
|
||||||
if (self.currentmenu == "none")
|
if (self.currentmenu == "none")
|
||||||
return;
|
return;
|
||||||
else if (self.currentmenu == "shop_list")
|
|
||||||
{
|
|
||||||
if (self.impulse == 1)
|
|
||||||
self.currentmenu = "shop_perk1";
|
|
||||||
if (self.impulse == 2)
|
|
||||||
self.currentmenu = "shop_perk2";
|
|
||||||
if (self.impulse == 3)
|
|
||||||
self.currentmenu = "shop_armor";
|
|
||||||
if (self.impulse == 4)
|
|
||||||
self.currentmenu = "shop_ammo";
|
|
||||||
if (self.impulse == 5)
|
|
||||||
self.currentmenu = "shop_weapons";
|
|
||||||
if (self.impulse == 6)
|
|
||||||
self.currentmenu = "shop_equipment";
|
|
||||||
if (self.impulse == 7)
|
|
||||||
self.currentmenu = "shop_chems";
|
|
||||||
if (self.impulse == 8)
|
|
||||||
self.currentmenu = "shop_other";
|
|
||||||
|
|
||||||
DisplayMenu();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (self.currentmenu == "shop_perk1")
|
|
||||||
{
|
|
||||||
if (self.impulse == 1)
|
|
||||||
BuyPerk(1, 1, 1);
|
|
||||||
if (self.impulse == 2)
|
|
||||||
BuyPerk(1, 2, 1);
|
|
||||||
if (self.impulse == 3)
|
|
||||||
BuyPerk(1, 3, 1);
|
|
||||||
if (self.impulse == 4)
|
|
||||||
BuyPerk(2, 4, 1);
|
|
||||||
if (self.impulse == 5)
|
|
||||||
BuyPerk(2, 5, 1);
|
|
||||||
if (self.impulse == 6)
|
|
||||||
BuyPerk(2, 6, 1);
|
|
||||||
if (self.impulse == 7)
|
|
||||||
BuyPerk(2, 7, 1);
|
|
||||||
if (self.impulse == 8)
|
|
||||||
BuyPerk(3, 8, 1);
|
|
||||||
if (self.impulse == 9)
|
|
||||||
BuyPerk(4, 9, 1);
|
|
||||||
if (self.impulse == 10)
|
|
||||||
BuyPerk(4, 10, 1);
|
|
||||||
if (self.impulse == 212)
|
|
||||||
BuyPerk(4, 11, 1);
|
|
||||||
if (self.impulse == 213)
|
|
||||||
BuyPerk(4, 12, 1);
|
|
||||||
if (self.impulse == 214)
|
|
||||||
BuyPerk(4, 13, 1);
|
|
||||||
if (self.impulse == 215)
|
|
||||||
BuyPerk(4, 14, 1);
|
|
||||||
if (self.impulse == 216)
|
|
||||||
BuyPerk(4, 15, 1);
|
|
||||||
if (self.impulse == 217)
|
|
||||||
BuyPerk(4, 16, 1);
|
|
||||||
if (self.impulse == 218)
|
|
||||||
BuyPerk(4, 17, 1);
|
|
||||||
if (self.impulse == 219)
|
|
||||||
BuyPerk(4, 18, 1);
|
|
||||||
if (self.impulse == 220)
|
|
||||||
BuyPerk(4, 19, 1);
|
|
||||||
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.currentmenu == "shop_perk2")
|
|
||||||
{
|
|
||||||
if (self.impulse == 1)
|
|
||||||
BuyPerk(1, 1, 2);
|
|
||||||
if (self.impulse == 2)
|
|
||||||
BuyPerk(1, 2, 2);
|
|
||||||
if (self.impulse == 3)
|
|
||||||
BuyPerk(1, 3, 2);
|
|
||||||
if (self.impulse == 4)
|
|
||||||
BuyPerk(2, 4, 2);
|
|
||||||
if (self.impulse == 5)
|
|
||||||
BuyPerk(2, 5, 2);
|
|
||||||
if (self.impulse == 6)
|
|
||||||
BuyPerk(2, 6, 2);
|
|
||||||
if (self.impulse == 7)
|
|
||||||
BuyPerk(2, 7, 2);
|
|
||||||
if (self.impulse == 8)
|
|
||||||
BuyPerk(3, 8, 2);
|
|
||||||
if (self.impulse == 9)
|
|
||||||
BuyPerk(4, 9, 2);
|
|
||||||
if (self.impulse == 10)
|
|
||||||
BuyPerk(4, 10, 2);
|
|
||||||
if (self.impulse == 212)
|
|
||||||
BuyPerk(4, 11, 2);
|
|
||||||
if (self.impulse == 213)
|
|
||||||
BuyPerk(4, 12, 2);
|
|
||||||
if (self.impulse == 214)
|
|
||||||
BuyPerk(4, 13, 2);
|
|
||||||
if (self.impulse == 215)
|
|
||||||
BuyPerk(4, 14, 2);
|
|
||||||
if (self.impulse == 216)
|
|
||||||
BuyPerk(4, 15, 2);
|
|
||||||
if (self.impulse == 217)
|
|
||||||
BuyPerk(4, 16, 2);
|
|
||||||
if (self.impulse == 218)
|
|
||||||
BuyPerk(4, 17, 2);
|
|
||||||
if (self.impulse == 219)
|
|
||||||
BuyPerk(4, 18, 2);
|
|
||||||
if (self.impulse == 220)
|
|
||||||
BuyPerk(4, 19, 2);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (self.currentmenu == "shop_ammo" && world.map_obj != 4)
|
|
||||||
{
|
|
||||||
if (self.impulse == 1)
|
|
||||||
BuyStackableMulti(15,IID_AM_10MM,50);
|
|
||||||
if (self.impulse == 2)
|
|
||||||
BuyStackableMulti(25,IID_AM_12GAUGESHELLS,50);
|
|
||||||
if (self.impulse == 3)
|
|
||||||
BuyStackableMulti(30,IID_AM_44MAGNUM,50);
|
|
||||||
if (self.impulse == 4)
|
|
||||||
BuyStackableMulti(20,IID_AM_45ACP,50);
|
|
||||||
if (self.impulse == 5)
|
|
||||||
BuyStackableMulti(30,IID_AM_556MM,50);
|
|
||||||
if (self.impulse == 6)
|
|
||||||
BuyStackableMulti(25,IID_AM_5MMHIGHVEL,50);
|
|
||||||
if (self.impulse == 7)
|
|
||||||
BuyStackableMulti(40,IID_AM_762MM,50);
|
|
||||||
if (self.impulse == 8)
|
|
||||||
BuyStackableMulti(35,IID_AM_NEEDLER,50);
|
|
||||||
if (self.impulse == 9)
|
|
||||||
BuyStackableMulti(40,IID_AM_CASELESS, 50);
|
|
||||||
if (self.impulse == 10)
|
|
||||||
BuyStackableMulti(55,IID_AM_ENERGYCELL,50);
|
|
||||||
|
|
||||||
if (random() < 0.5)
|
|
||||||
sound (self, CHAN_BODY, "misc/item1.wav", 1, ATTN_NORM);
|
|
||||||
else
|
|
||||||
sound (self, CHAN_BODY, "misc/item2.wav", 1, ATTN_NORM);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (self.currentmenu == "shop_ammo" && world.map_obj == 4)
|
|
||||||
{
|
|
||||||
if (self.impulse == 1)
|
|
||||||
BuyStackableMulti(5,IID_AM_10MM,50);
|
|
||||||
if (self.impulse == 2)
|
|
||||||
BuyStackableMulti(8,IID_AM_12GAUGESHELLS,50);
|
|
||||||
if (self.impulse == 3)
|
|
||||||
BuyStackableMulti(10,IID_AM_44MAGNUM,50);
|
|
||||||
if (self.impulse == 4)
|
|
||||||
BuyStackableMulti(7,IID_AM_45ACP,50);
|
|
||||||
if (self.impulse == 5)
|
|
||||||
BuyStackableMulti(10,IID_AM_556MM,50);
|
|
||||||
if (self.impulse == 6)
|
|
||||||
BuyStackableMulti(8,IID_AM_5MMHIGHVEL,50);
|
|
||||||
if (self.impulse == 7)
|
|
||||||
BuyStackableMulti(15,IID_AM_762MM,50);
|
|
||||||
if (self.impulse == 8)
|
|
||||||
BuyStackableMulti(10,IID_AM_NEEDLER,50);
|
|
||||||
if (self.impulse == 9)
|
|
||||||
BuyStackableMulti(20,IID_AM_CASELESS, 50);
|
|
||||||
if (self.impulse == 10)
|
|
||||||
BuyStackableMulti(15,IID_AM_ENERGYCELL,50);
|
|
||||||
|
|
||||||
if (random() < 0.5)
|
|
||||||
sound (self, CHAN_BODY, "misc/item1.wav", 1, ATTN_NORM);
|
|
||||||
else
|
|
||||||
sound (self, CHAN_BODY, "misc/item2.wav", 1, ATTN_NORM);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (self.currentmenu == "shop_weapons")
|
|
||||||
{
|
|
||||||
if (self.impulse == 1)
|
|
||||||
self.currentmenu = "shop_melee";
|
|
||||||
if (self.impulse == 2)
|
|
||||||
self.currentmenu = "shop_thrown";
|
|
||||||
if (self.impulse == 3)
|
|
||||||
self.currentmenu = "shop_pistols";
|
|
||||||
if (self.impulse == 4)
|
|
||||||
self.currentmenu = "shop_shotguns";
|
|
||||||
if (self.impulse == 5)
|
|
||||||
self.currentmenu = "shop_rifles";
|
|
||||||
if (self.impulse == 6)
|
|
||||||
self.currentmenu = "shop_heavy";
|
|
||||||
|
|
||||||
DisplayMenu();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (self.currentmenu == "shop_melee")
|
|
||||||
{
|
|
||||||
if (self.impulse == 1)
|
|
||||||
BuyWeapon(1, 6, IID_WP_KNIFE); //weight, cost, item
|
|
||||||
if (self.impulse == 2)
|
|
||||||
BuyWeapon(3, 8, IID_WP_WRENCH); //weight, cost, item
|
|
||||||
if (self.impulse == 3)
|
|
||||||
BuyWeapon(8, 9, IID_WP_SLEDGE); //weight, cost, item
|
|
||||||
if (self.impulse == 4)
|
|
||||||
BuyWeapon(4, 12, IID_WP_SPEAR); //weight, cost, item
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (self.currentmenu == "shop_thrown")
|
|
||||||
{
|
|
||||||
if (self.impulse == 1)
|
|
||||||
BuyStackableMulti(8, IID_GREN_FLASH, 1); //weight, cost, item
|
|
||||||
if (self.impulse == 2)
|
|
||||||
BuyStackableMulti(12, IID_GREN_FRAG, 1); //weight, cost, item
|
|
||||||
if (self.impulse == 3)
|
|
||||||
BuyStackableMulti(1, IID_GREN_FLARE, 1); //weight, cost, item
|
|
||||||
if (self.impulse == 4)
|
|
||||||
BuyStackableMulti(2, IID_MISC_HMXCOMPOUND, 1); //weight, cost, item
|
|
||||||
if (self.impulse == 5)
|
|
||||||
BuyStackableMulti(2, IID_MISC_RDXCRYSTAL, 1); //weight, cost, item
|
|
||||||
if (self.impulse == 6)
|
|
||||||
BuyStackableMulti(10, IID_AM_ROCKET, 1); //weight, cost, item
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (self.currentmenu == "shop_pistols")
|
|
||||||
{
|
|
||||||
if (self.impulse == 1)
|
|
||||||
BuyWeapon(1, 50, IID_WP_USP); //weight, cost, item
|
|
||||||
if (self.impulse == 2)
|
|
||||||
BuyWeapon(2, 70, IID_WP_DEAGLE); //weight, cost, item
|
|
||||||
if (self.impulse == 3)
|
|
||||||
BuyWeapon(1, 40, IID_WP_GLOCK); //weight, cost, item
|
|
||||||
if (self.impulse == 4)
|
|
||||||
BuyWeapon(2, 120, IID_WP_NEEDLER); //weight, cost, item
|
|
||||||
if (self.impulse == 5)
|
|
||||||
BuyWeapon(3, 170, IID_WP_MP9); //weight, cost, item
|
|
||||||
if (self.impulse == 6)
|
|
||||||
BuyWeapon(3, 150, IID_WP_GREASEGUN); //weight, cost, item
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (self.currentmenu == "shop_shotguns")
|
|
||||||
{
|
|
||||||
if (self.impulse == 1)
|
|
||||||
BuyWeapon(3, 15, IID_WP_PIPERIFLE); //weight, cost, item
|
|
||||||
if (self.impulse == 2)
|
|
||||||
BuyWeapon(4, 60, IID_WP_WINCHESTER); //weight, cost, item
|
|
||||||
if (self.impulse == 3)
|
|
||||||
BuyWeapon(5, 240, IID_WP_MOSSBERG); //weight, cost, item
|
|
||||||
if (self.impulse == 4)
|
|
||||||
BuyWeapon(7, 350, IID_WP_JACKHAMMER); //weight, cost, item
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (self.currentmenu == "shop_rifles")
|
|
||||||
{
|
|
||||||
if (self.impulse == 1)
|
|
||||||
BuyWeapon(3, 110, IID_WP_RANGEMASTER); //weight, cost, item
|
|
||||||
if (self.impulse == 2)
|
|
||||||
BuyWeapon(4, 180, IID_WP_AK112); //weight, cost, item
|
|
||||||
if (self.impulse == 3)
|
|
||||||
BuyWeapon(8, 190, IID_WP_FNFAL); //weight, cost, item
|
|
||||||
if (self.impulse == 4)
|
|
||||||
BuyWeapon(9, 270, IID_WP_DKS1); //weight, cost, item
|
|
||||||
if (self.impulse == 5)
|
|
||||||
BuyWeapon(5, 280, IID_WP_MOONLIGHT); //weight, cost, item
|
|
||||||
if (self.impulse == 6)
|
|
||||||
BuyWeapon(6, 220, IID_WP_G11); //weight, cost, item
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (self.currentmenu == "shop_heavy")
|
|
||||||
{
|
|
||||||
if (self.impulse == 1)
|
|
||||||
BuyWeapon(10, 650, IID_WP_ROCKETLAUNCHER); //weight, cost, item
|
|
||||||
if (self.impulse == 2)
|
|
||||||
BuyWeapon(7, 550, IID_WP_GAUSERIFLE); //weight, cost, item
|
|
||||||
if (self.impulse == 3)
|
|
||||||
BuyWeapon(2, 250, IID_WP_ALIENBLASTER); //weight, cost, item
|
|
||||||
if (self.impulse == 4)
|
|
||||||
BuyWeapon(11, 450, IID_WP_PULSERIFLE); //weight, cost, item
|
|
||||||
if (self.impulse == 5)
|
|
||||||
BuyWeapon(8, 550, IID_WP_PLASMACARBINE); //weight, cost, item
|
|
||||||
if (self.impulse == 6)
|
|
||||||
BuyWeapon(25, 650, IID_WP_LASERGATLING); //weight, cost, item
|
|
||||||
}
|
|
||||||
else if (self.currentmenu == "shop_equipment")
|
|
||||||
{
|
|
||||||
if (self.impulse == 1)
|
|
||||||
BuyEquipment(5, IID_EQUIP_MEDIC_BAG); //cost, item
|
|
||||||
if (self.impulse == 2)
|
|
||||||
BuyEquipment(5, IID_EQUIP_GOGGLES); //cost, item
|
|
||||||
if (self.impulse == 3)
|
|
||||||
BuyEquipment(5, IID_EQUIP_STEALTHBOY); //cost, item
|
|
||||||
if (self.impulse == 4)
|
|
||||||
BuyEquipment(5, IID_EQUIP_BELTPOUCH); //cost, item
|
|
||||||
if (self.impulse == 5)
|
|
||||||
BuyEquipment(5, IID_EQUIP_BACKPACK); //cost, item
|
|
||||||
if (self.impulse == 6)
|
|
||||||
BuyEquipment(5, IID_EQUIP_TOOLKIT); //cost, item
|
|
||||||
if (self.impulse == 7)
|
|
||||||
BuyEquipment(5, IID_EQUIP_CLIMBINGGEAR); //cost, item
|
|
||||||
if (self.impulse == 8)
|
|
||||||
BuyEquipment(5, IID_EQUIP_BATTERY); //cost, item
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (self.currentmenu == "shop_chems")
|
|
||||||
{
|
|
||||||
if (self.impulse == 1)
|
|
||||||
BuyChem(5, IID_CHEM_STIMPACK, 1); //cost, item
|
|
||||||
if (self.impulse == 2)
|
|
||||||
BuyChem(15, IID_CHEM_RADX, 5); //cost, item
|
|
||||||
if (self.impulse == 3)
|
|
||||||
BuyChem(15, IID_CHEM_ADRENALINE, 25); //cost, item
|
|
||||||
if (self.impulse == 4)
|
|
||||||
BuyChem(25, IID_CHEM_MEDICALBAG, 100); //cost, item
|
|
||||||
if (self.impulse == 5)
|
|
||||||
BuyChem(25, IID_CHEM_SUPERSTIM, 1); //cost, item
|
|
||||||
if (self.impulse == 6)
|
|
||||||
BuyChem(25, IID_CHEM_PSYCHO, 25); //cost, item
|
|
||||||
if (self.impulse == 7)
|
|
||||||
BuyChem(25, IID_CHEM_BESERK, 25); //cost, item
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (self.currentmenu == "shop_other")
|
|
||||||
{
|
|
||||||
if (self.impulse == 1)
|
|
||||||
BuyStackableMulti(1, IID_MISC_JUNK, 1); //weight, cost, item
|
|
||||||
if (self.impulse == 2)
|
|
||||||
BuyStackableMulti(1, IID_MISC_NUKACOLA, 1); //weight, cost, item
|
|
||||||
if (self.impulse == 3)
|
|
||||||
BuyStackableMulti(2, IID_MISC_CHEMICALS, 1); //weight, cost, item
|
|
||||||
if (self.impulse == 4)
|
|
||||||
BuyStackableMulti(2, IID_MISC_AEROSOL, 1); //weight, cost, item
|
|
||||||
if (self.impulse == 5)
|
|
||||||
BuyStackableMulti(5, IID_MISC_CIRCUITBOARD, 1); //weight, cost, item
|
|
||||||
if (self.impulse == 6)
|
|
||||||
BuyStackableMulti(3, IID_MISC_STEELPIPE, 1); //weight, cost, item
|
|
||||||
if (self.impulse == 7)
|
|
||||||
BuyStackableMulti(1, IID_MISC_DUCKTAPE, 1); //weight, cost, item
|
|
||||||
if (self.impulse == 8)
|
|
||||||
BuyStackableMulti(1, IID_MISC_GUM, 1); //weight, cost, item
|
|
||||||
if (self.impulse == 9)
|
|
||||||
BuyStackableMulti(1, IID_MISC_COPPERWIRE, 1); //weight, cost, item
|
|
||||||
if (self.impulse == 10)
|
|
||||||
BuyStackableMulti(7, IID_MISC_XRAYTUBE, 1); //weight, cost, item
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (self.currentmenu == "gain_skill")
|
|
||||||
{
|
|
||||||
if (self.impulse == 1)
|
|
||||||
{
|
|
||||||
self.missionbrief = 2;
|
|
||||||
sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM);
|
|
||||||
self.currentmenu = "none";
|
|
||||||
self.tclass = 1;
|
|
||||||
self.currentmenu = "confirm_skill";
|
|
||||||
self.ghost = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ((self.impulse == 2))
|
|
||||||
{
|
|
||||||
self.missionbrief = 2;
|
|
||||||
sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM);
|
|
||||||
self.currentmenu = "none";
|
|
||||||
self.tclass = 2;
|
|
||||||
self.currentmenu = "confirm_skill";
|
|
||||||
self.ghost = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.impulse == 3)
|
|
||||||
{
|
|
||||||
self.missionbrief = 2;
|
|
||||||
sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM);
|
|
||||||
self.currentmenu = "none";
|
|
||||||
self.tclass = 3;
|
|
||||||
self.currentmenu = "confirm_skill";
|
|
||||||
self.ghost = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.impulse == 4)
|
|
||||||
{
|
|
||||||
self.missionbrief = 2;
|
|
||||||
sound (self, CHAN_WEAPON, "player/yourturn.wav", TRUE, ATTN_NORM);
|
|
||||||
self.currentmenu = "none";
|
|
||||||
self.tclass = 4;
|
|
||||||
self.currentmenu = "confirm_skill";
|
|
||||||
self.ghost = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
else if (self.currentmenu == "display_enter_screen")
|
else if (self.currentmenu == "display_enter_screen")
|
||||||
|
|
|
@ -87,8 +87,54 @@ void () player_duck = [ 45, player_run ]
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void () CrawlSound =
|
||||||
|
{
|
||||||
|
local float rand;
|
||||||
|
local float r;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
rand = random ();
|
||||||
|
|
||||||
|
if (self.sneak != 0)
|
||||||
|
return;
|
||||||
|
if (self.velocity == '0 0 0')
|
||||||
|
{
|
||||||
|
self.crawltime = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
self.attack_finished = time + 1;
|
||||||
|
self.rtime = time + 1;
|
||||||
|
|
||||||
|
|
||||||
|
r = 1 - (self.skill_sneak/40);
|
||||||
|
|
||||||
|
if ((rand < 0.25))
|
||||||
|
sound (self, CHAN_ITEM, "player/prone1.wav", r, ATTN_NORM);
|
||||||
|
else if ((rand < 0.5))
|
||||||
|
sound (self, CHAN_ITEM, "player/prone2.wav", r, ATTN_NORM);
|
||||||
|
else if ((rand < 0.75))
|
||||||
|
sound (self, CHAN_ITEM, "player/prone3.wav", r, ATTN_NORM);
|
||||||
|
else
|
||||||
|
sound (self, CHAN_ITEM, "player/prone4.wav", r, ATTN_NORM);
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
void () player_lay = [ 45, player_run ]
|
void () player_lay = [ 45, player_run ]
|
||||||
{
|
{
|
||||||
|
self.crawltime = self.crawltime - 1;
|
||||||
|
|
||||||
|
if (self.crawltime <= 0)
|
||||||
|
{
|
||||||
|
CrawlSound();
|
||||||
|
self.crawltime = 8;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void () player_single_shot = [ 89, player_single_shot2 ]{};
|
void () player_single_shot = [ 89, player_single_shot2 ]{};
|
||||||
|
|
|
@ -179,9 +179,8 @@ void() sham_melee =
|
||||||
local float chance;
|
local float chance;
|
||||||
|
|
||||||
chance = random();
|
chance = random();
|
||||||
if (self.class == 3)
|
|
||||||
sham_smash1 ();
|
if (chance > 0.5)
|
||||||
else if (self.class == 5 && chance > 0.3)
|
|
||||||
sham_swingr1 ();
|
sham_swingr1 ();
|
||||||
else
|
else
|
||||||
sham_swingl1 ();
|
sham_swingl1 ();
|
||||||
|
@ -521,7 +520,6 @@ void() monster_shambler =
|
||||||
|
|
||||||
if (random() < 0.001)//shambler warrior
|
if (random() < 0.001)//shambler warrior
|
||||||
{
|
{
|
||||||
self.class = 3;
|
|
||||||
self.solid = SOLID_SLIDEBOX;
|
self.solid = SOLID_SLIDEBOX;
|
||||||
self.movetype = MOVETYPE_STEP;
|
self.movetype = MOVETYPE_STEP;
|
||||||
setmodel (self, "progs/shambler.mdl");
|
setmodel (self, "progs/shambler.mdl");
|
||||||
|
@ -539,7 +537,6 @@ void() monster_shambler =
|
||||||
}
|
}
|
||||||
else //shambler shaman
|
else //shambler shaman
|
||||||
{
|
{
|
||||||
self.class = 5;
|
|
||||||
self.solid = SOLID_SLIDEBOX;
|
self.solid = SOLID_SLIDEBOX;
|
||||||
self.movetype = MOVETYPE_STEP;
|
self.movetype = MOVETYPE_STEP;
|
||||||
setmodel (self, "progs/shambler.mdl");
|
setmodel (self, "progs/shambler.mdl");
|
||||||
|
|
|
@ -1706,7 +1706,7 @@ void () monster_army =
|
||||||
self.max_health = 80;
|
self.max_health = 80;
|
||||||
self.health = self.max_health;
|
self.health = self.max_health;
|
||||||
self.team = 3;
|
self.team = 3;
|
||||||
self.islot3 = SlotVal(IID_ARM_LEATHER, 1);
|
self.islot3 = SlotVal(IID_ARM_LEATHER, 1);
|
||||||
self.armortype = 0.2;
|
self.armortype = 0.2;
|
||||||
self.armornoise = "misc/thud.wav";
|
self.armornoise = "misc/thud.wav";
|
||||||
self.th_stand = army_stand1;
|
self.th_stand = army_stand1;
|
||||||
|
@ -1732,8 +1732,8 @@ void () monster_army =
|
||||||
|
|
||||||
//soldiers have either pistol, smg, shotgun or rifle
|
//soldiers have either pistol, smg, shotgun or rifle
|
||||||
|
|
||||||
if (random()*100 >= 80)
|
if (random()*100 >= 50)
|
||||||
self.weapon = ceil(random()*4);
|
self.weapon = 4;
|
||||||
else
|
else
|
||||||
self.weapon = 2;
|
self.weapon = 2;
|
||||||
|
|
||||||
|
@ -1901,7 +1901,7 @@ void () monster_commander =
|
||||||
setsize (self, '-12 -12 -24', '12 12 32');
|
setsize (self, '-12 -12 -24', '12 12 32');
|
||||||
self.max_health = 200;
|
self.max_health = 200;
|
||||||
self.health = self.max_health;
|
self.health = self.max_health;
|
||||||
self.islot3 = SlotVal(IID_ARM_COMBAT, 1);
|
self.islot3 = SlotVal(IID_ARM_COMBAT, 1);
|
||||||
self.armortype = 0.5;
|
self.armortype = 0.5;
|
||||||
self.helmet = 1;
|
self.helmet = 1;
|
||||||
self.th_stand = enf_stand1;
|
self.th_stand = enf_stand1;
|
||||||
|
|
|
@ -102,6 +102,49 @@ float() crandom =
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
float (entity healer, entity saved) RevivePlayer =
|
||||||
|
{
|
||||||
|
local entity oself;
|
||||||
|
oself = self;
|
||||||
|
|
||||||
|
self = saved;
|
||||||
|
/* if (!walkmove(0, 0))
|
||||||
|
{
|
||||||
|
//too close?
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
saved.deadflag = DEAD_NO;
|
||||||
|
saved.takedamage = DAMAGE_AIM;
|
||||||
|
saved.movetype = MOVETYPE_WALK;
|
||||||
|
// saved.solid = SOLID_NOT;
|
||||||
|
|
||||||
|
self = oself;
|
||||||
|
|
||||||
|
// saved.materialize = 200;
|
||||||
|
saved.ghost = 0;
|
||||||
|
saved.health = 20 + (healer.skill_doctor);
|
||||||
|
saved.air_finished = time + 10;
|
||||||
|
saved.view_ofs = '0 0 22';
|
||||||
|
self = saved;
|
||||||
|
player_run();
|
||||||
|
self = oself;
|
||||||
|
stuffcmd(saved, "impulse 1\n");
|
||||||
|
if (healer.classname == "player")
|
||||||
|
{
|
||||||
|
sprint (healer, PRINT_HIGH, "you revive ");
|
||||||
|
sprint (healer, PRINT_HIGH, trace_ent.netname);
|
||||||
|
sprint (healer, PRINT_HIGH, ".\n ");
|
||||||
|
}
|
||||||
|
sprint (saved, PRINT_HIGH, healer.netname);
|
||||||
|
sprint (saved, PRINT_HIGH, " saves you from death.\n");
|
||||||
|
saved.view2 = world;
|
||||||
|
|
||||||
|
saved.flags (-) FL_FINDABLE_NONSOLID;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
void() healing_bob =
|
void() healing_bob =
|
||||||
{
|
{
|
||||||
|
@ -142,6 +185,36 @@ void (entity spot) spawn_healing =
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void () heart_think =
|
||||||
|
{
|
||||||
|
self.cnt = self.cnt - 1;
|
||||||
|
setorigin (self, (self.owner.origin + '0 0 48'));
|
||||||
|
self.nextthink = (time + 0.01);
|
||||||
|
if (self.cnt <= 0)
|
||||||
|
remove (self);
|
||||||
|
|
||||||
|
if (self.owner.charmed <= 0)
|
||||||
|
remove(self);
|
||||||
|
};
|
||||||
|
|
||||||
|
void (entity jeb, float length) spawn_heart =
|
||||||
|
{
|
||||||
|
local entity hologram;
|
||||||
|
|
||||||
|
hologram = spawn ();
|
||||||
|
hologram.movetype = MOVETYPE_NONE;
|
||||||
|
hologram.solid = SOLID_NOT;
|
||||||
|
hologram.owner = jeb;
|
||||||
|
setmodel (hologram, "progs/heart.spr");
|
||||||
|
setorigin (hologram, jeb.origin + '0 0 48');
|
||||||
|
setsize (hologram, VEC_ORIGIN, VEC_ORIGIN);
|
||||||
|
hologram.angles = jeb.angles;
|
||||||
|
hologram.colormap = jeb.colormap;
|
||||||
|
hologram.cnt = 100*length;
|
||||||
|
hologram.think = heart_think;
|
||||||
|
hologram.nextthink = (time + 0.01);
|
||||||
|
};
|
||||||
|
|
||||||
void () disappear =
|
void () disappear =
|
||||||
{
|
{
|
||||||
local entity te;
|
local entity te;
|
||||||
|
@ -150,35 +223,14 @@ void () disappear =
|
||||||
//other players
|
//other players
|
||||||
|
|
||||||
|
|
||||||
te = findradius(self.origin, 600);
|
te = findradius(self.origin, 6000);
|
||||||
while (te)
|
while (te)
|
||||||
{
|
{
|
||||||
if (te.classname == "player" && te.sneak == 0 && te != self)
|
if (te.enemy == self)
|
||||||
nearby = 1;
|
te.enemy = world;
|
||||||
|
|
||||||
te = te.chain;
|
te = te.chain;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nearby == 1)
|
|
||||||
{
|
|
||||||
te = findradius(self.origin, 1000);
|
|
||||||
while (te)
|
|
||||||
{
|
|
||||||
if (te.enemy == self)
|
|
||||||
te.enemy = world;
|
|
||||||
|
|
||||||
te = te.chain;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
te = findradius(self.origin, 1000);
|
|
||||||
while (te)
|
|
||||||
{
|
|
||||||
if (te.enemy == self)
|
|
||||||
te.enemy = world;
|
|
||||||
|
|
||||||
te = te.chain;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void () puppet_master =
|
void () puppet_master =
|
||||||
|
@ -194,10 +246,10 @@ void () puppet_master =
|
||||||
{
|
{
|
||||||
if (te.classname == "monster" && (charm_monster == 0) && (visible(te)))
|
if (te.classname == "monster" && (charm_monster == 0) && (visible(te)))
|
||||||
{
|
{
|
||||||
spawn_excla(te, 60);
|
spawn_heart(te, 300);
|
||||||
charm_monster = 1;
|
charm_monster = 1;
|
||||||
te.friend = self;
|
te.friend = self;
|
||||||
te.charmed = 1;
|
te.charmed = 300;
|
||||||
te.enemy = world;
|
te.enemy = world;
|
||||||
te.goalentity = self;
|
te.goalentity = self;
|
||||||
self.friend = te;
|
self.friend = te;
|
||||||
|
@ -207,6 +259,108 @@ void () puppet_master =
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void () illusion_heal =
|
||||||
|
{
|
||||||
|
local float x, found;
|
||||||
|
local vector source;
|
||||||
|
local entity thing, te;
|
||||||
|
|
||||||
|
|
||||||
|
if (self.attack_finished > time)
|
||||||
|
return;
|
||||||
|
|
||||||
|
te = findradius (self.origin, 100);
|
||||||
|
while (te)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (found == 0 && te.classname == "player" && te.deadflag)
|
||||||
|
{
|
||||||
|
sound (trace_ent, CHAN_BODY, "items/r_item2.wav", 1, ATTN_NORM);
|
||||||
|
RevivePlayer(self, te);
|
||||||
|
spawn_healing(te);
|
||||||
|
spawn_healing(te);
|
||||||
|
spawn_healing(te);
|
||||||
|
spawn_healing(te);
|
||||||
|
spawn_healing(te);
|
||||||
|
spawn_healing(te);
|
||||||
|
found = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
te = te.chain;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (found == 1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
self.attack_finished = time + 1;
|
||||||
|
self.rtime = time + 1;
|
||||||
|
|
||||||
|
makevectors (self.v_angle);
|
||||||
|
source = self.origin + '0 0 0';
|
||||||
|
traceline (source, source + v_forward*64, FALSE, self);
|
||||||
|
|
||||||
|
if (trace_fraction == 1.0)//nobody in front of user, so heal self
|
||||||
|
{
|
||||||
|
if (self.health >= self.max_health)
|
||||||
|
sprint(self, PRINT_MEDIUM, "you are not injured.\n");
|
||||||
|
else if (self.health < self.max_health)
|
||||||
|
{
|
||||||
|
|
||||||
|
sound (self, CHAN_BODY, "items/r_item2.wav", 1, ATTN_NORM);
|
||||||
|
sprint(self, PRINT_MEDIUM, "you heal yourself with a placebo stimpack\n");
|
||||||
|
|
||||||
|
self.health = self.max_health;
|
||||||
|
spawn_healing(self);
|
||||||
|
spawn_healing(self);
|
||||||
|
spawn_healing(self);
|
||||||
|
spawn_healing(self);
|
||||||
|
spawn_healing(self);
|
||||||
|
spawn_healing(self);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (trace_ent.classname == "player")//healing another team-mate
|
||||||
|
{
|
||||||
|
if (trace_ent.health >= trace_ent.max_health)
|
||||||
|
{
|
||||||
|
sprint(self, PRINT_MEDIUM, trace_ent.netname);
|
||||||
|
sprint(self, PRINT_MEDIUM, " is not injured.\n");
|
||||||
|
}
|
||||||
|
else if (trace_ent.health < trace_ent.max_health)
|
||||||
|
{
|
||||||
|
if (trace_ent.deadflag)
|
||||||
|
{
|
||||||
|
sound (trace_ent, CHAN_BODY, "items/r_item2.wav", 1, ATTN_NORM);
|
||||||
|
RevivePlayer(self, trace_ent);
|
||||||
|
spawn_healing(self);
|
||||||
|
spawn_healing(self);
|
||||||
|
spawn_healing(self);
|
||||||
|
spawn_healing(self);
|
||||||
|
spawn_healing(self);
|
||||||
|
spawn_healing(self);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sound (trace_ent, CHAN_BODY, "items/r_item1.wav", 1, ATTN_NORM);
|
||||||
|
self.score = self.score + 1;
|
||||||
|
sprint(trace_ent, PRINT_MEDIUM, self.netname);
|
||||||
|
sprint(trace_ent, PRINT_MEDIUM, " heals you with a placebo stimpack\n");
|
||||||
|
sprint(self, PRINT_MEDIUM, "you heal ");
|
||||||
|
sprint(self, PRINT_MEDIUM, trace_ent.netname);
|
||||||
|
sprint(self, PRINT_MEDIUM, " with a placebo stimpack\n");
|
||||||
|
|
||||||
|
trace_ent.health = trace_ent.max_health;
|
||||||
|
spawn_healing(trace_ent);
|
||||||
|
spawn_healing(trace_ent);
|
||||||
|
spawn_healing(trace_ent);
|
||||||
|
spawn_healing(trace_ent);
|
||||||
|
spawn_healing(trace_ent);
|
||||||
|
spawn_healing(trace_ent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void () puppet_master_command =
|
void () puppet_master_command =
|
||||||
{
|
{
|
||||||
local entity te, ent;
|
local entity te, ent;
|
||||||
|
@ -216,6 +370,9 @@ void () puppet_master_command =
|
||||||
makevectors (self.v_angle);
|
makevectors (self.v_angle);
|
||||||
traceline (self.origin, self.origin+v_forward*4000, FALSE, self);
|
traceline (self.origin, self.origin+v_forward*4000, FALSE, self);
|
||||||
|
|
||||||
|
if (self.friend.classname != "monster")
|
||||||
|
return;
|
||||||
|
|
||||||
if (trace_ent.classname == "monster" && trace_ent != self.friend)
|
if (trace_ent.classname == "monster" && trace_ent != self.friend)
|
||||||
{
|
{
|
||||||
self.friend.enemy = trace_ent;
|
self.friend.enemy = trace_ent;
|
||||||
|
@ -282,7 +439,10 @@ void(float slotno) UsePerk =
|
||||||
WriteCoord (MSG_MULTICAST, org_y);
|
WriteCoord (MSG_MULTICAST, org_y);
|
||||||
WriteCoord (MSG_MULTICAST, org_z);
|
WriteCoord (MSG_MULTICAST, org_z);
|
||||||
|
|
||||||
|
|
||||||
|
self.invistime = 10;
|
||||||
disappear();
|
disappear();
|
||||||
|
sound (self, CHAN_BODY, "items/inv1.wav", 1, ATTN_NORM);
|
||||||
|
|
||||||
}
|
}
|
||||||
if ((self.perk1 == 3 && slotno == 1) || (self.perk2 == 3 && slotno == 2))
|
if ((self.perk1 == 3 && slotno == 1) || (self.perk2 == 3 && slotno == 2))
|
||||||
|
@ -335,6 +495,34 @@ void(float slotno) UsePerk =
|
||||||
te = te.chain;
|
te = te.chain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ((self.perk1 == 8 && slotno == 1) || (self.perk2 == 8 && slotno == 2))
|
||||||
|
{
|
||||||
|
if (slotno == 1)
|
||||||
|
self.perk1timer = 2000;
|
||||||
|
if (slotno == 2)
|
||||||
|
self.perk2timer = 2000;
|
||||||
|
|
||||||
|
sound (self, CHAN_BODY, "items/damage.wav", 1, ATTN_NORM);
|
||||||
|
sprint(self, 2, "it is time...\n");
|
||||||
|
self.supertime = 20;
|
||||||
|
self.skill_combat = self.skill_combat + 20;
|
||||||
|
self.skill_doctor = self.skill_doctor + 20;
|
||||||
|
self.skill_sneak = self.skill_sneak + 20;
|
||||||
|
self.skill_science = self.skill_science + 20;
|
||||||
|
self.skill_speech = self.skill_speech + 20;
|
||||||
|
}
|
||||||
|
else if ((self.perk1 == 9 && slotno == 1) || (self.perk2 == 9 && slotno == 2))
|
||||||
|
{
|
||||||
|
if (slotno == 1)
|
||||||
|
self.perk1timer = 2000;
|
||||||
|
if (slotno == 2)
|
||||||
|
self.perk2timer = 2000;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
illusion_heal();
|
||||||
|
|
||||||
|
}
|
||||||
else if ((self.perk1 == 11 && slotno == 1) || (self.perk2 == 11 && slotno == 2))
|
else if ((self.perk1 == 11 && slotno == 1) || (self.perk2 == 11 && slotno == 2))
|
||||||
{
|
{
|
||||||
if (self.radiation <= 0)
|
if (self.radiation <= 0)
|
||||||
|
@ -345,15 +533,15 @@ void(float slotno) UsePerk =
|
||||||
if (slotno == 2)
|
if (slotno == 2)
|
||||||
self.perk2timer = 2000;
|
self.perk2timer = 2000;
|
||||||
|
|
||||||
if (self.radiation <= 25)
|
if (self.radiation <= 10)
|
||||||
{
|
{
|
||||||
eat = self.radiation;
|
eat = self.radiation;
|
||||||
self.radiation = 0;
|
self.radiation = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
eat = 25;
|
eat = 10;
|
||||||
self.radiation = self.radiation - 25;
|
self.radiation = self.radiation - 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.health = self.health + eat;
|
self.health = self.health + eat;
|
||||||
|
@ -378,48 +566,7 @@ void() muzzleflash =
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
float (entity healer, entity saved) RevivePlayer =
|
|
||||||
{
|
|
||||||
local entity oself;
|
|
||||||
oself = self;
|
|
||||||
|
|
||||||
self = saved;
|
|
||||||
/* if (!walkmove(0, 0))
|
|
||||||
{
|
|
||||||
//too close?
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
saved.deadflag = DEAD_NO;
|
|
||||||
saved.takedamage = DAMAGE_AIM;
|
|
||||||
saved.movetype = MOVETYPE_WALK;
|
|
||||||
// saved.solid = SOLID_NOT;
|
|
||||||
|
|
||||||
self = oself;
|
|
||||||
|
|
||||||
// saved.materialize = 200;
|
|
||||||
saved.ghost = 0;
|
|
||||||
saved.health = 20 + (healer.skill_doctor);
|
|
||||||
saved.air_finished = time + 10;
|
|
||||||
saved.view_ofs = '0 0 22';
|
|
||||||
self = saved;
|
|
||||||
player_run();
|
|
||||||
self = oself;
|
|
||||||
stuffcmd(saved, "impulse 1\n");
|
|
||||||
if (healer.classname == "player")
|
|
||||||
{
|
|
||||||
sprint (healer, PRINT_HIGH, "you revive ");
|
|
||||||
sprint (healer, PRINT_HIGH, trace_ent.netname);
|
|
||||||
sprint (healer, PRINT_HIGH, ".\n ");
|
|
||||||
}
|
|
||||||
sprint (saved, PRINT_HIGH, healer.netname);
|
|
||||||
sprint (saved, PRINT_HIGH, " saves you from death.\n");
|
|
||||||
saved.view2 = world;
|
|
||||||
|
|
||||||
saved.flags (-) FL_FINDABLE_NONSOLID;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
|
@ -458,7 +605,7 @@ void(float damage, float dist, float rate) FireMelee =
|
||||||
|
|
||||||
if (dot < 0.5 && trace_ent.takedamage)
|
if (dot < 0.5 && trace_ent.takedamage)
|
||||||
{
|
{
|
||||||
tdam = 20 + (20*self.skill_sneak);
|
tdam = 20 + (60*self.skill_sneak);
|
||||||
|
|
||||||
if (getperk(9))
|
if (getperk(9))
|
||||||
tdam = 900;
|
tdam = 900;
|
||||||
|
@ -527,9 +674,6 @@ void(float damage, float dist, float rate) FireMelee =
|
||||||
}
|
}
|
||||||
else if (trace_ent.takedamage)
|
else if (trace_ent.takedamage)
|
||||||
{
|
{
|
||||||
//soldiers and assassins do more melee damage
|
|
||||||
if (self.class == 2 || self.class == 3)
|
|
||||||
damage = damage * 1.25;
|
|
||||||
|
|
||||||
if (weap == IID_WP_SLEDGE || weap == IID_WP_SPEAR || weap == IID_WP_KNIFE)
|
if (weap == IID_WP_SLEDGE || weap == IID_WP_SPEAR || weap == IID_WP_KNIFE)
|
||||||
SpawnBlood (org, 1);
|
SpawnBlood (org, 1);
|
||||||
|
@ -585,9 +729,9 @@ void() W_FireMelee =
|
||||||
else if (iid == IID_WP_WRENCH)
|
else if (iid == IID_WP_WRENCH)
|
||||||
FireMelee(5+random()*30, 64, 1.2);
|
FireMelee(5+random()*30, 64, 1.2);
|
||||||
else if (iid == IID_WP_KNIFE)
|
else if (iid == IID_WP_KNIFE)
|
||||||
FireMelee(5+random()*20, 64, 0.4);
|
FireMelee(5+(self.skill_sneak*4)+random()*20, 64, 0.4);
|
||||||
else if (iid == IID_WP_SLEDGE)
|
else if (iid == IID_WP_SLEDGE)
|
||||||
FireMelee(5+random()*80, 96, 1);
|
FireMelee(5+(self.skill_combat*6)+random()*40, 96, 1);
|
||||||
else if (iid == IID_WP_SPEAR)
|
else if (iid == IID_WP_SPEAR)
|
||||||
FireMelee(5+random()*60, 160, 0.8);
|
FireMelee(5+random()*60, 160, 0.8);
|
||||||
|
|
||||||
|
@ -1754,8 +1898,6 @@ void() W_Attack =
|
||||||
|
|
||||||
if (self.rtime > time)
|
if (self.rtime > time)
|
||||||
return;
|
return;
|
||||||
if (self.class == 0)
|
|
||||||
return;
|
|
||||||
if (self.team == 0)
|
if (self.team == 0)
|
||||||
return;
|
return;
|
||||||
if (self.attack_finished > time)
|
if (self.attack_finished > time)
|
||||||
|
@ -1972,8 +2114,8 @@ void() W_ChangeWeapon =
|
||||||
}
|
}
|
||||||
fl = IT_NAILGUN;
|
fl = IT_NAILGUN;
|
||||||
self.current_slot = 1;
|
self.current_slot = 1;
|
||||||
if (IsMelee(ToIID(self.islot1)))
|
// if (IsMelee(ToIID(self.islot1)))
|
||||||
SpawnGModel();
|
// SpawnGModel();
|
||||||
}
|
}
|
||||||
else if (self.impulse == 2 && self.current_slot != 2)
|
else if (self.impulse == 2 && self.current_slot != 2)
|
||||||
{
|
{
|
||||||
|
@ -1985,8 +2127,8 @@ void() W_ChangeWeapon =
|
||||||
}
|
}
|
||||||
fl = IT_SUPER_NAILGUN;
|
fl = IT_SUPER_NAILGUN;
|
||||||
self.current_slot = 2;
|
self.current_slot = 2;
|
||||||
if (IsMelee(ToIID(self.islot2)))
|
// if (IsMelee(ToIID(self.islot2)))
|
||||||
SpawnGModel();
|
// SpawnGModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
self.weapon = fl;
|
self.weapon = fl;
|
||||||
|
@ -2007,6 +2149,7 @@ void() CheatCommand =
|
||||||
local entity te;
|
local entity te;
|
||||||
|
|
||||||
sound (self, CHAN_BODY, "misc/beep1.wav", 1, ATTN_NORM);
|
sound (self, CHAN_BODY, "misc/beep1.wav", 1, ATTN_NORM);
|
||||||
|
self.ammo_shells = 900;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2485,23 +2628,38 @@ void (vector org) bullet_hole =
|
||||||
WriteCoord (MSG_MULTICAST, org_y);
|
WriteCoord (MSG_MULTICAST, org_y);
|
||||||
WriteCoord (MSG_MULTICAST, org_z);
|
WriteCoord (MSG_MULTICAST, org_z);
|
||||||
multicast (self.origin, MULTICAST_PHS);
|
multicast (self.origin, MULTICAST_PHS);
|
||||||
|
/*
|
||||||
r = random();
|
r = random();
|
||||||
ric = spawn();
|
ric = spawn();
|
||||||
setorigin(ric, org);
|
setorigin(ric, org);
|
||||||
|
|
||||||
if (r <= 0.20)
|
if (r <= 0.08)
|
||||||
sound (ric, CHAN_WEAPON, "weapons/ric1.wav", TRUE, ATTN_NORM);
|
sound (ric, CHAN_WEAPON, "contact/rico1.wav", TRUE, ATTN_NORM);
|
||||||
|
else if (r <= 0.16)
|
||||||
|
sound (ric, CHAN_WEAPON, "contact/rico2.wav", TRUE, ATTN_NORM);
|
||||||
|
else if (r <= 0.24)
|
||||||
|
sound (ric, CHAN_WEAPON, "contact/rico3.wav", TRUE, ATTN_NORM);
|
||||||
|
else if (r <= 0.32)
|
||||||
|
sound (ric, CHAN_WEAPON, "contact/rico4.wav", TRUE, ATTN_NORM);
|
||||||
else if (r <= 0.40)
|
else if (r <= 0.40)
|
||||||
sound (ric, CHAN_WEAPON, "weapons/ric2.wav", TRUE, ATTN_NORM);
|
sound (ric, CHAN_WEAPON, "contact/rico5.wav", TRUE, ATTN_NORM);
|
||||||
else if (r <= 0.60)
|
else if (r <= 0.48)
|
||||||
sound (ric, CHAN_WEAPON, "weapons/ric3.wav", TRUE, ATTN_NORM);
|
sound (ric, CHAN_WEAPON, "contact/rico6.wav", TRUE, ATTN_NORM);
|
||||||
|
else if (r <= 0.56)
|
||||||
|
sound (ric, CHAN_WEAPON, "contact/rico7.wav", TRUE, ATTN_NORM);
|
||||||
|
else if (r <= 0.64)
|
||||||
|
sound (ric, CHAN_WEAPON, "contact/rico8.wav", TRUE, ATTN_NORM);
|
||||||
|
else if (r <= 0.72)
|
||||||
|
sound (ric, CHAN_WEAPON, "contact/rico9.wav", TRUE, ATTN_NORM);
|
||||||
else if (r <= 0.80)
|
else if (r <= 0.80)
|
||||||
sound (ric, CHAN_WEAPON, "weapons/ric4.wav", TRUE, ATTN_NORM);
|
sound (ric, CHAN_WEAPON, "contact/rico10.wav", TRUE, ATTN_NORM);
|
||||||
|
else if (r <= 0.90)
|
||||||
|
sound (ric, CHAN_WEAPON, "contact/rico11.wav", TRUE, ATTN_NORM);
|
||||||
else
|
else
|
||||||
sound (ric, CHAN_WEAPON, "weapons/ric5.wav", TRUE, ATTN_NORM);
|
sound (ric, CHAN_WEAPON, "contact/rico12.wav", TRUE, ATTN_NORM);
|
||||||
|
|
||||||
remove(ric);
|
ric.think = SUB_Remove;
|
||||||
|
ric.nextthink = time + 1;*/
|
||||||
};
|
};
|
||||||
|
|
||||||
void (vector test, float length, float dam) penetrate =
|
void (vector test, float length, float dam) penetrate =
|
||||||
|
@ -3042,9 +3200,6 @@ void (float dam, float ap, string snd, float rng, float rate) FirePistol =
|
||||||
dam = dam + self.skill_doctor;
|
dam = dam + self.skill_doctor;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self.extender == weap && self.silencer != weap)
|
|
||||||
dam = dam * 1.10;
|
|
||||||
|
|
||||||
|
|
||||||
sound (self, CHAN_WEAPON, snd, 1, ATTN_NORM);
|
sound (self, CHAN_WEAPON, snd, 1, ATTN_NORM);
|
||||||
|
|
||||||
|
@ -4943,9 +5098,6 @@ void () ExitScreen =
|
||||||
|
|
||||||
self.impulse = 0;
|
self.impulse = 0;
|
||||||
|
|
||||||
if (self.class == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (self.ghost == 1)
|
if (self.ghost == 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -5167,10 +5319,10 @@ void () ExitScreen =
|
||||||
}
|
}
|
||||||
if (trace_ent.classname == "monster" && trace_ent.health > 0)
|
if (trace_ent.classname == "monster" && trace_ent.health > 0)
|
||||||
{
|
{
|
||||||
if (self.sneak == 0)
|
if (self.sneak <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (self.class != 2)
|
if (self.skill_sneak <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (self.currentmenu != "none")
|
if (self.currentmenu != "none")
|
||||||
|
@ -5262,42 +5414,14 @@ void () Sneak =
|
||||||
self.sneak = 0;
|
self.sneak = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (self.sneak == 0)
|
else
|
||||||
{
|
{
|
||||||
sound (self, CHAN_BODY, "items/inv1.wav", 1, ATTN_NORM);
|
sound (self, CHAN_BODY, "items/inv1.wav", 1, ATTN_NORM);
|
||||||
self.sneak = 1;
|
self.sneak = 99;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void () Shield =
|
|
||||||
{
|
|
||||||
if (self.class != 6)
|
|
||||||
{
|
|
||||||
centerprint (self, "You can't shield yourself!\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.sneak == 2)
|
|
||||||
{
|
|
||||||
centerprint (self, "<EFBFBD><EFBFBD><EFBFBD> Unshielded <20><><EFBFBD>\n");
|
|
||||||
self.sneak = 0;
|
|
||||||
sound (self, CHAN_BODY, "items/protect2.wav", 1, ATTN_NORM);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.ammo_cells < 10)
|
|
||||||
{
|
|
||||||
centerprint (self, "wait for your shield to recharge.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.sneak == 0)
|
|
||||||
{
|
|
||||||
centerprint (self, "<EFBFBD><EFBFBD><EFBFBD> Energy Shield <20><><EFBFBD>\n");
|
|
||||||
self.sneak = 2;
|
|
||||||
sound (self, CHAN_BODY, "items/protect.wav", 1, ATTN_NORM);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
void () station_die =
|
void () station_die =
|
||||||
{
|
{
|
||||||
|
@ -5866,114 +5990,6 @@ void () BuyMenu =
|
||||||
|
|
||||||
void () CharacterSheet =
|
void () CharacterSheet =
|
||||||
{
|
{
|
||||||
local string x;
|
|
||||||
local float qq;
|
|
||||||
local float ratio;
|
|
||||||
local float r1;
|
|
||||||
local float r2;
|
|
||||||
|
|
||||||
stuffcmd (self, "toggleconsole\n");
|
|
||||||
sprint (self, PRINT_HIGH, "\n\n\n\n ** INFO ** \n");
|
|
||||||
sprint (self, PRINT_HIGH, "<EFBFBD>Class ‘ ");
|
|
||||||
if (self.class == 1)
|
|
||||||
sprint (self, 2, "Medic");
|
|
||||||
if (self.class == 2)
|
|
||||||
sprint (self, 2, "Assassin");
|
|
||||||
if (self.class == 3)
|
|
||||||
sprint (self, 2, "Soldier");
|
|
||||||
if (self.class == 4)
|
|
||||||
sprint (self, 2, "Scientist");
|
|
||||||
|
|
||||||
sprint (self, PRINT_HIGH, "\n<EFBFBD>Team ‘ ");
|
|
||||||
|
|
||||||
if (self.team == 1)
|
|
||||||
sprint (self, 2, "Rangers\n");
|
|
||||||
if (self.team == 2)
|
|
||||||
sprint (self, 2, "Raiders\n");
|
|
||||||
|
|
||||||
sprint (self, PRINT_HIGH, "<EFBFBD>Score ‘ ");
|
|
||||||
r1 = (self.score);
|
|
||||||
|
|
||||||
x = ftos (r1);
|
|
||||||
sprint (self, 2, x);
|
|
||||||
|
|
||||||
sprint (self, PRINT_HIGH, "\n<EFBFBD>Speed ‘ ");
|
|
||||||
x = ftos (self.maxspeed);
|
|
||||||
sprint (self, 2, x);
|
|
||||||
sprint (self, PRINT_HIGH, "/300\n");
|
|
||||||
sprint (self, PRINT_HIGH, "<EFBFBD>Money ‘ ");
|
|
||||||
|
|
||||||
x = ftos (self.ammo_shells);
|
|
||||||
sprint (self, 2, x);
|
|
||||||
sprint (self, PRINT_HIGH, "$\n");
|
|
||||||
|
|
||||||
/*
|
|
||||||
sprint (self, PRINT_HIGH, "\n<EFBFBD>Armor ‘ ");
|
|
||||||
x = GetArmorName();
|
|
||||||
sprint (self, 2, x);
|
|
||||||
sprint (self, 2, " (");
|
|
||||||
x = ftos (self.armor_weight);
|
|
||||||
sprint (self, 2, x);
|
|
||||||
sprint (self, 2, ")\n");
|
|
||||||
*/
|
|
||||||
sprint (self, PRINT_HIGH, "<EFBFBD>Protective‘ ");
|
|
||||||
x = GetProtectName();
|
|
||||||
sprint (self, 2, x);
|
|
||||||
sprint (self, 2, "\n");
|
|
||||||
/*
|
|
||||||
sprint (self, PRINT_HIGH, "<EFBFBD>Chem ‘ ");
|
|
||||||
x = GetChemName();
|
|
||||||
sprint (self, 2, x);
|
|
||||||
x = ftos (self.chemcount);
|
|
||||||
sprint (self, 2, "[");
|
|
||||||
sprint (self, 2, x);
|
|
||||||
sprint (self, 2, "]");
|
|
||||||
sprint (self, 2, "\n");
|
|
||||||
*/
|
|
||||||
sprint (self, PRINT_HIGH, "<EFBFBD>Gadget ‘ ");
|
|
||||||
|
|
||||||
x = GetEquipmentName();
|
|
||||||
sprint (self, 2, x);
|
|
||||||
sprint (self, 2, "\n");
|
|
||||||
sprint (self, PRINT_HIGH, "<EFBFBD>Perk ‘ ");
|
|
||||||
x = GetPerkName();
|
|
||||||
sprint (self, 2, x);
|
|
||||||
sprint (self, 2, "\n");
|
|
||||||
sprint (self, PRINT_HIGH, "<EFBFBD>Trait ‘ ");
|
|
||||||
x = GetTraitName();
|
|
||||||
sprint (self, 2, x);
|
|
||||||
sprint (self, 2, "\n");
|
|
||||||
/*
|
|
||||||
sprint (self, PRINT_HIGH, "<EFBFBD>Weapon 1 ‘ ");
|
|
||||||
x = GetWeaponName (self, self.slot1);
|
|
||||||
sprint (self, 2, x);
|
|
||||||
sprint (self, 2, " (");
|
|
||||||
x = ftos (self.slot1_weight);
|
|
||||||
sprint (self, 2, x);
|
|
||||||
sprint (self, 2, ") (");
|
|
||||||
sprint (self, 2, self.ammotype1);
|
|
||||||
sprint (self, 2, ")\n");
|
|
||||||
|
|
||||||
sprint (self, PRINT_HIGH, "<EFBFBD>Weapon 2 ‘ ");
|
|
||||||
x = GetWeaponName (self, self.slot2);
|
|
||||||
sprint (self, 2, x);
|
|
||||||
sprint (self, 2, " (");
|
|
||||||
x = ftos (self.slot2_weight);
|
|
||||||
sprint (self, 2, x);
|
|
||||||
sprint (self, 2, ") (");
|
|
||||||
sprint (self, 2, self.ammotype2);
|
|
||||||
sprint (self, 2, ")\n\n");
|
|
||||||
*/
|
|
||||||
qq = weightx ();
|
|
||||||
sprint (self, PRINT_HIGH, "<EFBFBD>Weight ‘ ");
|
|
||||||
x = ftos (qq);
|
|
||||||
sprint (self, 2, x);
|
|
||||||
qq = self.max_weight;
|
|
||||||
sprint (self, PRINT_HIGH, "/");
|
|
||||||
x = ftos (qq);
|
|
||||||
sprint (self, 2, x);
|
|
||||||
sprint (self, PRINT_HIGH, "\n");
|
|
||||||
return;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void () UseEquipment =
|
void () UseEquipment =
|
||||||
|
@ -6560,278 +6576,6 @@ void() show_light_level =
|
||||||
bprint(2, y);
|
bprint(2, y);
|
||||||
bprint(2, "\n");
|
bprint(2, "\n");
|
||||||
};
|
};
|
||||||
|
|
||||||
void() AttachSilencer =
|
|
||||||
{
|
|
||||||
local float weap, x, y;
|
|
||||||
|
|
||||||
weap = ToIID(self.(SlotField(self.current_slot)));
|
|
||||||
|
|
||||||
y = SlotOfItem(self, IID_EQUIP_SILENCER);
|
|
||||||
|
|
||||||
if (weap == IID_WP_USP)
|
|
||||||
{
|
|
||||||
sprint(self, 2, "silencer attached.\n");
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
|
|
||||||
if (self.current_slot == 1)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot1);
|
|
||||||
self.islot1 = 0;
|
|
||||||
SetItemSlot(self, 1, SlotVal(IID_WP_USP_S, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.current_slot == 2)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot2);
|
|
||||||
self.islot2 = 0;
|
|
||||||
SetItemSlot(self, 2, SlotVal(IID_WP_USP_S, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (weap == IID_WP_DKS1)
|
|
||||||
{
|
|
||||||
sprint(self, 2, "silencer attached.\n");
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
|
|
||||||
if (self.current_slot == 1)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot1);
|
|
||||||
self.islot1 = 0;
|
|
||||||
SetItemSlot(self, 1, SlotVal(IID_WP_DKS1_S, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.current_slot == 2)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot2);
|
|
||||||
self.islot2 = 0;
|
|
||||||
SetItemSlot(self, 2, SlotVal(IID_WP_DKS1_S, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (weap == IID_WP_GLOCK)
|
|
||||||
{
|
|
||||||
sprint(self, 2, "silencer attached.\n");
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
|
|
||||||
if (self.current_slot == 1)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot1);
|
|
||||||
self.islot1 = 0;
|
|
||||||
SetItemSlot(self, 1, SlotVal(IID_WP_GLOCK_S, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.current_slot == 2)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot2);
|
|
||||||
self.islot2 = 0;
|
|
||||||
SetItemSlot(self, 2, SlotVal(IID_WP_GLOCK_S, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (weap == IID_WP_MP9)
|
|
||||||
{
|
|
||||||
sprint(self, 2, "silencer attached.\n");
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
|
|
||||||
if (self.current_slot == 1)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot1);
|
|
||||||
self.islot1 = 0;
|
|
||||||
SetItemSlot(self, 1, SlotVal(IID_WP_MP9_S, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.current_slot == 2)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot2);
|
|
||||||
self.islot2 = 0;
|
|
||||||
SetItemSlot(self, 2, SlotVal(IID_WP_MP9_S, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (weap == IID_WP_GREASEGUN)
|
|
||||||
{
|
|
||||||
sprint(self, 2, "silencer attached.\n");
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
|
|
||||||
if (self.current_slot == 1)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot1);
|
|
||||||
self.islot1 = 0;
|
|
||||||
SetItemSlot(self, 1, SlotVal(IID_WP_GREASEGUN_S, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.current_slot == 2)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot2);
|
|
||||||
self.islot2 = 0;
|
|
||||||
SetItemSlot(self, 2, SlotVal(IID_WP_GREASEGUN_S, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (weap == IID_WP_PIPERIFLE)
|
|
||||||
{
|
|
||||||
sprint(self, 2, "silencer attached.\n");
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
|
|
||||||
if (self.current_slot == 1)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot1);
|
|
||||||
self.islot1 = 0;
|
|
||||||
SetItemSlot(self, 1, SlotVal(IID_WP_PIPERIFLE_S, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.current_slot == 2)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot2);
|
|
||||||
self.islot2 = 0;
|
|
||||||
SetItemSlot(self, 2, SlotVal(IID_WP_PIPERIFLE_S, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (weap == IID_WP_PIPERIFLE_R)
|
|
||||||
{
|
|
||||||
sprint(self, 2, "silencer attached.\n");
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
|
|
||||||
if (self.current_slot == 1)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot1);
|
|
||||||
self.islot1 = 0;
|
|
||||||
SetItemSlot(self, 1, SlotVal(IID_WP_PIPERIFLE_S_R, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.current_slot == 2)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot2);
|
|
||||||
self.islot2 = 0;
|
|
||||||
SetItemSlot(self, 2, SlotVal(IID_WP_PIPERIFLE_S_R, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (weap == IID_WP_PIPERIFLE_SCOPE)
|
|
||||||
{
|
|
||||||
sprint(self, 2, "silencer attached.\n");
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
|
|
||||||
if (self.current_slot == 1)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot1);
|
|
||||||
self.islot1 = 0;
|
|
||||||
SetItemSlot(self, 1, SlotVal(IID_WP_PIPERIFLE_SCOPE_S, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.current_slot == 2)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot2);
|
|
||||||
self.islot2 = 0;
|
|
||||||
SetItemSlot(self, 2, SlotVal(IID_WP_PIPERIFLE_SCOPE_S, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (weap == IID_WP_PIPERIFLE_SCOPE_R)
|
|
||||||
{
|
|
||||||
sprint(self, 2, "silencer attached.\n");
|
|
||||||
DecreaseDestroySlot(y);
|
|
||||||
|
|
||||||
if (self.current_slot == 1)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot1);
|
|
||||||
self.islot1 = 0;
|
|
||||||
SetItemSlot(self, 1, SlotVal(IID_WP_PIPERIFLE_SCOPE_S_R, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.current_slot == 2)
|
|
||||||
{
|
|
||||||
x = ToStatus(self.islot2);
|
|
||||||
self.islot2 = 0;
|
|
||||||
SetItemSlot(self, 2, SlotVal(IID_WP_PIPERIFLE_SCOPE_S_R, x));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sprint(self, 2, "cannot be silenced.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
void() AttachExtender =
|
|
||||||
{
|
|
||||||
local float weap;
|
|
||||||
|
|
||||||
weap = ToIID(self.(SlotField(self.current_slot)));
|
|
||||||
|
|
||||||
if (weap == IID_WP_NEEDLER || weap == IID_WP_MOONLIGHT)
|
|
||||||
{
|
|
||||||
sprint(self, 2, "that weapon already has a silencer attached\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (weap == IID_WP_ALIENBLASTER)
|
|
||||||
{
|
|
||||||
sprint(self, 2, "how exactly do you extend that???\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.silencer == weap)
|
|
||||||
{
|
|
||||||
sprint(self, 2, "that weapon already has a silencer attached\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (ToIID(self.islot4) == IID_EQUIP_EXTENDER && self.extender == 0)
|
|
||||||
{
|
|
||||||
self.extender = weap;
|
|
||||||
sprint(self, 2, "extender attached.\n");
|
|
||||||
self.islot4 = 0;
|
|
||||||
self.attack_finished = time + 1;
|
|
||||||
self.rtime = time + 1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
else if (ToIID(self.islot4) == IID_EQUIP_EXTENDER && self.extender > 0)
|
|
||||||
{
|
|
||||||
self.extender = 0;
|
|
||||||
sprint(self, 2, "removing extender...\n");
|
|
||||||
self.attack_finished = time + 1;
|
|
||||||
return;
|
|
||||||
}*/
|
|
||||||
};
|
|
||||||
|
|
||||||
void (float iid) RemoveSilencer =
|
|
||||||
{
|
|
||||||
if (ToIID(self.islot4) == 0)
|
|
||||||
{
|
|
||||||
SetItemSlot(self, 4, SlotVal(IID_EQUIP_SILENCER, 1));
|
|
||||||
sprint(self, 2, "removing silencer...\n");
|
|
||||||
self.attack_finished = time + 1;
|
|
||||||
self.rtime = time + 1;
|
|
||||||
self.silencer = 0;
|
|
||||||
}
|
|
||||||
else if (ToIID(self.islot4) > 0)
|
|
||||||
{
|
|
||||||
sprint(self, 2, "can't remove silencer, equipment slot is full\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
void (float iid) RemoveExtender =
|
|
||||||
{
|
|
||||||
if (ToIID(self.islot4) == 0)
|
|
||||||
{
|
|
||||||
SetItemSlot(self, 4, SlotVal(IID_EQUIP_EXTENDER, 1));
|
|
||||||
sprint(self, 2, "removing extender...\n");
|
|
||||||
self.attack_finished = time + 1;
|
|
||||||
self.rtime = time + 1;
|
|
||||||
self.extender = 0;
|
|
||||||
}
|
|
||||||
else if (ToIID(self.islot4) > 0)
|
|
||||||
{
|
|
||||||
sprint(self, 2, "can't remove extender, equipment slot is full\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
void (string snd, float type) function_radio =
|
void (string snd, float type) function_radio =
|
||||||
{
|
{
|
||||||
|
|
|
@ -61,7 +61,7 @@ void() SetupStats =
|
||||||
clientstat(60, 2, perk1);
|
clientstat(60, 2, perk1);
|
||||||
clientstat(61, 2, current_slot);
|
clientstat(61, 2, current_slot);
|
||||||
clientstat(62, 2, team);
|
clientstat(62, 2, team);
|
||||||
clientstat(63, 2, class);
|
clientstat(63, 2, shadowtime);
|
||||||
clientstat(64, 2, start_time);
|
clientstat(64, 2, start_time);
|
||||||
clientstat(65, 2, location);
|
clientstat(65, 2, location);
|
||||||
clientstat(66, 2, map_obj);
|
clientstat(66, 2, map_obj);
|
||||||
|
@ -101,7 +101,7 @@ void() SetupStats =
|
||||||
clientstat(101, 2, skill_doctor);
|
clientstat(101, 2, skill_doctor);
|
||||||
clientstat(102, 2, skill_sneak);
|
clientstat(102, 2, skill_sneak);
|
||||||
clientstat(103, 2, skill_science);
|
clientstat(103, 2, skill_science);
|
||||||
clientstat(104, 2, shadowtime);
|
clientstat(104, 2, skill_speech);
|
||||||
clientstat(105, 2, announcercache);
|
clientstat(105, 2, announcercache);
|
||||||
clientstat(106, 2, radiation);
|
clientstat(106, 2, radiation);
|
||||||
clientstat(108, 2, safezone);
|
clientstat(108, 2, safezone);
|
||||||
|
@ -124,6 +124,7 @@ void() get_difficulty =
|
||||||
{
|
{
|
||||||
local entity te;
|
local entity te;
|
||||||
local float cr;
|
local float cr;
|
||||||
|
local string rating;
|
||||||
|
|
||||||
//challenge rating system
|
//challenge rating system
|
||||||
//
|
//
|
||||||
|
@ -136,21 +137,13 @@ void() get_difficulty =
|
||||||
te = find (world, classname, "player");
|
te = find (world, classname, "player");
|
||||||
while (te)
|
while (te)
|
||||||
{
|
{
|
||||||
|
challenge_rating += GetItemThreatLevel(ToIID(te.islot1));
|
||||||
if (te.ammo_shells > 200)//money
|
challenge_rating += GetItemThreatLevel(ToIID(te.islot1));
|
||||||
challenge_rating += 1;
|
challenge_rating += GetItemThreatLevel(ToIID(te.islot3));
|
||||||
if (te.ammo_shells > 500)//money
|
|
||||||
challenge_rating += 1;
|
|
||||||
if (ToIID(te.islot1) >= IID_WP_AK112 || ToIID(te.islot2) >= IID_WP_AK112)//good weapon
|
|
||||||
challenge_rating += 1;
|
|
||||||
if (ToIID(te.islot3) >= IID_ARM_COMBAT)//good armor
|
|
||||||
challenge_rating += 1;
|
|
||||||
|
|
||||||
te = te.chain;
|
te = te.chain;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (challenge_rating > 24)
|
|
||||||
challenge_rating = 24;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void() load_monster =
|
void() load_monster =
|
||||||
|
@ -623,7 +616,9 @@ if (coop == 1) // Players vs Monsters
|
||||||
local float combat;
|
local float combat;
|
||||||
|
|
||||||
combat = 0;
|
combat = 0;
|
||||||
get_difficulty();
|
|
||||||
|
if (random()*100<25);
|
||||||
|
get_difficulty();
|
||||||
|
|
||||||
te = find(world, classname, "monster");
|
te = find(world, classname, "monster");
|
||||||
while (te)
|
while (te)
|
||||||
|
@ -664,7 +659,7 @@ if (coop == 1) // Players vs Monsters
|
||||||
while (te)
|
while (te)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (te.health > 0 && te.class > 0)
|
if (te.health > 0 && te.team > 0)
|
||||||
pcount = pcount + 1;
|
pcount = pcount + 1;
|
||||||
if (te.health <= 0)
|
if (te.health <= 0)
|
||||||
pdead = pdead + 1;
|
pdead = pdead + 1;
|
||||||
|
@ -752,7 +747,7 @@ if (coop == 1) // Players vs Monsters
|
||||||
{
|
{
|
||||||
ze.missionbrief = 3;
|
ze.missionbrief = 3;
|
||||||
ze.announcercache = 3;
|
ze.announcercache = 3;
|
||||||
ze.ammo_shells = ze.ammo_shells + (3*rescue);
|
ze.ammo_shells = ze.ammo_shells + (5*rescue);
|
||||||
ze.endinfo1 = rescue;
|
ze.endinfo1 = rescue;
|
||||||
ze.endinfo2 = hostages;
|
ze.endinfo2 = hostages;
|
||||||
ze.endinfo3 = dead_hostage;
|
ze.endinfo3 = dead_hostage;
|
||||||
|
@ -775,7 +770,7 @@ if (coop == 1) // Players vs Monsters
|
||||||
{
|
{
|
||||||
ze.missionbrief = 3;
|
ze.missionbrief = 3;
|
||||||
ze.announcercache = 4;
|
ze.announcercache = 4;
|
||||||
ze.ammo_shells = ze.ammo_shells + (3*rescue);
|
ze.ammo_shells = ze.ammo_shells + (5*rescue);
|
||||||
ze.endinfo1 = rescue;
|
ze.endinfo1 = rescue;
|
||||||
ze.endinfo2 = hostages;
|
ze.endinfo2 = hostages;
|
||||||
ze.endinfo3 = dead_hostage;
|
ze.endinfo3 = dead_hostage;
|
||||||
|
@ -1408,7 +1403,7 @@ void () RecoilControl =
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
te.recoil = te.recoil - (0.20+(te.skill_combat*0.005));
|
te.recoil = te.recoil - (0.15+(te.skill_combat*0.005) + (te.skill_doctor*0.003) + (te.skill_sneak*0.002));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1608,8 +1603,9 @@ void() worldspawn =
|
||||||
precache_model ("progs/ammobox2.mdl");
|
precache_model ("progs/ammobox2.mdl");
|
||||||
precache_model ("progs/stop.spr");
|
precache_model ("progs/stop.spr");
|
||||||
precache_model ("progs/healing.spr");
|
precache_model ("progs/healing.spr");
|
||||||
|
precache_model ("progs/heart.spr");
|
||||||
|
|
||||||
precache_model ("progs/v_axe.mdl");
|
precache_model ("progs/v_disruptor.mdl");
|
||||||
precache_model ("progs/v_span.mdl");
|
precache_model ("progs/v_span.mdl");
|
||||||
precache_model ("progs/v_nail.mdl");
|
precache_model ("progs/v_nail.mdl");
|
||||||
precache_model ("progs/v_rock.mdl");
|
precache_model ("progs/v_rock.mdl");
|
||||||
|
@ -1695,10 +1691,6 @@ void() worldspawn =
|
||||||
precache_model ("progs/w_bozar.mdl");
|
precache_model ("progs/w_bozar.mdl");
|
||||||
precache_model ("progs/money.mdl");
|
precache_model ("progs/money.mdl");
|
||||||
|
|
||||||
precache_model ("progs/turrgun.mdl");
|
|
||||||
precache_model ("progs/turrbase.mdl");
|
|
||||||
precache_model ("progs/miniturr.mdl");
|
|
||||||
precache_model ("progs/minibase.mdl");
|
|
||||||
|
|
||||||
precache_model ("progs/grenade2.mdl");
|
precache_model ("progs/grenade2.mdl");
|
||||||
precache_model ("maps/b_bh10.bsp");
|
precache_model ("maps/b_bh10.bsp");
|
||||||
|
@ -1762,12 +1754,20 @@ void() worldspawn =
|
||||||
precache_sound ("misc/hosdown.wav");
|
precache_sound ("misc/hosdown.wav");
|
||||||
precache_sound ("misc/rescued.wav");
|
precache_sound ("misc/rescued.wav");
|
||||||
precache_sound ("misc/beep1.wav");
|
precache_sound ("misc/beep1.wav");
|
||||||
|
precache_sound ("misc/beep2.wav");
|
||||||
precache_sound ("misc/r_tele4.wav");
|
precache_sound ("misc/r_tele4.wav");
|
||||||
precache_sound ("buttons/switch02.wav");
|
precache_sound ("buttons/switch02.wav");
|
||||||
precache_sound ("buttons/switch04.wav");
|
precache_sound ("buttons/switch04.wav");
|
||||||
precache_sound ("misc/secret.wav");
|
precache_sound ("misc/secret.wav");
|
||||||
precache_sound ("misc/fanfare.wav");
|
precache_sound ("player/levelup.wav");
|
||||||
|
precache_sound ("items/damage.wav");
|
||||||
|
precache_sound ("items/damage2.wav");
|
||||||
|
|
||||||
|
|
||||||
|
precache_sound ("player/prone1.wav");
|
||||||
|
precache_sound ("player/prone2.wav");
|
||||||
|
precache_sound ("player/prone3.wav");
|
||||||
|
precache_sound ("player/prone4.wav");
|
||||||
precache_sound ("player/gib1.wav");
|
precache_sound ("player/gib1.wav");
|
||||||
precache_sound ("player/step1.wav");
|
precache_sound ("player/step1.wav");
|
||||||
precache_sound ("player/step2.wav");
|
precache_sound ("player/step2.wav");
|
||||||
|
@ -1817,11 +1817,7 @@ void() worldspawn =
|
||||||
precache_sound ("weapons/mp5.wav");
|
precache_sound ("weapons/mp5.wav");
|
||||||
precache_sound ("weapons/mp7.wav");
|
precache_sound ("weapons/mp7.wav");
|
||||||
precache_sound ("weapons/rangem.wav");
|
precache_sound ("weapons/rangem.wav");
|
||||||
precache_sound ("weapons/ric1.wav");
|
|
||||||
precache_sound ("weapons/ric2.wav");
|
|
||||||
precache_sound ("weapons/ric3.wav");
|
|
||||||
precache_sound ("weapons/ric4.wav");
|
|
||||||
precache_sound ("weapons/ric5.wav");
|
|
||||||
precache_sound ("weapons/tink1.wav");
|
precache_sound ("weapons/tink1.wav");
|
||||||
precache_sound ("weapons/shell.wav");
|
precache_sound ("weapons/shell.wav");
|
||||||
precache_sound ("weapons/reload.wav");
|
precache_sound ("weapons/reload.wav");
|
||||||
|
@ -1839,6 +1835,24 @@ void() worldspawn =
|
||||||
precache_sound ("player/headshot.wav");
|
precache_sound ("player/headshot.wav");
|
||||||
precache_sound ("player/hit1.wav");
|
precache_sound ("player/hit1.wav");
|
||||||
|
|
||||||
|
|
||||||
|
precache_sound ("contact/armor1.wav");
|
||||||
|
precache_sound ("contact/armor2.wav");
|
||||||
|
precache_sound ("contact/armor3.wav");
|
||||||
|
|
||||||
|
precache_sound ("contact/rico1.wav");
|
||||||
|
precache_sound ("contact/rico2.wav");
|
||||||
|
precache_sound ("contact/rico3.wav");
|
||||||
|
precache_sound ("contact/rico4.wav");
|
||||||
|
precache_sound ("contact/rico5.wav");
|
||||||
|
precache_sound ("contact/rico6.wav");
|
||||||
|
precache_sound ("contact/rico7.wav");
|
||||||
|
precache_sound ("contact/rico8.wav");
|
||||||
|
precache_sound ("contact/rico9.wav");
|
||||||
|
precache_sound ("contact/rico10.wav");
|
||||||
|
precache_sound ("contact/rico11.wav");
|
||||||
|
precache_sound ("contact/rico12.wav");
|
||||||
|
|
||||||
precache_sound ("player/paina.wav");
|
precache_sound ("player/paina.wav");
|
||||||
precache_sound ("player/painb.wav");
|
precache_sound ("player/painb.wav");
|
||||||
precache_sound ("player/yourturn.wav");
|
precache_sound ("player/yourturn.wav");
|
||||||
|
|
Loading…
Reference in a new issue