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

This commit is contained in:
Magnus 2009-11-15 02:36:24 +00:00
parent d07fd0369f
commit d35ca68b3a
19 changed files with 637 additions and 813 deletions

View file

@ -3,6 +3,8 @@ void() t_movetarget;
void() knight_walk1; void() knight_walk1;
void() knight_bow6; void() knight_bow6;
void() knight_bow1; void() knight_bow1;
void() walkmonster_start;
void(entity etemp, entity stemp, entity stemp, float dmg) T_Damage; void(entity etemp, entity stemp, entity stemp, float dmg) T_Damage;
/* /*
@ -516,6 +518,21 @@ The monster is walking it's beat
*/ */
void(float dist) ai_walk = void(float dist) ai_walk =
{ {
if (self.hold == 1)
{
self.th_stand;
self.hold = 0;
return;
}
if (self.hold > 1)
{
self.th_stand ();
self.hold = self.hold - 1;
return;
}
movedist = dist; movedist = dist;
// check for noticing a player // check for noticing a player
@ -535,6 +552,21 @@ The monster is staying in one place for a while, with slight angle turns
*/ */
void() ai_stand = void() ai_stand =
{ {
if (self.hold == 1)
{
self.th_stand;
self.hold = 0;
return;
}
if (self.hold > 1)
{
self.th_stand ();
self.hold = self.hold - 1;
return;
}
if (FindTarget ()) if (FindTarget ())
return; return;
@ -712,7 +744,14 @@ The monster has an enemy it is trying to kill
*/ */
void(float dist) ai_run = void(float dist) ai_run =
{ {
if (self.hold > 0)
if (self.hold == 1)
{
self.th_stand;
self.hold = 0;
return;
}
if (self.hold > 1)
{ {
self.th_stand (); self.th_stand ();

View file

@ -50,14 +50,10 @@ void() SetChangeParms =
(IT_KEY1 | IT_KEY2 | IT_INVISIBILITY | IT_INVULNERABILITY | IT_SUIT | IT_QUAD) ); (IT_KEY1 | IT_KEY2 | IT_INVISIBILITY | IT_INVULNERABILITY | IT_SUIT | IT_QUAD) );
if (self.skill_combat > 0) parm5 = self.skill_combat;
parm5 = self.skill_combat; parm6 = self.skill_doctor;
if (self.skill_doctor > 0) parm7 = self.skill_sneak;
parm6 = self.skill_doctor; parm14 = self.skill_science;
if (self.skill_sneak > 0)
parm7 = self.skill_sneak;
if (self.skill_science > 0)
parm14 = self.skill_science;
@ -1264,7 +1260,7 @@ void() SneakLevel =
front = 0; front = 0;
te = findradius(self.origin, 1000); te = findradius(self.origin, 1500);
while (te) while (te)
{ {
if (visible(te) && te.classname == "monster" && check_fov(te)) if (visible(te) && te.classname == "monster" && check_fov(te))
@ -1275,7 +1271,7 @@ void() SneakLevel =
} }
sn = 90 + self.skill_sneak*0.5; sn = 90 + self.skill_sneak/2;
//sneaking along a wall increases chance by 2% //sneaking along a wall increases chance by 2%
makevectors(self.angles); makevectors(self.angles);
@ -1288,9 +1284,9 @@ void() SneakLevel =
else if (pointcontents (self.origin - v_forward*64) == CONTENT_SOLID) else if (pointcontents (self.origin - v_forward*64) == CONTENT_SOLID)
sn = sn + 2; sn = sn + 2;
//duck or prone gives a 1% bonus to stealth //duck or prone gives a 2% bonus to stealth
if (self.position > 0) if (self.position > 0)
sn = sn + 1; sn = sn + 2;
//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
@ -1300,36 +1296,34 @@ void() SneakLevel =
{ {
r = 600 - r; r = 600 - r;
q = 3 + (self.skill_sneak/2); 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; sn = sn - r/q;
} }
//wearing no armor gives a 5% bonus to stealth //combat armor gives a penalty to stealth
st = ToIID(self.islot3); st = ToIID(self.islot3);
if (st == 0) if (st == IID_ARM_COMBAT || st == IID_ARM_SEVA)
sn = sn + 5; sn = sn - 5;
//bulletproof shirt gives a 2% bonus to stealth
st = ToIID(self.islot3);
if (st == IID_ARM_LEATHER)
sn = sn + 2;
//metal armor gives a large penalty to stealth //metal armor gives a large penalty to stealth
st = ToIID(self.islot3); st = ToIID(self.islot3);
if (st == IID_ARM_METAL) if (st == IID_ARM_METAL)
sn = sn - 5; sn = sn - 10;
//power armor gives a huge penalty to stealth //power armor gives a huge penalty to stealth
st = ToIID(self.islot3); st = ToIID(self.islot3);
if (st == IID_ARM_LPOWER) if (st == IID_ARM_LPOWER)
sn = sn - 10; sn = sn - 25;
//tesla armor gives a massive penalty to stealth
//stealthboy allows for an automatic 10-second invisibility st = ToIID(self.islot3);
st = ToIID(self.islot4); if (st == IID_ARM_TESLA)
if (st == IID_EQUIP_STEALTHBOY && self.ammo_cells > 0) sn = sn - 40;
sn = 99;
if (sn <= 5) if (sn <= 5)
sn = 5; sn = 5;
@ -1560,6 +1554,8 @@ void() PlayerPreThink =
if (self.perk2timer > 0) if (self.perk2timer > 0)
self.perk2timer = self.perk2timer - 1; self.perk2timer = self.perk2timer - 1;
self.shadowtime = time_left;
if (self.cycle1 < time) if (self.cycle1 < time)
{ {
if (self.currentmenu != "none") if (self.currentmenu != "none")

View file

@ -309,6 +309,8 @@ void(string arg1, string arg2) Cmd_GainPerk =
self.perk1 = 8; self.perk1 = 8;
if (arg1 == "9") if (arg1 == "9")
self.perk1 = 9; self.perk1 = 9;
if (arg1 == "10")
self.perk1 = 10;
} }
if (arg2 == "2") if (arg2 == "2")
{ {
@ -330,6 +332,8 @@ void(string arg1, string arg2) Cmd_GainPerk =
self.perk2 = 8; self.perk2 = 8;
if (arg1 == "9") if (arg1 == "9")
self.perk2 = 9; self.perk2 = 9;
if (arg1 == "10")
self.perk2 = 10;
} }
}; };

View file

@ -126,7 +126,7 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
damage = floor(damage); damage = floor(damage);
targ.health = floor(targ.health); targ.health = floor(targ.health);
/*
if (attacker.classname == "player" && total_players == 4) if (attacker.classname == "player" && total_players == 4)
damage = floor(damage * 0.75); damage = floor(damage * 0.75);
if (attacker.classname == "player" && total_players == 3) if (attacker.classname == "player" && total_players == 3)
@ -134,8 +134,8 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
else if (attacker.classname == "player" && total_players == 2) else if (attacker.classname == "player" && total_players == 2)
damage = floor(damage * 0.90); damage = floor(damage * 0.90);
if (attacker.classname == "monster") if (targ.classname == "player")
damage = floor(damage * 0.80); damage = floor(damage * 0.60);*/
//getting hurt is slightly painful to the score, play cautiously! //getting hurt is slightly painful to the score, play cautiously!
@ -255,14 +255,12 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
damage = damage * 0.90; damage = damage * 0.90;
} }
//sneak attack: if you attack a creature who isn't fighting you, bonus damage //sneak attack: if you attack a creature who isn't fighting you, bonus damage
if (attacker.skill_sneak > 0) if (attacker.skill_sneak > 0)
{ {
if (targ.enemy != attacker) if (targ.enemy != attacker)
{ damage = damage * (1 + (attacker.skill_sneak/100));
sprint(attacker, 2, "!SNEAK ATTACK\n");
damage = damage * (1 + (self.skill_sneak/100));
}
} }
//death wish: 20% damage bonus to targ, 10% to attacker //death wish: 20% damage bonus to targ, 10% to attacker
@ -457,25 +455,25 @@ take = damage;
take -= 3; take -= 3;
break; break;
case IID_ARM_VANDAL: case IID_ARM_VANDAL:
take -= 4;
break;
case IID_ARM_METAL:
take -= 5; take -= 5;
break; break;
case IID_ARM_METAL:
take -= 1;
break;
case IID_ARM_TESLA: case IID_ARM_TESLA:
take -= 9; take -= 6;
break; break;
case IID_ARM_COMBAT: case IID_ARM_COMBAT:
take -= 6; take -= 6;
break; break;
case IID_ARM_SEVA: case IID_ARM_SEVA:
take -= 8; take -= 6;
break; break;
case IID_ARM_FORCE: case IID_ARM_FORCE:
take -= 13; take -= 9;
break; break;
case IID_ARM_LPOWER: case IID_ARM_LPOWER:
take -= 11; take -= 10;
break; break;
default: default:
break; break;
@ -490,22 +488,22 @@ take = damage;
take = take * 0.70; take = take * 0.70;
break; break;
case IID_ARM_METAL: case IID_ARM_METAL:
take = take * 0.50; take = take * 0.40;
break; break;
case IID_ARM_TESLA: case IID_ARM_TESLA:
take = take * 0.65; take = take * 0.60;
break; break;
case IID_ARM_COMBAT: case IID_ARM_COMBAT:
take = take * 0.60; take = take * 0.60;
break; break;
case IID_ARM_SEVA: case IID_ARM_SEVA:
take = take * 0.55; take = take * 0.60;
break; break;
case IID_ARM_FORCE: case IID_ARM_FORCE:
take = take * 0.90; take = take * 0.90;
break; break;
case IID_ARM_LPOWER: case IID_ARM_LPOWER:
take = take * 0.50; take = take * 0.40;
break; break;
default: default:
break; break;

View file

@ -8,6 +8,8 @@ float show_trader;
float show_perks; float show_perks;
float show_items; float show_items;
float show_gainperk; float show_gainperk;
float scrwidth;
float scrheight;
vector mousepos; vector mousepos;
@ -215,6 +217,41 @@ void() ScreenImage =
else if (getstati(57) == 6) else if (getstati(57) == 6)
drawpic('0 0 0', "gui/xcarnage.jpg", w, '1 1 1', 1); drawpic('0 0 0', "gui/xcarnage.jpg", w, '1 1 1', 1);
w = '0 32 0'+('1 0 0'*(scrwidth*0.10))+('0 1 0'*(scrheight*0.20));
if (getstati(57) == 3)
{
if (getstati(105) == 1)
drawstring(w, "the players were slain...", '8 8 8', '1 1 1', 1);
if (getstati(105) == 2)
drawstring(w, "the hostages were slain...", '8 8 8', '1 1 1', 1);
if (getstati(105) == 3)
drawstring(w, "the hostages were saved!", '8 8 8', '1 1 1', 1);
if (getstati(105) == 4)
drawstring(w, "some hostages were saved.", '8 8 8', '1 1 1', 1);
if (getstati(105) == 5)
drawstring(w, "no hostages were saved...", '8 8 8', '1 1 1', 1);
if (getstati(105) == 6)
drawstring(w, "the bombs were defused!", '8 8 8', '1 1 1', 1);
if (getstati(105) == 7)
drawstring(w, "the bombs were not defused...", '8 8 8', '1 1 1', 1);
if (getstati(105) == 8)
drawstring(w, "the supplies were not found...", '8 8 8', '1 1 1', 1);
if (getstati(105) == 9)
drawstring(w, "the supplies were found!", '8 8 8', '1 1 1', 1);
if (getstati(105) == 10)
drawstring(w, "all commanders were slain!", '8 8 8', '1 1 1', 1);
if (getstati(105) == 11)
drawstring(w, "the players did not escape...", '8 8 8', '1 1 1', 1);
if (getstati(105) == 12)
drawstring(w, "the players were discovered...", '8 8 8', '1 1 1', 1);
if (getstati(105) == 13)
drawstring(w, "the fuel tanks were destroyed!", '8 8 8', '1 1 1', 1);
if (getstati(105) == 14)
drawstring(w, "the fuel tanks were not destroyed...", '8 8 8', '1 1 1', 1);
}
}; };
string(float x) GetMonsterName = string(float x) GetMonsterName =
@ -480,19 +517,17 @@ void() Perks_Draw =
if (mousepos_y >= 2.5*IMGSIZEF && mousepos_y <= 3.5*IMGSIZEF)
if (mousepos_y >= 2.0*IMGSIZEF && mousepos_y <= 4*IMGSIZEF)
{ {
if (mousepos_x >= 3*IMGSIZEF && mousepos_x <= 5.5*IMGSIZEF)
if (mousepos_x >= 4*IMGSIZEF && mousepos_x <= 5*IMGSIZEF)
selected_class = 8; selected_class = 8;
else if (mousepos_x >= 6*IMGSIZEF && mousepos_x <= 7.5*IMGSIZEF)
if (mousepos_x >= 6.5*IMGSIZEF && mousepos_x <= 7.5*IMGSIZEF)
selected_class = 9; selected_class = 9;
else
selected_class = 0;
} }
else if (mousepos_y >= 390 && mousepos_y <= 425)
if (mousepos_y >= 390 && mousepos_y <= 425)
{ {
@ -506,7 +541,8 @@ void() Perks_Draw =
else else
selected_class = 0; selected_class = 0;
} }
else
selected_class = 0;
perki = GetPerkImage(getstati(60)); perki = GetPerkImage(getstati(60));
perk2i = GetPerkImage(getstati(59)); perk2i = GetPerkImage(getstati(59));
@ -519,8 +555,8 @@ void() Perks_Draw =
p1 = PerkNameCentered(1, getstati(60)); p1 = PerkNameCentered(1, getstati(60));
p2 = PerkNameCentered(2, getstati(59)); p2 = PerkNameCentered(2, getstati(59));
drawstring('4 4.5 0'*IMGSIZEF - '28 0 0', p1, '8 8 8', '1 1 1', 1); drawstring('4 4.5 0'*IMGSIZEF - '45 0 0', p1, '8 8 8', '1 1 1', 1);
drawstring('6 4.5 0'*IMGSIZEF + '8 0 0', p2, '8 8 8', '1 1 1', 1); drawstring('6 4.5 0'*IMGSIZEF - '7 0 0', p2, '8 8 8', '1 1 1', 1);
@ -606,6 +642,8 @@ void() GainPerk_Draw =
which_perk = 8; which_perk = 8;
else if (mousepos_x >= 5*IMGSIZEF && mousepos_x <= 6*IMGSIZEF) else if (mousepos_x >= 5*IMGSIZEF && mousepos_x <= 6*IMGSIZEF)
which_perk = 9; which_perk = 9;
else if (mousepos_x >= 6*IMGSIZEF && mousepos_x <= 7*IMGSIZEF)
which_perk = 10;
else else
which_perk = 0; which_perk = 0;
} }
@ -613,13 +651,14 @@ void() GainPerk_Draw =
drawpic('2 2 0'*IMGSIZEF, "gui/perks/Support Fire.png", '64 64 0', '1 1 1', 1); drawpic('2 2 0'*IMGSIZEF, "gui/perks/Support Fire.png", '64 64 0', '1 1 1', 1);
drawpic('3 2 0'*IMGSIZEF, "gui/perks/Duck And Cover", '64 64 0', '1 1 1', 1); drawpic('3 2 0'*IMGSIZEF, "gui/perks/Duck And Cover", '64 64 0', '1 1 1', 1);
drawpic('4 2 0'*IMGSIZEF, "gui/perks/Harmless.png", '64 64 0', '1 1 1', 1); drawpic('4 2 0'*IMGSIZEF, "gui/perks/Harmless.png", '64 64 0', '1 1 1', 1);
drawpic('5 2 0'*IMGSIZEF, "gui/perks/Hit The Deck.png", '64 64 0', '1 1 1', 1); drawpic('5 2 0'*IMGSIZEF, "gui/perks/Stay Low.png", '64 64 0', '1 1 1', 1);
drawpic('6 2 0'*IMGSIZEF, "gui/perks/Living Anatomy.png", '64 64 0', '1 1 1', 1); drawpic('6 2 0'*IMGSIZEF, "gui/perks/Surgical Precision.png", '64 64 0', '1 1 1', 1);
drawpic('2 3 0'*IMGSIZEF, "gui/perks/Mutation.png", '64 64 0', '1 1 1', 1); drawpic('2 3 0'*IMGSIZEF, "gui/perks/Mutation.png", '64 64 0', '1 1 1', 1);
drawpic('3 3 0'*IMGSIZEF, "gui/perks/Narrow Escape.png", '64 64 0', '1 1 1', 1); drawpic('3 3 0'*IMGSIZEF, "gui/perks/Narrow Escape.png", '64 64 0', '1 1 1', 1);
drawpic('4 3 0'*IMGSIZEF, "gui/perks/Schizophrenia.png", '64 64 0', '1 1 1', 1); drawpic('4 3 0'*IMGSIZEF, "gui/perks/Schizophrenia.png", '64 64 0', '1 1 1', 1);
drawpic('5 3 0'*IMGSIZEF, "gui/perks/Sleep Tight.png", '64 64 0', '1 1 1', 1); drawpic('5 3 0'*IMGSIZEF, "gui/perks/Sleep Tight.png", '64 64 0', '1 1 1', 1);
drawpic('6 3 0'*IMGSIZEF, "gui/perks/Economic Moves.png", '64 64 0', '1 1 1', 1);
pn = PerkName(1, which_perk); pn = PerkName(1, which_perk);
pd = GetPerkDesc(which_perk); pd = GetPerkDesc(which_perk);
@ -1095,7 +1134,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
return; return;
if (which_perk == getstati(59)) if (which_perk == getstati(59))
return; return;
if (which_perk >= 1 && which_perk <= 9) if (which_perk >= 1 && which_perk <= 10)
localcmd(strcat("cmd gainperk ", ftos(which_perk), " ", ftos(perkslot), "\n")); localcmd(strcat("cmd gainperk ", ftos(which_perk), " ", ftos(perkslot), "\n"));
show_inventory = false; show_inventory = false;
show_pipboy = false; show_pipboy = false;

View file

@ -123,6 +123,23 @@ void() Chem_Draw =
}; };
void() Time_Draw =
{
local float xtime, ytime, ztime;
local string qtime, rtime, shadowtime;
xtime = getstati(104);
ytime = floor(xtime/60);
ztime = xtime - (ytime*60);
qtime = ftos(ytime);
rtime = ftos(ztime);
shadowtime = ftos(getstati(104));
drawstring('0 32 0'+('1 0 0'*(scrwidth*0.10))+('0 1 0'*(scrheight*0.90)), strcat("[", qtime, ":", rtime, "]\n"), '8 8 8', '1 1 1', 1);
};
void() Ammo_Draw = void() Ammo_Draw =
{ {
local float hand, weap, ammo, amount; local float hand, weap, ammo, amount;
@ -418,6 +435,7 @@ void(float vwidth, float vheight, float do2d) CSQC_UpdateView =
GainPerk_Draw(); GainPerk_Draw();
else else
{ {
Time_Draw();
Health_Draw(); Health_Draw();
Weight_Draw(); Weight_Draw();
Money_Draw(); Money_Draw();

View file

@ -682,6 +682,10 @@ float intermission_running;
.float skill_doctor; .float skill_doctor;
.float skill_sneak; .float skill_sneak;
.float skill_science; .float skill_science;
.float shadowskill_combat;
.float shadowskill_doctor;
.float shadowskill_sneak;
.float shadowskill_science;
.float rescued; .float rescued;
.float scale; .float scale;
@ -739,8 +743,12 @@ float intermission_running;
.float lastman; .float lastman;
.float popup; .float popup;
.float flare; .float flare;
.float radiation;
.float perk1timer; .float perk1timer;
.float perk2timer; .float perk2timer;
.float shadowtime;
.float announcercache;
string announcer;
.entity friend; .entity friend;
.entity tumbler1; .entity tumbler1;

View file

@ -183,7 +183,9 @@ void () OpenDoorBeep =
sound (self, CHAN_BODY, "items/lockpick2.wav", 1, ATTN_NORM); sound (self, CHAN_BODY, "items/lockpick2.wav", 1, ATTN_NORM);
x = (2.51 - (2.5*(self.enemy.skill_sneak/30))); x = (2.51 - (2.5*(self.enemy.skill_sneak/7)));
if (x <= 0)
x = 0.1;
self.think = OpenDoorBeep; self.think = OpenDoorBeep;

View file

@ -87,14 +87,9 @@ void (float tmp, float dam) enforcer_single =
else if (self.weapon == 6) else if (self.weapon == 6)
sound (self, CHAN_WEAPON, "weapons/moonlight-2.wav", 1, ATTN_NORM); sound (self, CHAN_WEAPON, "weapons/moonlight-2.wav", 1, ATTN_NORM);
if (self.weapon == 3)
dam = 12; dam = 12;
else if (self.weapon == 4) tmp = 500;
dam = 16;
else if (self.weapon == 5)
dam = 18;
else if (self.weapon == 6)
dam = 16;
self.attack = self.attack + 1; self.attack = self.attack + 1;
@ -189,13 +184,13 @@ void() enf_atk8 =[ $attack3, enf_atk9 ] {ai_face();};
void() enf_atk9 =[ $attack2, enf_atk10 ] {ai_face();}; void() enf_atk9 =[ $attack2, enf_atk10 ] {ai_face();};
void() enf_atk10 =[ $attack1, enf_run1 ] {ai_face();}; void() enf_atk10 =[ $attack1, enf_run1 ] {ai_face();};
void() enf_burst1 =[ $attack5, enf_burst2 ] {enforcer_single(500, 13);}; void() enf_burst1 =[ $attack5, enf_burst2 ] {enforcer_single(600, 13);};
void() enf_burst2 =[ $attack6, enf_burst3 ] {enforcer_single(500, 13);ai_face();}; void() enf_burst2 =[ $attack6, enf_burst3 ] {enforcer_single(600, 13);ai_face();};
void() enf_burst3 =[ $attack5, enf_burst4 ] {enforcer_single(50, 13);}; void() enf_burst3 =[ $attack5, enf_burst4 ] {enforcer_single(600, 13);};
void() enf_burst4 =[ $attack6, enf_burst5 ] {enforcer_single(550, 13);ai_face();}; void() enf_burst4 =[ $attack6, enf_burst5 ] {enforcer_single(650, 13);ai_face();};
void() enf_burst5 =[ $attack5, enf_burst6 ] {enforcer_single(550, 13);}; void() enf_burst5 =[ $attack5, enf_burst6 ] {enforcer_single(650, 13);};
void() enf_burst6 =[ $attack6, enf_burst7 ] {enforcer_single(500, 13);ai_face();}; void() enf_burst6 =[ $attack6, enf_burst7 ] {enforcer_single(650, 13);ai_face();};
void() enf_burst7 =[ $attack5, enf_burst8 ] {enforcer_single(550, 13);}; void() enf_burst7 =[ $attack5, enf_burst8 ] {enforcer_single(650, 13);};
void() enf_burst8 =[ $attack4, enf_burst9 ] {enforcer_single(700, 13);ai_face();}; void() enf_burst8 =[ $attack4, enf_burst9 ] {enforcer_single(700, 13);ai_face();};
void() enf_burst9 =[ $attack3, enf_burst10 ] {ai_face();}; void() enf_burst9 =[ $attack3, enf_burst10 ] {ai_face();};
void() enf_burst10 =[ $attack2, enf_run1 ] {ai_face();}; void() enf_burst10 =[ $attack2, enf_run1 ] {ai_face();};
@ -452,7 +447,7 @@ void() monster_enforcer =
self.netname = "enforcer"; self.netname = "enforcer";
setsize (self, '-12 -12 -24', '12 12 32'); setsize (self, '-12 -12 -24', '12 12 32');
self.health = 200; self.health = 150;
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;

View file

@ -151,6 +151,8 @@ void(entity attacker, float damage) fish_pain =
void() monster_fish = void() monster_fish =
{ {
precache_model2 ("progs/fish.mdl"); precache_model2 ("progs/fish.mdl");
precache_sound2 ("fish/death.wav"); precache_sound2 ("fish/death.wav");
@ -174,7 +176,8 @@ void() monster_fish =
self.th_die = f_death1; self.th_die = f_death1;
self.th_pain = fish_pain; self.th_pain = fish_pain;
self.th_melee = f_attack1; self.th_melee = f_attack1;
swimmonster_start (); remove(self);
//swimmonster_start ();
}; };

View file

@ -22,82 +22,83 @@ void () hos_stand5 = [ 15, hos_stand1 ]
void () hos_run1 = [ 0, hos_run2 ] void () hos_run1 = [ 0, hos_run2 ]
{ {
hos_forward (MULTICAST_PVS_R); ai_forward(5);
}; };
void () hos_run2 = [ 1, hos_run3 ] void () hos_run2 = [ 1, hos_run3 ]
{ {
hos_forward (AS_MELEE); ai_forward(5);
}; };
void () hos_run3 = [ 2, hos_run4 ] void () hos_run3 = [ 2, hos_run4 ]
{ {
hos_forward (MULTICAST_PVS_R); ai_forward(5);
}; };
void () hos_run4 = [ 3, hos_run5 ] void () hos_run4 = [ 3, hos_run5 ]
{ {
hos_forward (AS_MELEE); ai_forward(5);
}; };
void () hos_run5 = [ 4, hos_run6 ] void () hos_run5 = [ 4, hos_run6 ]
{ {
hos_forward (MULTICAST_PVS_R); ai_forward(5);
}; };
void () hos_run6 = [ 5, hos_run1 ] void () hos_run6 = [ 5, hos_run1 ]
{ {
hos_forward (AS_MELEE); ai_forward(5);
}; };
void () hos_walk1 = [ 16, hos_walk2 ] void () hos_walk1 = [ 16, hos_walk2 ]
{ {
hos_forward (MULTICAST_PVS_R); ai_forward(5);
}; };
void () hos_walk2 = [ 17, hos_walk3 ] void () hos_walk2 = [ 17, hos_walk3 ]
{ {
hos_forward (AS_MELEE); ai_forward(5);
}; };
void () hos_walk3 = [ 18, hos_walk4 ] void () hos_walk3 = [ 18, hos_walk4 ]
{ {
hos_forward (MULTICAST_PVS_R); ai_forward(5);
}; };
void () hos_walk4 = [ 19, hos_walk5 ] void () hos_walk4 = [ 19, hos_walk5 ]
{ {
hos_forward (AS_MELEE); ai_forward(5);
}; };
void () hos_walk5 = [ 20, hos_walk6 ] void () hos_walk5 = [ 20, hos_walk6 ]
{ {
hos_forward (MULTICAST_PVS_R); ai_forward(5);
}; };
void () hos_walk6 = [ 21, hos_walk7 ] void () hos_walk6 = [ 21, hos_walk7 ]
{ {
hos_forward (AS_MELEE); ai_forward(5);
}; };
void () hos_walk7 = [ 22, hos_walk8 ] void () hos_walk7 = [ 22, hos_walk8 ]
{ {
hos_forward (MULTICAST_PVS_R); self.angles_y = random()*360;
ai_forward(5);
}; };
void () hos_walk8 = [ 23, hos_walk9 ] void () hos_walk8 = [ 23, hos_walk9 ]
{ {
hos_forward (AS_MELEE); ai_forward(5);
}; };
void () hos_walk9 = [ 24, hos_walk10 ] void () hos_walk9 = [ 24, hos_walk10 ]
{ {
hos_forward (MULTICAST_PVS_R); ai_forward(5);
}; };
void () hos_walk10 = [ 25, hos_walk1 ] void () hos_walk10 = [ 25, hos_walk1 ]
{ {
hos_forward (AS_MELEE); ai_forward(5);
}; };
void () hos_deatha1 = [ 6, hos_deatha2 ] void () hos_deatha1 = [ 6, hos_deatha2 ]
@ -251,7 +252,7 @@ void (vector jojo) spawn_civilian =
self.netname = "civilian"; self.netname = "civilian";
self.classname = "rhostage"; self.classname = "rhostage";
self.max_health = self.health; self.max_health = self.health;
hos_stand1 (); hos_walk1 ();
self.th_die = hostage_die; self.th_die = hostage_die;
self.th_pain = hostage_pain; self.th_pain = hostage_pain;
self.rescued = 0; self.rescued = 0;
@ -285,7 +286,7 @@ void (vector jojo) spawn_civilian =
} }
} }
te = findradius (self.origin, 40); te = findradius (self.origin, 24);
while (te) while (te)
{ {
if (te.classname == "player" || te.classname == "monster" && te.health > 0) if (te.classname == "player" || te.classname == "monster" && te.health > 0)

View file

@ -1111,17 +1111,17 @@ float(float iid) GetItemWeight =
if (iid == IID_ARM_VANDAL) if (iid == IID_ARM_VANDAL)
return 10; return 10;
if (iid == IID_ARM_METAL) if (iid == IID_ARM_METAL)
return 20; return 25;
if (iid == IID_ARM_TESLA) if (iid == IID_ARM_TESLA)
return 12; return 10;
if (iid == IID_ARM_COMBAT) if (iid == IID_ARM_COMBAT)
return 14; return 15;
if (iid == IID_ARM_SEVA) if (iid == IID_ARM_SEVA)
return 16; return 15;
if (iid == IID_ARM_FORCE) if (iid == IID_ARM_FORCE)
return 9; return 10;
if (iid == IID_ARM_LPOWER) if (iid == IID_ARM_LPOWER)
return 20; return 35;
if (iid == IID_BUILD_MRAMMO) if (iid == IID_BUILD_MRAMMO)
return 2; return 2;
@ -1281,7 +1281,7 @@ string(float iid) GetItemName =
if (iid == IID_GREN_STUN) if (iid == IID_GREN_STUN)
return "stun grenade"; return "stun grenade";
if (iid == IID_GREN_FRAG) if (iid == IID_GREN_FRAG)
return "frag grenade"; return "nuka grenade";
if (iid == IID_GREN_EMP) if (iid == IID_GREN_EMP)
return "emp grenade"; return "emp grenade";
if (iid == IID_GREN_SMOKE) if (iid == IID_GREN_SMOKE)
@ -1587,7 +1587,7 @@ float(float iid) GetBaseValue =
if (iid == IID_EQUIP_TOOLKIT) if (iid == IID_EQUIP_TOOLKIT)
return 50; return 50;
if (iid == IID_EQUIP_BACKPACK) if (iid == IID_EQUIP_BACKPACK)
return 100; return 10;
if (iid == IID_EQUIP_CLIMBINGGEAR) if (iid == IID_EQUIP_CLIMBINGGEAR)
return 150; return 150;
if (iid == IID_EQUIP_BATTERY) if (iid == IID_EQUIP_BATTERY)
@ -2578,9 +2578,9 @@ string (float slot, float int) PerkName =
if (int == 3) if (int == 3)
return "Harmless"; return "Harmless";
if (int == 4) if (int == 4)
return "Hit The Deck"; return "Stay Low";
if (int == 5) if (int == 5)
return "Living Anatomy"; return "Surgical Precision";
if (int == 6) if (int == 6)
return "Mutation"; return "Mutation";
if (int == 7) if (int == 7)
@ -2596,25 +2596,25 @@ string (float slot, float int) PerkName =
string (float slot, float int) PerkNameCentered = string (float slot, float int) PerkNameCentered =
{ {
if (int == 1) if (int == 1)
return " Support Fire"; return " Support Fire";
if (int == 2) if (int == 2)
return "Duck And Cover"; return " Duck And Cover";
if (int == 3) if (int == 3)
return " Harmless"; return " Harmless";
if (int == 4) if (int == 4)
return " Hit The Deck"; return " Stay Low";
if (int == 5) if (int == 5)
return "Living Anatomy"; return "Surgical Precision";
if (int == 6) if (int == 6)
return " Mutation"; return " Mutation";
if (int == 7) if (int == 7)
return "Narrow Escape"; return " Narrow Escape";
if (int == 8) if (int == 8)
return "Schizophrenia"; return " Schizophrenia";
if (int == 9) if (int == 9)
return " Sleep Tight"; return " Sleep Tight";
if (int == 10) if (int == 10)
return "Economic Moves"; return " Economic Moves";
}; };
@ -2627,9 +2627,9 @@ string(float int) GetPerkImage =
else if (int == 3) else if (int == 3)
return "gui/perks/Harmless.jpg"; return "gui/perks/Harmless.jpg";
else if (int == 4) else if (int == 4)
return "gui/perks/Hit The Deck.jpg"; return "gui/perks/Stay Low.jpg";
else if (int == 5) else if (int == 5)
return "gui/perks/Living Anatomy.jpg"; return "gui/perks/Surgical Precision.jpg";
else if (int == 6) else if (int == 6)
return "gui/perks/Mutation.jpg"; return "gui/perks/Mutation.jpg";
else if (int == 7) else if (int == 7)
@ -2663,9 +2663,9 @@ string(float int) GetPerkDesc =
else if (int == 7) else if (int == 7)
return "Provides you a few hassle-free seconds to escape danger"; return "Provides you a few hassle-free seconds to escape danger";
else if (int == 8) else if (int == 8)
return "You sometimes gain additional skills from another place"; return "You may gain additional skills from an unknown source";
else if (int == 9) else if (int == 9)
return "Automatically kill anything with knife in sneak mode"; return "Paralyze anything with a sneak attack from a knife";
else if (int == 10) else if (int == 10)
return "Suffer less time-related penalties for all actions"; return "Suffer less time-related penalties for all actions";
else else

View file

@ -291,9 +291,6 @@ void(vector loc) SpawnJunk =
{ {
local entity junk; local entity junk;
if (random()*100 <= 80)
return;
junk = spawn (); junk = spawn ();
setorigin(junk, loc + '0 0 96'); setorigin(junk, loc + '0 0 96');
@ -319,11 +316,13 @@ void(vector loc) SpawnJunk =
if (random()*100 <= 25) if (random()*100 <= 50)
junk.islot1 = SlotVal(IID_MISC_NUKACOLA, 1); junk.islot1 = SlotVal(IID_MISC_HMXCOMPOUND, 1);
else if (random()*100 <= 25) else if (random()*100 <= 50)
junk.islot1 = SlotVal(IID_MISC_CHEMICALS, 1); junk.islot1 = SlotVal(IID_MISC_CHEMICALS, 1);
else if (random()*100 <= 25) else if (random()*100 <= 33)
junk.islot1 = SlotVal(IID_MISC_NUKACOLA, 1);
else if (random()*100 <= 33)
junk.islot1 = SlotVal(IID_MISC_AEROSOL, 1); junk.islot1 = SlotVal(IID_MISC_AEROSOL, 1);
else if (random()*100 <= 10) else if (random()*100 <= 10)
junk.islot1 = SlotVal(IID_MISC_RDXCRYSTAL, 1); junk.islot1 = SlotVal(IID_MISC_RDXCRYSTAL, 1);
@ -337,8 +336,6 @@ void(vector loc) SpawnJunk =
junk.islot1 = SlotVal(IID_MISC_CIRCUITBOARD, 1); junk.islot1 = SlotVal(IID_MISC_CIRCUITBOARD, 1);
else if (random()*100 <= 10) else if (random()*100 <= 10)
junk.islot1 = SlotVal(IID_MISC_COPPERWIRE, 1); junk.islot1 = SlotVal(IID_MISC_COPPERWIRE, 1);
else if (random()*100 <= 10)
junk.islot1 = SlotVal(IID_MISC_HMXCOMPOUND, 1);
else if (random()*100 <= 10) else if (random()*100 <= 10)
junk.islot1 = SlotVal(IID_MISC_GUM, 1); junk.islot1 = SlotVal(IID_MISC_GUM, 1);
else else
@ -853,7 +850,7 @@ float (entity to, float iid, float quant) TryGiveStackable =
local float item; local float item;
local float x; local float x;
x = 300; x = 400;
if (ToIID(self.islot4) == IID_EQUIP_BACKPACK) if (ToIID(self.islot4) == IID_EQUIP_BACKPACK)
x = 600; x = 600;

View file

@ -934,19 +934,19 @@ void() brotherhood_merchant =
self.xslot1 = SlotVal(IID_WP_USP, 1); self.xslot1 = SlotVal(IID_WP_USP, 1);
self.xslot6 = SlotVal(IID_AM_45ACP, 30); self.xslot6 = SlotVal(IID_AM_45ACP, 100);
self.xslot2 = SlotVal(IID_WP_PIPERIFLE, 1); self.xslot2 = SlotVal(IID_WP_PIPERIFLE, 1);
self.xslot7 = SlotVal(IID_AM_44MAGNUM, 30); self.xslot7 = SlotVal(IID_AM_44MAGNUM, 100);
self.xslot3 = SlotVal(IID_WP_WINCHESTER, 1); self.xslot3 = SlotVal(IID_WP_WINCHESTER, 1);
self.xslot8 = SlotVal(IID_AM_12GAUGESHELLS, 30); self.xslot8 = SlotVal(IID_AM_12GAUGESHELLS, 100);
self.xslot4 = SlotVal(IID_WP_RANGEMASTER, 1); self.xslot4 = SlotVal(IID_WP_RANGEMASTER, 1);
self.xslot9 = SlotVal(IID_AM_556MM, 30); self.xslot9 = SlotVal(IID_AM_556MM, 100);
self.xslot5 = SlotVal(IID_WP_MP9, 1); self.xslot5 = SlotVal(IID_WP_MP9, 1);
self.xslot10 = SlotVal(IID_AM_10MM, 30); self.xslot10 = SlotVal(IID_AM_10MM, 100);
@ -961,14 +961,14 @@ void() brotherhood_merchant =
self.xslot16 = SlotVal(IID_WP_DKS1, 1); self.xslot16 = SlotVal(IID_WP_DKS1, 1);
self.xslot17 = SlotVal(IID_AM_762MM, 30); self.xslot17 = SlotVal(IID_AM_762MM, 100);
self.xslot18 = SlotVal(IID_WP_ALIENBLASTER, 1); self.xslot18 = SlotVal(IID_WP_ALIENBLASTER, 1);
self.xslot19 = SlotVal(IID_AM_ENERGYCELL, 30); self.xslot19 = SlotVal(IID_AM_ENERGYCELL, 100);
if (random()*100 < 20) if (random()*100 < 20)
self.xslot20 = SlotVal(IID_AM_ENERGYCELL, 30); self.xslot20 = SlotVal(IID_AM_ENERGYCELL, 100);
else if (random()*100 < 20) else if (random()*100 < 20)
self.xslot20 = SlotVal(IID_EQUIP_BELTPOUCH, 1); self.xslot20 = SlotVal(IID_EQUIP_BELTPOUCH, 1);
else if (random()*100 < 20) else if (random()*100 < 20)
@ -1004,15 +1004,17 @@ 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, 30); self.xslot1 = SlotVal(IID_AM_45ACP, 100);
self.xslot2 = SlotVal(IID_AM_10MM, 30); self.xslot2 = SlotVal(IID_AM_10MM, 100);
self.xslot3 = SlotVal(IID_AM_12GAUGESHELLS, 30); self.xslot3 = SlotVal(IID_AM_12GAUGESHELLS, 100);
self.xslot4 = SlotVal(IID_AM_5MMHIGHVEL, 30); self.xslot4 = SlotVal(IID_AM_5MMHIGHVEL, 100);
self.xslot5 = SlotVal(IID_AM_762MM, 30); self.xslot5 = SlotVal(IID_AM_762MM, 100);
self.xslot6 = SlotVal(IID_AM_556MM, 30); self.xslot6 = SlotVal(IID_AM_556MM, 100);
self.xslot7 = SlotVal(IID_AM_ENERGYCELL, 30); self.xslot7 = SlotVal(IID_AM_ENERGYCELL, 100);
self.xslot8 = SlotVal(IID_AM_CASELESS, 30); self.xslot8 = SlotVal(IID_AM_CASELESS, 100);
self.xslot9 = SlotVal(IID_AM_NEEDLER, 30); self.xslot9 = SlotVal(IID_AM_NEEDLER, 100);
self.xslot12 = SlotVal(IID_EQUIP_STEALTHBOY, 1);
self.xslot13 = SlotVal(IID_EQUIP_BACKPACK, 1);
self.xslot14 = SlotVal(IID_WP_AK112, 1); self.xslot14 = SlotVal(IID_WP_AK112, 1);
self.xslot15 = SlotVal(IID_WP_ACR, 1); self.xslot15 = SlotVal(IID_WP_ACR, 1);
self.xslot16 = SlotVal(IID_WP_AK112_M, 1); self.xslot16 = SlotVal(IID_WP_AK112_M, 1);

View file

@ -122,10 +122,10 @@ void (float tmp, float dam) ogre_smg =
sound (self, CHAN_WEAPON, "weapons/mp7.wav", 1, ATTN_NORM); sound (self, CHAN_WEAPON, "weapons/mp7.wav", 1, ATTN_NORM);
tmp = 350; tmp = 300;
dam = 15; dam = 10;
if (self.enemy.sneak == 1) if (self.enemy.sneak == 1)
tmp = tmp * 2; tmp = tmp * 2;

View file

@ -1321,6 +1321,10 @@ void () army_die10 = [ 17, army_die10 ]
void () army_cdie1 = [ 18, army_cdie2 ] void () army_cdie1 = [ 18, army_cdie2 ]
{ {
if (random()*4 <= 2)
sound (self, CHAN_VOICE, "player/agdie2.wav", 1, ATTN_NORM);
else
sound (self, CHAN_VOICE, "player/agdie3.wav", 1, ATTN_NORM);
}; };
void () army_cdie2 = [ 19, army_cdie3 ] void () army_cdie2 = [ 19, army_cdie3 ]
@ -1459,16 +1463,7 @@ void () army_die =
if (random()<0.75) if (random()<0.75)
DropMoney(); DropMoney();
if (r <= 0.20)
sound (self, CHAN_VOICE, "player/agdie1.wav", 1, ATTN_NORM);
else if (r <= 0.40)
sound (self, CHAN_VOICE, "player/agdie2.wav", 1, ATTN_NORM);
else if (r <= 0.60)
sound (self, CHAN_VOICE, "player/agdie3.wav", 1, ATTN_NORM);
else if (r <= 0.80)
sound (self, CHAN_VOICE, "player/agdie4.wav", 1, ATTN_NORM);
else
sound (self, CHAN_VOICE, "player/agdie5.wav", 1, ATTN_NORM);
DeathThroes(); DeathThroes();
@ -1514,7 +1509,7 @@ void (vector jojo, entity friend) spawn_soldier =
setmodel (self, "progs/soldier.mdl"); setmodel (self, "progs/soldier.mdl");
setsize (self, '-12 -12 -24', '12 12 28'); setsize (self, '-12 -12 -24', '12 12 28');
self.netname = "raider"; self.netname = "raider";
self.max_health = 150; self.max_health = 80;
self.health = self.max_health; self.health = self.max_health;
self.armornoise = "misc/thud.wav"; self.armornoise = "misc/thud.wav";
self.th_stand = army_stand1; self.th_stand = army_stand1;
@ -1708,7 +1703,7 @@ void () monster_army =
self.movetype = MOVETYPE_STEP; self.movetype = MOVETYPE_STEP;
setmodel (self, "progs/soldier.mdl"); setmodel (self, "progs/soldier.mdl");
setsize (self, '-12 -12 -24', '12 12 28'); setsize (self, '-12 -12 -24', '12 12 28');
self.max_health = 150; 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);
@ -1904,7 +1899,7 @@ void () monster_commander =
commanders = commanders + 1; commanders = commanders + 1;
setsize (self, '-12 -12 -24', '12 12 32'); setsize (self, '-12 -12 -24', '12 12 32');
self.max_health =250; 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;

View file

@ -11,6 +11,7 @@ void (string snd, float type) function_radio;
void () MapInfo; void () MapInfo;
void (entity targ, entity inflictor, entity attacker, float damage) T_Damage; void (entity targ, entity inflictor, entity attacker, float damage) T_Damage;
void () player_run; void () player_run;
void () walkmonster_start;
void(entity bomb, entity attacker, float rad, entity ignore, string dtype) T_RadiusDamage; void(entity bomb, entity attacker, float rad, entity ignore, string dtype) T_RadiusDamage;
void(entity bomb, entity attacker, float rad, entity ignore, float xrange) T_RadiusDamage2; void(entity bomb, entity attacker, float rad, entity ignore, float xrange) T_RadiusDamage2;
void() ZoomIn; void() ZoomIn;
@ -29,6 +30,7 @@ void (float dam, float rec, string snd, float rng, float rate) FireSMG;
float() FireToolkit; float() FireToolkit;
void () HostageReport; void () HostageReport;
void (entity jeb, float time) spawn_excla; void (entity jeb, float time) spawn_excla;
void (entity jeb, float time) spawn_stop;
void () FireAlienBlaster; void () FireAlienBlaster;
void () W_PlayerMenu; void () W_PlayerMenu;
void () player_single_shot; void () player_single_shot;
@ -124,7 +126,7 @@ void(float slotno) UsePerk =
return; return;
} }
if (self.perk1 == 7 || self.perk2 == 7) if ((self.perk1 == 7 && slotno == 1) || (self.perk2 == 7 && slotno == 2))
{ {
if (slotno == 1) if (slotno == 1)
self.perk1timer = 2000; self.perk1timer = 2000;
@ -137,8 +139,10 @@ void(float slotno) UsePerk =
while (te) while (te)
{ {
if (te.classname == "monster") if (te.classname == "monster")
te.hold = 100; {
te.hold = 80;
spawn_stop(te, 10);
}
te = te.chain; te = te.chain;
} }
} }
@ -1931,12 +1935,7 @@ void () ProneOn =
self.position = 2; self.position = 2;
self.view_ofs = '0 0 -10'; self.view_ofs = '0 0 -10';
sprint (self, 2, "position: prone.\n"); sprint (self, 2, "position: prone.\n");
if (getperk(10)) if (!getperk(10))
{
self.attack_finished = time + 0.5;
self.rtime = time + 0.5;
}
else
{ {
self.attack_finished = time + 1.5; self.attack_finished = time + 1.5;
self.rtime = time + 1.5; self.rtime = time + 1.5;
@ -2502,7 +2501,7 @@ void () Explosion =
//self.nextthink = (time + 0.02); //self.nextthink = (time + 0.02);
}; };
void () FragExplode = void (float skill) FragExplode =
{ {
local float r, d; local float r, d;
local entity te; local entity te;
@ -2514,7 +2513,6 @@ void () FragExplode =
setorigin (self, self.origin); setorigin (self, self.origin);
setsize (self, '0 0 0', '0 0 0'); setsize (self, '0 0 0', '0 0 0');
bprint(2, "fragex\n");
Explosion(); Explosion();
te = findradius(self.origin, 400); te = findradius(self.origin, 400);
@ -2531,10 +2529,10 @@ void () FragExplode =
te = te.chain; te = te.chain;
} }
r = 400 + self.skill_science*2; r = 200 + skill*20;
d = 65+random()*65 + self.skill_science; d = 10 + skill*10;
T_RadiusDamage2 (self, self.owner, 65+random()*65, other, r); T_RadiusDamage2 (self, self.owner, d+random()*40, other, r);
remove (self); remove (self);
}; };
@ -4215,8 +4213,8 @@ void () UseStimpack =
thing = thing.chain; thing = thing.chain;
} }
self.health = self.health + 10 + (self.skill_doctor/2); self.health = self.health + 30 + (self.skill_doctor);
self.regen = self.regen + (3 + (self.skill_doctor/2)); self.regen = self.regen + (5 + (self.skill_doctor/2));
} }
} }
else if (trace_ent.classname == "player")//healing another team-mate else if (trace_ent.classname == "player")//healing another team-mate
@ -4287,7 +4285,7 @@ void () UseStimpack =
sprint(self, PRINT_MEDIUM, trace_ent.netname); sprint(self, PRINT_MEDIUM, trace_ent.netname);
sprint(self, PRINT_MEDIUM, " with a stimpack\n"); sprint(self, PRINT_MEDIUM, " with a stimpack\n");
trace_ent.health = trace_ent.health + 10 + (self.skill_doctor/2); trace_ent.health = trace_ent.health + 30 + (self.skill_doctor);
trace_ent.regen = trace_ent.regen + (3 + (self.skill_doctor/2)); trace_ent.regen = trace_ent.regen + (3 + (self.skill_doctor/2));
} }
} }
@ -4439,13 +4437,13 @@ void () UseMedicalBag =
while (thing) while (thing)
{ {
if (thing.classname == "player" && (thing.health+20) < self.health) if (thing.classname == "player" && (thing.health+20) < self.health)
self.score = self.score - 50; self.score = self.score - 25;
thing = thing.chain; thing = thing.chain;
} }
sound (self, CHAN_BODY, "items/r_item1.wav", 1, ATTN_NORM); sound (self, CHAN_BODY, "items/r_item1.wav", 1, ATTN_NORM);
sprint(self, PRINT_MEDIUM, "you start to bandage yourself\n"); self.health = self.health + 5 + (self.skill_doctor/2);
self.regen = self.regen + 3 + (self.skill_doctor/2); self.regen = self.regen + 3 + (self.skill_doctor/2);
} }
} }
@ -4495,13 +4493,8 @@ void () UseMedicalBag =
else else
{ {
sound (trace_ent, CHAN_BODY, "items/r_item1.wav", 1, ATTN_NORM); sound (trace_ent, CHAN_BODY, "items/r_item1.wav", 1, ATTN_NORM);
self.score = self.score + 10; self.score = self.score + 1;
sprint(trace_ent, PRINT_MEDIUM, self.netname); trace_ent.health = trace_ent.health + 5 + (self.skill_doctor/2);
sprint(trace_ent, PRINT_MEDIUM, " bandages your wounds\n");
sprint(self, PRINT_MEDIUM, "you heal ");
sprint(self, PRINT_MEDIUM, trace_ent.netname);
sprint(self, PRINT_MEDIUM, " with a stimpack\n");
trace_ent.regen = trace_ent.regen + 3 + (self.skill_doctor/2); trace_ent.regen = trace_ent.regen + 3 + (self.skill_doctor/2);
} }
} }
@ -5127,8 +5120,7 @@ void () Sneak =
if (self.sneak >= 1) if (self.sneak >= 1)
{ {
sound (self, CHAN_BODY, "items/inv1.wav", 1, ATTN_NORM); sound (self, CHAN_BODY, "items/r_tele4.wav", 1, ATTN_NORM);
centerprint (self, "<EFBFBD> Uncloaked <20>\n");
setmodel (self, "progs/guy.mdl"); setmodel (self, "progs/guy.mdl");
self.sneak = 0; self.sneak = 0;
return; return;
@ -5137,7 +5129,6 @@ void () Sneak =
{ {
disappear(); disappear();
sound (self, CHAN_BODY, "items/inv1.wav", 1, ATTN_NORM); sound (self, CHAN_BODY, "items/inv1.wav", 1, ATTN_NORM);
centerprint (self, "<EFBFBD> sneaking <20>\n");
self.sneak = 1; self.sneak = 1;
return; return;
} }
@ -5377,29 +5368,19 @@ void () Bar_Think =
{ {
local float dot1; local float dot1;
if (self.owner.health >= self.owner.max_health)
{
self.frame = 0;
setmodel (self, "");
self.nextthink = time + 0.01;
return;
}
self.flags = self.flags; self.flags = self.flags;
if (self.owner.health >= 1) self.frame = floor (((self.owner.health / self.owner.max_health) * TE_WIZSPIKE));
{
self.frame = floor (((self.owner.health / self.owner.max_health) * TE_WIZSPIKE));
if (self.owner.position == 0)
setorigin (self, (self.owner.origin + '0 0 40'));
else if (self.owner.position == 1)
setorigin (self, (self.owner.origin + '0 0 32'));
else
setorigin (self, (self.owner.origin + '0 0 24'));
self.nextthink = (time + 0.01); if (self.owner.position == 0)
setmodel (self, "progs/hbar.spr"); setorigin (self, (self.owner.origin + '0 0 40'));
} else if (self.owner.position == 1)
setorigin (self, (self.owner.origin + '0 0 32'));
else
setorigin (self, (self.owner.origin + '0 0 24'));
self.nextthink = (time + 0.01);
setmodel (self, "progs/hbar.spr");
}; };
void (entity guy) spawn_dot = void (entity guy) spawn_dot =
@ -6181,7 +6162,25 @@ void (entity jeb, float length) spawn_excla =
hologram.solid = SOLID_NOT; hologram.solid = SOLID_NOT;
hologram.owner = jeb; hologram.owner = jeb;
setmodel (hologram, "progs/radio.spr"); setmodel (hologram, "progs/radio.spr");
setorigin (hologram, jeb.origin); 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 = radio_think;
hologram.nextthink = (time + 0.01);
};
void (entity jeb, float length) spawn_stop =
{
local entity hologram;
hologram = spawn ();
hologram.movetype = MOVETYPE_NONE;
hologram.solid = SOLID_NOT;
hologram.owner = jeb;
setmodel (hologram, "progs/stop.spr");
setorigin (hologram, jeb.origin + '0 0 48');
setsize (hologram, VEC_ORIGIN, VEC_ORIGIN); setsize (hologram, VEC_ORIGIN, VEC_ORIGIN);
hologram.angles = jeb.angles; hologram.angles = jeb.angles;
hologram.colormap = jeb.colormap; hologram.colormap = jeb.colormap;
@ -6397,7 +6396,9 @@ float(vector org) light_level =
local float brightness; local float brightness;
light = getlight(self.origin); light = getlight(self.origin);
brightness = light_x*0.3 + light_y*0.51 + light_z*0.2; //brightness = light_x*0.3 + light_y*0.51 + light_z*0.2;
brightness = light_x + light_y + light_z;
return brightness; return brightness;
}; };
@ -6413,6 +6414,13 @@ void() show_light_level =
bprint(2, "light level: "); bprint(2, "light level: ");
bprint(2, y); bprint(2, y);
bprint(2, "\n"); bprint(2, "\n");
x = self.waterlevel;
y = ftos(x);
bprint(2, "water level: ");
bprint(2, y);
bprint(2, "\n");
}; };
void() AttachSilencer = void() AttachSilencer =

File diff suppressed because it is too large Load diff

View file

@ -83,7 +83,14 @@ void() zombie_cruc6 = [ $cruc_6, zombie_cruc1 ] {self.nextthink = time + 0.1 +
void() zombie_walk1 =[ $walk1, zombie_walk2 ] {ai_walk(3);}; void() zombie_walk1 =[ $walk1, zombie_walk2 ] {ai_walk(3);};
void() zombie_walk2 =[ $walk2, zombie_walk3 ] {ai_walk(3);}; void() zombie_walk2 =[ $walk2, zombie_walk3 ] {ai_walk(3);};
void() zombie_walk3 =[ $walk3, zombie_walk4 ] {ai_walk(3);}; void() zombie_walk3 =[ $walk3, zombie_walk4 ] {ai_walk(3);
if (self.takedamage == DAMAGE_NO)
{
remove(self);
return;
}
};
void() zombie_walk4 =[ $walk4, zombie_walk5 ] {ai_walk(3);}; void() zombie_walk4 =[ $walk4, zombie_walk5 ] {ai_walk(3);};
void() zombie_walk5 =[ $walk5, zombie_walk6 ] {ai_walk(3);}; void() zombie_walk5 =[ $walk5, zombie_walk6 ] {ai_walk(3);};
void() zombie_walk6 =[ $walk6, zombie_walk7 ] {ai_walk(3);}; void() zombie_walk6 =[ $walk6, zombie_walk7 ] {ai_walk(3);};
@ -105,7 +112,14 @@ if (random() < 0.2)
sound (self, CHAN_VOICE, "zombie/z_idle.wav", 1, ATTN_IDLE);}; sound (self, CHAN_VOICE, "zombie/z_idle.wav", 1, ATTN_IDLE);};
void() zombie_run1 =[ $run1, zombie_run2 ] {ai_run(4);self.inpain = 0;}; void() zombie_run1 =[ $run1, zombie_run2 ] {ai_run(4);self.inpain = 0;};
void() zombie_run2 =[ $run2, zombie_run3 ] {ai_run(4);}; void() zombie_run2 =[ $run2, zombie_run3 ] {ai_run(4);
if (self.takedamage == DAMAGE_NO)
{
remove(self);
return;
}
};
void() zombie_run3 =[ $run3, zombie_run4 ] {ai_run(4);}; void() zombie_run3 =[ $run3, zombie_run4 ] {ai_run(4);};
void() zombie_run4 =[ $run4, zombie_run5 ] {ai_run(4);}; void() zombie_run4 =[ $run4, zombie_run5 ] {ai_run(4);};
void() zombie_run5 =[ $run5, zombie_run6 ] {ai_run(4);}; void() zombie_run5 =[ $run5, zombie_run6 ] {ai_run(4);};
@ -517,7 +531,10 @@ void() zdie6 =[ $painb6, zdie7 ] {};
void() zdie7 =[ $painb7, zdie8 ] {}; void() zdie7 =[ $painb7, zdie8 ] {};
void() zdie8 =[ $painb8, zdie9 ] {}; void() zdie8 =[ $painb8, zdie9 ] {};
void() zdie9 =[ $painb9, zdie10] {}; void() zdie9 =[ $painb9, zdie10] {};
void() zdie10 =[ $painb10, zdie10] {}; void() zdie10 =[ $painb10, zdie10] {
self.think = SUB_Remove;
self.nextthink = time + 20;
};
void () zombie_death = void () zombie_death =
@ -538,7 +555,7 @@ void () zombie_death =
SpawnBlood (self.origin + '0 0 4', 4); SpawnBlood (self.origin + '0 0 4', 4);
self.think = SUB_Remove; self.think = SUB_Remove;
self.nextthink = time + 30; self.nextthink = time + 10;
self.health = 180; self.health = 180;
return; return;
} }
@ -708,7 +725,30 @@ void () spawn_ghoul_copy =
local entity zombie, lair; local entity zombie, lair;
local entity te, ze; local entity te, ze;
local vector jojo; local vector jojo;
local float zomc, pcount; local float zomc, pcount, loadzombie;
local string finder;
local vector stuff;
self.think = spawn_ghoul_copy;
self.nextthink = time + 20 + random()*10;
stuff = self.origin;
loadzombie = 0;
te = findradius (self.origin, 800);
while (te)
{
if (te.classname == "player")
loadzombie = 1;
te = te.chain;
}
ze = find (world, netname, "ghoul"); ze = find (world, netname, "ghoul");
@ -719,7 +759,7 @@ void () spawn_ghoul_copy =
zomc = zomc + 1; zomc = zomc + 1;
ze = find (ze, netname, "ghoul"); ze = find (ze, netname, "monster");
} }
ze = find(world, classname, "player"); ze = find(world, classname, "player");
@ -731,7 +771,7 @@ void () spawn_ghoul_copy =
ze = find(ze, classname, "player"); ze = find(ze, classname, "player");
} }
if (zomc > 25*pcount) if (zomc > 60*pcount)
return; return;
zombie = spawn (); zombie = spawn ();
@ -749,10 +789,10 @@ void () spawn_ghoul_copy =
self.th_pain = zombie_pain; self.th_pain = zombie_pain;
self.th_die = zombie_die; self.th_die = zombie_die;
self.th_melee = zombie_melee; self.th_melee = zombie_melee;
self.th_missile = zombie_missile;
self.angles_y = random()*360; self.angles_y = random()*360;
self.origin = self.origin + '0 64 0'; self.origin = stuff + '0 16 0';
self.origin_z = self.origin_z + 1; self.origin_z = self.origin_z + 1;
droptofloor(); droptofloor();
@ -802,6 +842,8 @@ void (vector jojo) spawn_ghoul =
local entity zombie, lair; local entity zombie, lair;
local entity te, ze; local entity te, ze;
local float stop; local float stop;
local vector jojo;
local float zomc, pcount;
ze = findradius(jojo, 256); ze = findradius(jojo, 256);
@ -822,9 +864,8 @@ void (vector jojo) spawn_ghoul =
self.movetype = MOVETYPE_STEP; self.movetype = MOVETYPE_STEP;
setsize (self, '0 0 0', '0 0 0'); setsize (self, '0 0 0', '0 0 0');
self.netname = "lair"; self.netname = "lair";
self.nextthink = time + 30;
self.think = spawn_ghoul_copy; self.think = spawn_ghoul_copy;
self.nextthink = time + 30; self.nextthink = time + 20 + random()*10;
} }
zombie = spawn (); zombie = spawn ();
@ -842,7 +883,6 @@ void (vector jojo) spawn_ghoul =
self.th_pain = zombie_pain; self.th_pain = zombie_pain;
self.th_die = zombie_die; self.th_die = zombie_die;
self.th_melee = zombie_melee; self.th_melee = zombie_melee;
self.th_missile = zombie_missile;
self.angles_y = random()*360; self.angles_y = random()*360;
self.origin = jojo + '0 64 0'; self.origin = jojo + '0 64 0';
@ -892,12 +932,21 @@ void (vector jojo) spawn_ghoul =
void() monster_zombie = void() monster_zombie =
{ {
local entity zombie, lair;
local entity te, ze;
local float stop;
local vector jojo;
local float zomc, pcount;
if (self.zone == 0) if (self.zone == 0)
{ {
load_monster(); load_monster();
return; return;
} }
precache_model ("progs/ghoul.mdl"); precache_model ("progs/ghoul.mdl");
precache_model ("progs/h_zombie.mdl"); precache_model ("progs/h_zombie.mdl");
precache_model ("progs/zom_gib.mdl"); precache_model ("progs/zom_gib.mdl");
@ -917,6 +966,34 @@ void() monster_zombie =
precache_sound ("misc/rock1.wav"); precache_sound ("misc/rock1.wav");
precache_sound ("misc/rock2.wav"); precache_sound ("misc/rock2.wav");
if (world.map_obj == OBJ_DEADTOWN)
{
ze = findradius(self.origin, 256);
while (ze)
{
if (ze.classname == "lair")
stop = 1;
ze = ze.chain;
}
if (stop == 0)
{
jojo = self.origin;
lair = spawn ();
setorigin(lair, jojo);
lair.solid = SOLID_NOT;
lair.movetype = MOVETYPE_STEP;
setsize (lair, '0 0 0', '0 0 0');
lair.netname = "lair";
lair.nextthink = time + 30;
lair.think = spawn_ghoul_copy;
lair.nextthink = time + 30;
}
}
self.solid = SOLID_SLIDEBOX; self.solid = SOLID_SLIDEBOX;
self.movetype = MOVETYPE_STEP; self.movetype = MOVETYPE_STEP;
@ -931,7 +1008,6 @@ void() monster_zombie =
self.th_run = zombie_run1; self.th_run = zombie_run1;
self.th_die = zombie_die; self.th_die = zombie_die;
self.th_melee = zombie_melee; self.th_melee = zombie_melee;
self.th_missile = zombie_missile;
self.angles_y = random()*360; self.angles_y = random()*360;
@ -939,7 +1015,7 @@ void() monster_zombie =
/*
spawn_ghoul(self.origin + '-128 -128 0'); spawn_ghoul(self.origin + '-128 -128 0');
spawn_ghoul(self.origin + '-128 0 0'); spawn_ghoul(self.origin + '-128 0 0');
spawn_ghoul(self.origin + '0 -128 0'); spawn_ghoul(self.origin + '0 -128 0');
@ -947,8 +1023,11 @@ void() monster_zombie =
spawn_ghoul(self.origin + '128 0 0'); spawn_ghoul(self.origin + '128 0 0');
spawn_ghoul(self.origin + '128 128 0'); spawn_ghoul(self.origin + '128 128 0');
spawn_ghoul(self.origin + '-128 128 0'); spawn_ghoul(self.origin + '-128 128 0');
spawn_ghoul(self.origin + '128 -128 0'); spawn_ghoul(self.origin + '128 -128 0');*/
if (random()<0.25 && world.map_obj == 1) if (random()<0.25 && world.map_obj == 1)
spawn_civilian(self.origin); spawn_civilian(self.origin);
if (random()<0.5 && world.map_obj == 4)
spawn_civilian(self.origin);
}; };