git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3475 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
7c6eaec766
commit
5f7d753be1
15 changed files with 577 additions and 359 deletions
|
@ -269,8 +269,7 @@ void() ChangeYaw =
|
|||
void() HuntTarget =
|
||||
{
|
||||
|
||||
if (self.enemy == self.friend)
|
||||
return;
|
||||
|
||||
|
||||
self.goalentity = self.enemy;
|
||||
self.think = self.th_run;
|
||||
|
@ -371,7 +370,11 @@ float() FindTarget =
|
|||
self.charmed = self.charmed - 1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (self.charmed <= 0)
|
||||
{
|
||||
self.friend = world;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (sight_entity_time >= time - 0.1 && !(self.spawnflags & 3) )
|
||||
{
|
||||
|
@ -534,6 +537,7 @@ void(float dist) ai_walk =
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
movedist = dist;
|
||||
|
||||
// check for noticing a player
|
||||
|
@ -648,6 +652,12 @@ float() DogCheckAttack;
|
|||
|
||||
float() CheckAnyAttack =
|
||||
{
|
||||
|
||||
if (self.charmed >= 1 && self.enemy == self.friend)
|
||||
return;
|
||||
|
||||
|
||||
|
||||
if (!enemy_vis)
|
||||
return FALSE;
|
||||
if (self.classname == "monster_army")
|
||||
|
@ -678,8 +688,13 @@ void() ai_run_melee =
|
|||
self.ideal_yaw = enemy_yaw;
|
||||
ChangeYaw ();
|
||||
|
||||
|
||||
if (FacingIdeal())
|
||||
{
|
||||
|
||||
if (self.enemy == self.friend)
|
||||
return;
|
||||
|
||||
self.th_melee ();
|
||||
self.attack_state = AS_STRAIGHT;
|
||||
}
|
||||
|
@ -695,10 +710,15 @@ Turn in place until within an angle to launch a missile attack
|
|||
*/
|
||||
void() ai_run_missile =
|
||||
{
|
||||
|
||||
self.ideal_yaw = enemy_yaw;
|
||||
ChangeYaw ();
|
||||
if (FacingIdeal())
|
||||
{
|
||||
|
||||
if (self.enemy == self.friend)
|
||||
return;
|
||||
|
||||
self.th_missile ();
|
||||
self.attack_state = AS_STRAIGHT;
|
||||
}
|
||||
|
@ -756,6 +776,19 @@ void(float dist) ai_run =
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
if (self.charmed >= 1)
|
||||
{
|
||||
if (self.enemy.classname != "monster" || (self.enemy.classname == "monster" && self.enemy.health <= 0))
|
||||
{
|
||||
self.enemy = self.friend;
|
||||
self.movetarget = self.friend;
|
||||
self.goalentity = self.friend;
|
||||
self.pausetime = time + 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
movedist = dist;
|
||||
// see if the enemy is dead
|
||||
if (self.enemy.health <= 0)
|
||||
|
@ -791,10 +824,12 @@ void(float dist) ai_run =
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
enemy_infront = infront(self.enemy);
|
||||
enemy_range = range(self.enemy);
|
||||
enemy_yaw = vectoyaw(self.enemy.origin - self.origin);
|
||||
|
||||
|
||||
if (self.attack_state == AS_MISSILE)
|
||||
{
|
||||
//dprint ("ai_run_missile\n");
|
||||
|
|
|
@ -48,11 +48,11 @@ void() SetChangeParms =
|
|||
{
|
||||
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.skill_combat = self.skill_combat - 10;
|
||||
self.skill_doctor = self.skill_doctor - 10;
|
||||
self.skill_sneak = self.skill_sneak - 10;
|
||||
self.skill_science = self.skill_science - 10;
|
||||
self.skill_speech = self.skill_speech - 10;
|
||||
}
|
||||
|
||||
self.items = self.items - (self.items &
|
||||
|
@ -66,7 +66,7 @@ void() SetChangeParms =
|
|||
parm16 = self.skill_speech;
|
||||
|
||||
|
||||
parm8 = self.ammo_shells;
|
||||
parm8 = self.score;
|
||||
parm9 = self.perk1;
|
||||
parm10 = self.perk2;
|
||||
parm17 = self.islot1;
|
||||
|
@ -148,7 +148,7 @@ void() DecodeLevelParms =
|
|||
self.skill_science = parm14;
|
||||
self.skill_speech = parm16;
|
||||
|
||||
self.ammo_shells = parm8;
|
||||
self.score = parm8;
|
||||
self.perk1 = parm9;
|
||||
self.perk2 = parm10;
|
||||
|
||||
|
@ -625,12 +625,12 @@ void() PutClientInServer =
|
|||
|
||||
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.islot2 = SlotVal(IID_WP_KNIFE, 1);
|
||||
self.islot1 = SlotVal(IID_WP_KNIFE, 1);
|
||||
self.islot2 = 0;
|
||||
self.islot3 = SlotVal(IID_ARM_LEATHER, 1);
|
||||
self.islot5 = SlotVal(IID_CHEM_STIMPACK, 5);
|
||||
self.islot7 = SlotVal(IID_AM_10MM, 70);
|
||||
self.islot8 = 0;
|
||||
self.islot7 = 0;
|
||||
self.islot8 = SlotVal(IID_MONEY, 100);
|
||||
self.islot9 = 0;
|
||||
self.islot10 = 0;
|
||||
self.islot11 = SlotVal(IID_CHEM_MEDICALBAG, 25);
|
||||
|
@ -664,7 +664,7 @@ void() PutClientInServer =
|
|||
self.fixangle = TRUE; // turn this way immediately
|
||||
|
||||
|
||||
self.max_health = 80 + (self.skill_combat*4) + (self.skill_doctor*2) + (self.skill_sneak*2) + (self.skill_speech);
|
||||
self.max_health = 100 + (self.skill_combat*4) + (self.skill_doctor*2) + (self.skill_sneak*2) + (self.skill_speech*2) + (self.skill_science);
|
||||
|
||||
self.equipment_slot = 0;
|
||||
|
||||
|
@ -773,9 +773,9 @@ void() PutClientInServer =
|
|||
|
||||
|
||||
if (world.model == "maps/r_bunker.bsp")
|
||||
stuffcmd(self, "play music/afterglow\n");
|
||||
stuffcmd(self, "play music/vault\n");
|
||||
else if (world.map_obj == OBJ_DEADTOWN)
|
||||
stuffcmd(self, "play music/necropolis\n");
|
||||
stuffcmd(self, "play music/afterglow\n");
|
||||
};
|
||||
|
||||
|
||||
|
@ -1635,7 +1635,7 @@ void() PlayerPreThink =
|
|||
self.perk2timer = self.perk2timer - 1;
|
||||
|
||||
//speech skill provides faster perk regeneration
|
||||
if (random()*40 < self.skill_speech)
|
||||
if (random()*30 < self.skill_speech)
|
||||
{
|
||||
if (self.perk1timer > 0)
|
||||
self.perk1timer = self.perk1timer - 1;
|
||||
|
@ -1643,6 +1643,9 @@ void() PlayerPreThink =
|
|||
self.perk2timer = self.perk2timer - 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
self.shadowtime = time_left;
|
||||
|
||||
if (self.cycle1 < time)
|
||||
|
@ -1681,11 +1684,11 @@ void() PlayerPreThink =
|
|||
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;
|
||||
self.skill_combat = self.skill_combat - 10;
|
||||
self.skill_doctor = self.skill_doctor - 10;
|
||||
self.skill_sneak = self.skill_sneak - 10;
|
||||
self.skill_science = self.skill_science - 10;
|
||||
self.skill_speech = self.skill_speech - 10;
|
||||
}
|
||||
|
||||
local float lgrip, rgrip;
|
||||
|
@ -1709,7 +1712,7 @@ void() PlayerPreThink =
|
|||
self.cycle1 = time + 0.5;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
if (walkmove(0, 0) && self.solid != SOLID_SLIDEBOX)
|
||||
{
|
||||
self.materialize = 0;
|
||||
|
@ -1719,7 +1722,7 @@ void() PlayerPreThink =
|
|||
{
|
||||
self.materialize = 5;
|
||||
self.solid = SOLID_NOT;
|
||||
}
|
||||
}*/
|
||||
|
||||
if (self.materialize > 0)
|
||||
{
|
||||
|
@ -1752,6 +1755,13 @@ void() PlayerPreThink =
|
|||
if (self.cycle2 < time)
|
||||
{
|
||||
|
||||
if (self.blurtime > 0 && self.blurtime <= 1)
|
||||
stuffcmd(self, "gl_motionblur 0\n");
|
||||
else if (self.blurtime > 0)
|
||||
{
|
||||
stuffcmd(self, "gl_motionblur 0.9\n");
|
||||
self.blurtime -= 1;
|
||||
}
|
||||
|
||||
if (self.ragetime > 0)
|
||||
self.ragetime -= 1;
|
||||
|
@ -1784,9 +1794,9 @@ void() PlayerPreThink =
|
|||
if (self.musictimer == 0)
|
||||
{
|
||||
if (world.model == "maps/r_bunker.bsp")
|
||||
stuffcmd(self, "play music/afterglow\n");
|
||||
stuffcmd(self, "play music/vault\n");
|
||||
else if (world.map_obj == OBJ_DEADTOWN)
|
||||
stuffcmd(self, "play music/necropolis\n");
|
||||
stuffcmd(self, "play music/afterglow\n");
|
||||
|
||||
self.musictimer = 1;
|
||||
}
|
||||
|
|
|
@ -282,6 +282,13 @@ void(string arg1, string arg2) Cmd_GainPerk =
|
|||
self.perk1 = 10;
|
||||
if (arg1 == "11")
|
||||
self.perk1 = 11;
|
||||
if (arg1 == "12")
|
||||
self.perk1 = 12;
|
||||
if (arg1 == "14")
|
||||
self.perk1 = 14;
|
||||
if (arg1 == "15")
|
||||
self.perk1 = 15;
|
||||
|
||||
}
|
||||
if (arg2 == "2")
|
||||
{
|
||||
|
@ -307,13 +314,19 @@ void(string arg1, string arg2) Cmd_GainPerk =
|
|||
self.perk2 = 10;
|
||||
if (arg1 == "11")
|
||||
self.perk2 = 11;
|
||||
if (arg1 == "12")
|
||||
self.perk2 = 12;
|
||||
if (arg1 == "14")
|
||||
self.perk2 = 14;
|
||||
if (arg1 == "15")
|
||||
self.perk2 = 15;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
void(string arg1) Cmd_InvBuy =
|
||||
{
|
||||
local float x,y, iid, amount, money, item;
|
||||
local float x,y, iid, amount, money, item, m, n, p;
|
||||
|
||||
|
||||
x = FindEmptySlot(self);
|
||||
|
@ -378,14 +391,28 @@ void(string arg1) Cmd_InvBuy =
|
|||
sound (self, CHAN_BODY, "misc/beep1.wav", 1, ATTN_NORM);
|
||||
return;
|
||||
}
|
||||
if (self.ammo_shells < money)
|
||||
|
||||
m = SlotOfItem(self, IID_MONEY);
|
||||
p = ItemInSlot(self, m);
|
||||
n = ToStatus(p);
|
||||
|
||||
if (m == 0)
|
||||
{
|
||||
sprint(self, 2, "not enough money.\n");
|
||||
sound (self, CHAN_BODY, "misc/beep1.wav", 1, ATTN_NORM);
|
||||
return;
|
||||
}
|
||||
if (n < money)
|
||||
{
|
||||
sprint(self, 2, "not enough money\n");
|
||||
sound (self, CHAN_BODY, "misc/beep1.wav", 1, ATTN_NORM);
|
||||
return;
|
||||
}
|
||||
else
|
||||
self.ammo_shells = self.ammo_shells - money;
|
||||
{
|
||||
SetItemSlot(self, m, 0);
|
||||
TryGiveStackable(self, IID_MONEY, n-money);
|
||||
}
|
||||
|
||||
if (NotStackable(iid))
|
||||
SetItemSlot(self, x, item);
|
||||
|
@ -396,7 +423,8 @@ void(string arg1) Cmd_InvBuy =
|
|||
{
|
||||
sprint(self, 2, "full inventory.\n");
|
||||
sound (self, CHAN_BODY, "misc/beep1.wav", 1, ATTN_NORM);
|
||||
self.ammo_shells = self.ammo_shells + money;
|
||||
m = SlotOfItem(self, IID_MONEY);
|
||||
SetItemSlot(self, m, n);
|
||||
return;
|
||||
}
|
||||
sound (self, CHAN_BODY, "misc/item2.wav", 1, ATTN_NORM);
|
||||
|
@ -431,14 +459,23 @@ void(string arg1) Cmd_InvSell =
|
|||
|
||||
self.missionbrief = 0;
|
||||
|
||||
SetItemSlot(self, slotno, 0);
|
||||
|
||||
x = GetBaseValue(iid);
|
||||
x = ceil(x * (1 + (self.skill_speech/30)));
|
||||
x = ceil(x / 5);
|
||||
y = ftos(x);
|
||||
z = GetItemName(iid);
|
||||
|
||||
self.ammo_shells += x;
|
||||
if (!TryGiveStackable(self, IID_MONEY, x))
|
||||
{
|
||||
sprint(self, 2, "not enough room.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
SetItemSlot(self, slotno, 0);
|
||||
|
||||
|
||||
|
||||
sprint(self, 2, "you sell ");
|
||||
sprint(self, 2, z);
|
||||
sprint(self, 2, " for $");
|
||||
|
|
|
@ -148,6 +148,15 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
|
|||
damage = floor(damage);
|
||||
targ.health = floor(targ.health);
|
||||
|
||||
if (total_players == 1)
|
||||
damage = damage * 0.70;
|
||||
else if (total_players == 2)
|
||||
damage = damage * 0.80;
|
||||
else if (total_players == 3)
|
||||
damage = damage * 0.90;
|
||||
else
|
||||
damage = damage * 1.00;
|
||||
|
||||
|
||||
if (challenge_rating >= 20 && attacker.classname == "monster")
|
||||
damage = damage * 1.30;
|
||||
|
@ -222,6 +231,19 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
|
|||
if (targ.classname == "monster" && attacker.classname == "player" && attacker.rage == 777)
|
||||
attacker.score = attacker.score + 1;
|
||||
|
||||
|
||||
//charmed monsters will protect their master
|
||||
if (targ.classname == "player" && targ.friend.classname == "monster")
|
||||
{
|
||||
if (targ.friend.enemy.classname != "monster")
|
||||
targ.friend.enemy = attacker;
|
||||
}
|
||||
//charmed monsters will assist their master
|
||||
if (attacker.classname == "player" && attacker.friend.classname == "monster")
|
||||
{
|
||||
if (attacker.friend.enemy.classname != "monster")
|
||||
attacker.friend.enemy = targ;
|
||||
}
|
||||
//dodge chance
|
||||
|
||||
if (targ.position == 0 && random()<0.05)
|
||||
|
@ -242,12 +264,12 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
|
|||
|
||||
|
||||
|
||||
//stay low: if taking cover, 20% miss chance (others get 10% bonus)
|
||||
//stay low: if taking cover, 33% miss chance (others get 10% bonus)
|
||||
if (targ.rage == 777)
|
||||
{
|
||||
if (targ.perk1 == 4 || targ.perk2 == 4)
|
||||
{
|
||||
if (random()<0.20)
|
||||
if (random()<(0.33+(self.skill_speech*0.01)))
|
||||
{
|
||||
sound (targ, CHAN_BODY, "effects/miss.wav", 1, ATTN_NORM);
|
||||
return;
|
||||
|
@ -268,18 +290,11 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
|
|||
{
|
||||
if (attacker.recoil > 5)
|
||||
{
|
||||
damage = damage * (1 + (attacker.recoil * 0.03));
|
||||
damage = damage * (1 + (attacker.recoil * (0.03+(self.skill_speech*0.002))));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//stay low
|
||||
if (targ.perk1 == 4 || targ.perk2 == 4)
|
||||
{
|
||||
if (targ.position == 2)
|
||||
damage = damage * 0.75;
|
||||
}
|
||||
|
||||
|
||||
//sneak attack: if you attack a creature who isn't fighting you, bonus damage
|
||||
if (attacker.skill_sneak > 0 && attacker.sneak > 0)
|
||||
|
@ -305,7 +320,7 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
|
|||
attacker.critical = 0;
|
||||
}
|
||||
|
||||
if (attacker.critical == 3 && targ.classname == "car")//attacker scored a headshot/critical
|
||||
if (attacker.critical == 3)//attacker scored a headshot/critical
|
||||
{
|
||||
if (attacker.critical == 3)
|
||||
{
|
||||
|
|
|
@ -469,7 +469,7 @@ void(vector pos, string image) Crosshair =
|
|||
|
||||
void() Trader_Draw =
|
||||
{
|
||||
local float i, price, money;
|
||||
local float i, price, money, m, n, p;
|
||||
local float it;
|
||||
local string itname, money2, s2, s3, s4, s5, s6, s7, s8, s9, perki, perk2i, p1, p2, pn, pd, price2;
|
||||
local float op;
|
||||
|
@ -503,6 +503,8 @@ void() Trader_Draw =
|
|||
TraderImage('5 4 0'*IMGSIZEF*(scrwidth/640), 20);
|
||||
|
||||
|
||||
slotnum = 0;
|
||||
|
||||
if (mousepos_x >= 1*IMGSIZEF*(scrwidth/640) && mousepos_x <= 6*IMGSIZEF*(scrwidth/640))
|
||||
if (mousepos_y >= 1*IMGSIZEF*(scrwidth/640) && mousepos_y <= 2*IMGSIZEF*(scrwidth/640))
|
||||
slotnum = floor((mousepos_x)/(IMGSIZEF*(scrwidth/640))) + 0;
|
||||
|
@ -532,21 +534,27 @@ void() Trader_Draw =
|
|||
it = getstati(70+slotnum);
|
||||
itname = GetItemName(ToIID(it));
|
||||
drawstring('32 16 0'*(scrwidth/640), itname, '8 8 0'*(scrwidth/640), '1 1 1', 1);
|
||||
itname = GetItemDesc(ToIID(it));
|
||||
drawstring('32 32 0'*(scrwidth/640), itname, '8 8 0'*(scrwidth/640), '1 1 1', 1);
|
||||
|
||||
price = GetBaseValue(ToIID(it));
|
||||
price = ceil(price * (1 - (getstati(104)/30)));
|
||||
price2 = ftos(price);
|
||||
money = getstati(50);
|
||||
money2 = ftos(money);
|
||||
if (slotnum > 0)
|
||||
{
|
||||
price = GetBaseValue(ToIID(it));
|
||||
price = ceil(price * (1 - (getstati(104)/30)));
|
||||
price2 = ftos(price);
|
||||
|
||||
drawstring('2 6 0'*IMGSIZEF*(scrwidth/640) - '16 48 0'*(scrwidth/640), " TOTAL ", '16 16 0'*(scrwidth/640), '1 1 1', 1);
|
||||
drawstring('2 6 0'*IMGSIZEF*(scrwidth/640) - '16 32 0'*(scrwidth/640), " PRICE ", '16 16 0'*(scrwidth/640), '1 1 1', 1);
|
||||
drawstring('2 6 0'*IMGSIZEF*(scrwidth/640) + '16 0 0'*(scrwidth/640), price2, '16 16 0'*(scrwidth/640), '1 1 1', 1);
|
||||
drawstring('4 6 0'*IMGSIZEF*(scrwidth/640) - '16 48 0'*(scrwidth/640), " TOTAL ", '16 16 0'*(scrwidth/640), '1 1 1', 1);
|
||||
drawstring('4 6 0'*IMGSIZEF*(scrwidth/640) - '16 32 0'*(scrwidth/640), " MONEY ", '16 16 0'*(scrwidth/640), '1 1 1', 1);
|
||||
drawstring('4 6 0'*IMGSIZEF*(scrwidth/640) + '16 0 0'*(scrwidth/640), money2, '16 16 0'*(scrwidth/640), '1 1 1', 1);
|
||||
m = ShadowSlotOfItem(self, IID_MONEY);
|
||||
p = ShadowItemInSlot(self, m);
|
||||
n = ToStatus(p);
|
||||
money2 = ftos(n);
|
||||
|
||||
|
||||
TraderImage('2 5 0'*IMGSIZEF*(scrwidth/640), slotnum);
|
||||
drawpic('4 5 0'*IMGSIZEF*(scrwidth/640) + '16 0 0'*(scrwidth/640), "gui/bottlecaps.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
|
||||
drawstring('2 6 0'*IMGSIZEF*(scrwidth/640) + '16 0 0'*(scrwidth/640), price2, '16 16 0'*(scrwidth/640), '1 1 1', 1);
|
||||
drawstring('4 6 0'*IMGSIZEF*(scrwidth/640) + '16 0 0'*(scrwidth/640), money2, '16 16 0'*(scrwidth/640), '1 1 1', 1);
|
||||
|
||||
}
|
||||
if (mousepos_x > scrwidth*0.95)
|
||||
mousepos_x = scrwidth*0.95;
|
||||
|
||||
|
@ -730,12 +738,18 @@ void() GainPerk_Draw =
|
|||
{
|
||||
if (mousepos_x >= 2*IMGSIZEF*(scrwidth/640) && mousepos_x <= 3*IMGSIZEF*(scrwidth/640))
|
||||
which_perk = 11;
|
||||
else if (mousepos_x >= 3*IMGSIZEF*(scrwidth/640) && mousepos_x <= 4*IMGSIZEF*(scrwidth/640))
|
||||
which_perk = 12;
|
||||
else if (mousepos_x >= 4*IMGSIZEF*(scrwidth/640) && mousepos_x <= 5*IMGSIZEF*(scrwidth/640))
|
||||
which_perk = 14;
|
||||
else if (mousepos_x >= 5*IMGSIZEF*(scrwidth/640) && mousepos_x <= 6*IMGSIZEF*(scrwidth/640))
|
||||
which_perk = 15;
|
||||
else
|
||||
which_perk = 0;
|
||||
}
|
||||
|
||||
drawpic('2 2 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Support Fire.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
|
||||
drawpic('3 2 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Duck And Cover", '64 64 0'*(scrwidth/640), '1 1 1', 1);
|
||||
drawpic('3 2 0'*IMGSIZEF*(scrwidth/640), "gui/perks/I Disappear.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
|
||||
drawpic('4 2 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Puppet Master.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
|
||||
drawpic('5 2 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Stay Low.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
|
||||
drawpic('6 2 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Surgical Precision.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
|
||||
|
@ -747,6 +761,9 @@ void() GainPerk_Draw =
|
|||
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('3 4 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Commander.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
|
||||
drawpic('4 4 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Blaster Master.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
|
||||
drawpic('5 4 0'*IMGSIZEF*(scrwidth/640), "gui/perks/Fighting Dirty.png", '64 64 0'*(scrwidth/640), '1 1 1', 1);
|
||||
|
||||
pn = PerkName(1, which_perk);
|
||||
pd = GetPerkDesc(which_perk);
|
||||
|
@ -769,7 +786,7 @@ void() GainPerk_Draw =
|
|||
|
||||
void() Pipboy_Draw =
|
||||
{
|
||||
float width,height,lvl,bar;
|
||||
float width,height,lvl,bar, top, s;
|
||||
string skill;
|
||||
vector w;
|
||||
|
||||
|
@ -894,6 +911,25 @@ void() Pipboy_Draw =
|
|||
drawstring('472 230 0'*(scrwidth/640) - ('0 4 0'*(lvl+4)*(scrwidth/640)), skill, '12 12 0'*(scrwidth/640), '1 1 1', 1);
|
||||
|
||||
|
||||
bar = 0;
|
||||
s = getstati(127);
|
||||
top = ceil(200 * (s/200));
|
||||
if (top > 200)
|
||||
top = 200;
|
||||
|
||||
while (bar < top)
|
||||
bar = bar + 1;
|
||||
|
||||
|
||||
top = 200;
|
||||
|
||||
drawstring('0 0 0'+('1 0 0'*(scrwidth*0.32)) +('0 1 0'*(scrheight*0.69)), "experience: ", '8 8 0'*(scrwidth/640), '1 1 1', 1);
|
||||
|
||||
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.48)) +('0 1 0'*(scrheight*0.685)) + ('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.6)) +('0 1 0'*(scrheight*0.69)), strcat(ftos(s),"/", ftos(top), "\n"), '8 8 0'*(scrwidth/640), '1 1 1', 1);
|
||||
|
||||
|
||||
if (mousepos_x > scrwidth*0.95)
|
||||
mousepos_x = scrwidth*0.95;
|
||||
|
||||
|
@ -1072,7 +1108,9 @@ if (slotnum <= 24)
|
|||
}
|
||||
|
||||
itname = GetItemName(ToIID(it));
|
||||
drawstring('32 16 0'*(scrwidth/640), itname, '16 16 0'*(scrwidth/640), '1 1 1', 1);
|
||||
drawstring('32 12 0'*(scrwidth/640), itname, '8 8 0'*(scrwidth/640), '1 1 1', 1);
|
||||
itname = GetItemDesc(ToIID(it));
|
||||
drawstring('32 22 0'*(scrwidth/640), itname, '7 7 0'*(scrwidth/640), '1 1 1', 1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1235,7 +1273,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
|||
return;
|
||||
if (which_perk == getstati(59))
|
||||
return;
|
||||
if (which_perk >= 1 && which_perk <= 11)
|
||||
if (which_perk >= 1 && which_perk <= 15)
|
||||
localcmd(strcat("cmd gainperk ", ftos(which_perk), " ", ftos(perkslot), "\n"));
|
||||
show_inventory = false;
|
||||
show_pipboy = false;
|
||||
|
|
|
@ -529,8 +529,6 @@ void(float vwidth, float vheight, float do2d) CSQC_UpdateView =
|
|||
if (getstati(42) > 0)
|
||||
SlotImageSmall('0 0 0'+('1 0 0'*(scrwidth*0.77)) +('0 1 0'*(scrheight*0.90)), 11);
|
||||
|
||||
if (getstati(110) == 0)
|
||||
drawpic('0 0 0'+('1 0 0'*(scrwidth*0.64)) +('0 1 0'*(scrheight*0.97)), "gui/hud/aim.png", '16 16 0'*(scrheight/640), '1 1 1');
|
||||
|
||||
HUD_Perks_Draw();
|
||||
|
||||
|
|
|
@ -669,6 +669,8 @@ float intermission_running;
|
|||
.float hostage;
|
||||
.float xregen;
|
||||
.float sneak;
|
||||
.float morale;
|
||||
.float blurtime;
|
||||
|
||||
.float skill_combat;
|
||||
.float skill_doctor;
|
||||
|
|
|
@ -2,11 +2,11 @@ float IID_NONE = 0;
|
|||
|
||||
#define IsMelee(iid) (iid == IID_NONE || (iid >= IID_WP_WRENCH && iid <= IID_WP_POWERAXE))
|
||||
#define IsGrenade(iid) (iid >= IID_GREN_FRAG && iid <= IID_GREN_STUN)
|
||||
#define IsRanged(iid) (iid >= IID_WP_GLOCK && iid <= IID_WP_ACR)
|
||||
|
||||
#define IsRanged(iid) ((iid >= IID_WP_GLOCK && iid <= IID_WP_ACR))
|
||||
#define IsMoney(iid) (iid == IID_MONEY)
|
||||
|
||||
//weapons with ammo, things with a toggle state
|
||||
#define NotStackable(iid) (IsRanged(iid))
|
||||
#define NotStackable(iid) (IsRanged(iid) || IsMoney(iid))
|
||||
|
||||
//the ammoless weapons
|
||||
float IID_WP_WRENCH = 399;
|
||||
|
@ -146,6 +146,7 @@ float IID_MISC_HMXCOMPOUND = 320;
|
|||
float IID_MISC_GUM = 321;
|
||||
float IID_MISC_XRAYTUBE = 322;
|
||||
|
||||
float IID_MONEY = 300;
|
||||
|
||||
#define IsShootable(iid) (IsMelee(iid) || IsRanged(iid) || IsGrenade(iid))
|
||||
|
||||
|
@ -268,6 +269,62 @@ float(entity e, float slotno) ItemInSlot =
|
|||
return 0;
|
||||
};
|
||||
|
||||
|
||||
float(entity e, float slotno) ShadowItemInSlot =
|
||||
{
|
||||
if (slotno == 1)
|
||||
return getstati(32);
|
||||
if (slotno == 2)
|
||||
return getstati(33);
|
||||
if (slotno == 3)
|
||||
return getstati(34);
|
||||
if (slotno == 4)
|
||||
return getstati(35);
|
||||
if (slotno == 5)
|
||||
return getstati(36);
|
||||
if (slotno == 6)
|
||||
return getstati(37);
|
||||
if (slotno == 7)
|
||||
return getstati(38);
|
||||
if (slotno == 8)
|
||||
return getstati(39);
|
||||
if (slotno == 9)
|
||||
return getstati(40);
|
||||
if (slotno == 10)
|
||||
return getstati(41);
|
||||
if (slotno == 11)
|
||||
return getstati(42);
|
||||
if (slotno == 12)
|
||||
return getstati(43);
|
||||
if (slotno == 13)
|
||||
return getstati(44);
|
||||
if (slotno == 14)
|
||||
return getstati(45);
|
||||
if (slotno == 15)
|
||||
return getstati(46);
|
||||
if (slotno == 16)
|
||||
return getstati(47);
|
||||
if (slotno == 17)
|
||||
return getstati(91);
|
||||
if (slotno == 18)
|
||||
return getstati(92);
|
||||
if (slotno == 19)
|
||||
return getstati(93);
|
||||
if (slotno == 20)
|
||||
return getstati(94);
|
||||
if (slotno == 21)
|
||||
return getstati(95);
|
||||
if (slotno == 22)
|
||||
return getstati(96);
|
||||
if (slotno == 23)
|
||||
return getstati(97);
|
||||
if (slotno == 24)
|
||||
return getstati(98);
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
void(entity e, float slotno, float item) SetItemSlot =
|
||||
{
|
||||
if (slotno == 1)
|
||||
|
@ -432,10 +489,7 @@ float(entity e, float iid) ShadowSlotOfItem =
|
|||
return 23;
|
||||
if (ToIID(getstati(98)) == iid)
|
||||
return 24;
|
||||
if (ToIID(getstati(104)) == iid)
|
||||
return 25;
|
||||
if (ToIID(getstati(105)) == iid)
|
||||
return 26;
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
@ -858,10 +912,11 @@ string(float iid) GetItemWModel =
|
|||
return "maps/b_bh100.bsp";
|
||||
if (iid == IID_CHEM_RADX)
|
||||
return "maps/b_bh25.bsp";
|
||||
|
||||
if (iid >= IID_MISC_JUNK && iid <= IID_MISC_XRAYTUBE)
|
||||
return "progs/junk1.mdl";
|
||||
|
||||
if (iid == IID_MONEY)
|
||||
return "progs/money.mdl";
|
||||
|
||||
return "progs/s_light.spr"; //no model. :/
|
||||
};
|
||||
|
@ -981,9 +1036,9 @@ float(float iid) WeaponMagQuant =
|
|||
if (iid == IID_WP_WINCHESTER)
|
||||
return 2;
|
||||
if (iid == IID_WP_MOSSBERG)
|
||||
return 12;
|
||||
return 8;
|
||||
if (iid == IID_WP_JACKHAMMER)
|
||||
return 20;
|
||||
return 10;
|
||||
if (iid == IID_WP_GREASEGUN)
|
||||
return 30;
|
||||
if (iid == IID_WP_MP9)
|
||||
|
@ -1221,6 +1276,10 @@ string(float iid) GetItemName =
|
|||
return "grease gun";
|
||||
if (iid == IID_WP_MP9)
|
||||
return "mp9";
|
||||
if (iid == IID_WP_GREASEGUN_S)
|
||||
return "damaged grease gun";
|
||||
if (iid == IID_WP_MP9_S)
|
||||
return "damaged mp9";
|
||||
if (iid == IID_WP_RANGEMASTER)
|
||||
return "rangemaster";
|
||||
if (iid == IID_WP_RANGEMASTER_SCOPE)
|
||||
|
@ -1376,6 +1435,7 @@ string(float iid) GetItemName =
|
|||
if (iid == IID_EQUIP_XRAY)
|
||||
return "x-ray device";
|
||||
|
||||
|
||||
if (iid == IID_MISC_JUNK)
|
||||
return "random junk";
|
||||
if (iid == IID_MISC_NUKACOLA)
|
||||
|
@ -1403,6 +1463,8 @@ string(float iid) GetItemName =
|
|||
if (iid == IID_MISC_XRAYTUBE)
|
||||
return "x-ray tube";
|
||||
|
||||
if (iid == IID_MONEY)
|
||||
return "bottle caps";
|
||||
|
||||
bprint(PRINT_MEDIUM, ftos(iid), " without a name!\n");
|
||||
return strcat("unknown", ftos(iid));
|
||||
|
@ -1412,7 +1474,8 @@ float(float iid) GetBaseValue =
|
|||
{
|
||||
if (iid == IID_NONE)
|
||||
return 0;
|
||||
|
||||
if (iid == IID_MONEY)
|
||||
return 1;
|
||||
|
||||
if (iid == IID_WP_WRENCH)
|
||||
return 5;
|
||||
|
@ -1425,13 +1488,13 @@ float(float iid) GetBaseValue =
|
|||
|
||||
|
||||
if (iid == IID_WP_USP)
|
||||
return 40;
|
||||
if (iid == IID_WP_USP_S)
|
||||
return 60;
|
||||
if (iid == IID_WP_GLOCK)
|
||||
return 30;
|
||||
if (iid == IID_WP_USP_S)
|
||||
return 30;
|
||||
if (iid == IID_WP_GLOCK)
|
||||
return 20;
|
||||
if (iid == IID_WP_GLOCK_S)
|
||||
return 50;
|
||||
return 20;
|
||||
if (iid == IID_WP_DEAGLE)
|
||||
return 70;
|
||||
if (iid == IID_WP_DEAGLE_M)
|
||||
|
@ -1471,9 +1534,9 @@ float(float iid) GetBaseValue =
|
|||
if (iid == IID_WP_MP9_S)
|
||||
return 125;
|
||||
if (iid == IID_WP_RANGEMASTER)
|
||||
return 80;
|
||||
return 70;
|
||||
if (iid == IID_WP_RANGEMASTER_SCOPE)
|
||||
return 120;
|
||||
return 100;
|
||||
if (iid == IID_WP_AK47)
|
||||
return 150;
|
||||
if (iid == IID_WP_AK112)
|
||||
|
@ -1858,6 +1921,9 @@ string(float iid) GetItemDesc =
|
|||
if (iid == IID_EQUIP_XRAY)
|
||||
return "allows for enemy detection through walls";
|
||||
|
||||
if (iid == IID_MONEY)
|
||||
return "the standard currency of the wasteland";
|
||||
|
||||
if (iid == IID_MISC_NUKACOLA)
|
||||
return "a bottle of tasty nuka-cola";
|
||||
if (iid == IID_MISC_JUNK)
|
||||
|
@ -2164,6 +2230,10 @@ string(float iid) GetItemImage =
|
|||
return "greasegun.jpg";
|
||||
if (iid == IID_WP_MP9)
|
||||
return "mp9.jpg";
|
||||
if (iid == IID_WP_GREASEGUN_S)
|
||||
return "greasegun.jpg";
|
||||
if (iid == IID_WP_MP9_S)
|
||||
return "mp9.jpg";
|
||||
if (iid == IID_WP_RANGEMASTER)
|
||||
return "rangem.png";
|
||||
if (iid == IID_WP_RANGEMASTER_SCOPE)
|
||||
|
@ -2342,6 +2412,9 @@ string(float iid) GetItemImage =
|
|||
if (iid == IID_MISC_XRAYTUBE)
|
||||
return "junk/tube.jpg";
|
||||
|
||||
if (iid == IID_MONEY)
|
||||
return "bottlecaps.png";
|
||||
|
||||
bprint(PRINT_MEDIUM, ftos(iid), " without a name!\n");
|
||||
return strcat("unknown.jpg", ftos(iid));
|
||||
};
|
||||
|
|
|
@ -2343,6 +2343,8 @@ DropMoney
|
|||
|
||||
void() MoneyTouch =
|
||||
{
|
||||
local float x, y;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
|
||||
|
@ -2350,9 +2352,15 @@ void() MoneyTouch =
|
|||
return;
|
||||
|
||||
sound (self, CHAN_VOICE, "items/item1.wav", 1, ATTN_IDLE);
|
||||
sprint(other, 2, "a small amount of wasteland currency.\n");
|
||||
other.ammo_shells += self.islot1;
|
||||
remove(self);
|
||||
|
||||
x = ToIID(self.islot1);
|
||||
y = ToStatus(self.islot1);
|
||||
|
||||
if (TryGiveStackable(other, x, y))
|
||||
{
|
||||
sprint(other, 2, "found some bottle caps.\n");
|
||||
remove(self);
|
||||
}
|
||||
};
|
||||
|
||||
void() DropMoney =
|
||||
|
@ -2373,7 +2381,7 @@ void() DropMoney =
|
|||
item.movetype = MOVETYPE_TOSS;
|
||||
setmodel (item, "progs/money.mdl");
|
||||
setsize (item, '-16 -16 0', '16 16 56');
|
||||
item.islot1 = 2 + random()*5;
|
||||
item.islot1 = SlotVal(IID_MONEY, 1);
|
||||
item.skin = ToIID(item.islot1) - 506;
|
||||
|
||||
item.touch = MoneyTouch;
|
||||
|
|
|
@ -949,8 +949,8 @@ void() brotherhood_merchant =
|
|||
|
||||
|
||||
|
||||
self.xslot1 = SlotVal(IID_WP_USP, 1);
|
||||
self.xslot6 = SlotVal(IID_AM_45ACP, 100);
|
||||
self.xslot1 = SlotVal(IID_WP_GLOCK, 1);
|
||||
self.xslot6 = SlotVal(IID_AM_10MM, 100);
|
||||
|
||||
self.xslot2 = SlotVal(IID_WP_PIPERIFLE, 1);
|
||||
self.xslot7 = SlotVal(IID_AM_44MAGNUM, 100);
|
||||
|
|
|
@ -105,12 +105,12 @@ void () CrawlSound =
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
self.attack_finished = time + 1;
|
||||
self.rtime = time + 1;
|
||||
|
||||
|
||||
r = 1 - (self.skill_sneak/40);
|
||||
r = 0.5;
|
||||
if (self.sneak > 0)
|
||||
r = r / 2;
|
||||
|
||||
if ((rand < 0.25))
|
||||
sound (self, CHAN_ITEM, "player/prone1.wav", r, ATTN_NORM);
|
||||
|
|
|
@ -103,7 +103,7 @@ void (float tmp, float dam) army_fire =
|
|||
|
||||
if (trace_ent.takedamage)
|
||||
{
|
||||
dam = 1 + random()*dam + random()*dam;
|
||||
dam = dam + random()*dam;
|
||||
dam = dam - (1 - (trace_fraction/2));
|
||||
SpawnBlood (org, PLAT_LOW_TRIGGER);
|
||||
T_Damage (trace_ent, self, self, dam);
|
||||
|
@ -175,7 +175,7 @@ void (float tmp, float dam) army_fire1 =
|
|||
if (trace_ent.takedamage)
|
||||
{
|
||||
SpawnBlood (org, PLAT_LOW_TRIGGER);
|
||||
dam = 10 + random()*dam + random()*dam;
|
||||
dam = dam + random()*dam;
|
||||
dam = dam * (1 - (trace_fraction/2));
|
||||
X_Damage (trace_ent, self, self, dam);
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ void (float tmp, float dam) army_fire2 =
|
|||
direction = dir;
|
||||
|
||||
shot = 5;
|
||||
var_o = crandom()*50;
|
||||
var_o = crandom()*75;
|
||||
|
||||
while (shot > 0)
|
||||
{
|
||||
|
@ -281,9 +281,8 @@ void (float tmp, float dam) army_fire2 =
|
|||
if (trace_ent.takedamage)
|
||||
{
|
||||
SpawnBlood (org, PLAT_LOW_TRIGGER);
|
||||
dam = 1 + random()*dam + random()*dam;
|
||||
dam = dam * (1 - (trace_fraction/2));
|
||||
T_Damage (trace_ent, self, self, dam);
|
||||
T_Damage (trace_ent, self, self, dam+random()*dam);
|
||||
}
|
||||
else
|
||||
bullet_hole (trace_endpos);
|
||||
|
@ -352,7 +351,7 @@ void (float tmp, float dam) army_fire3 =
|
|||
if (trace_ent.takedamage)
|
||||
{
|
||||
SpawnBlood (org, PLAT_LOW_TRIGGER);
|
||||
dam = 1 + random()*dam + random()*dam;
|
||||
dam = dam + random()*dam;
|
||||
dam = dam * (1 - (trace_fraction/2));
|
||||
T_Damage (trace_ent, self, self, dam);
|
||||
}
|
||||
|
@ -410,7 +409,7 @@ void (float tmp, float dam) army_fire4 =
|
|||
if (trace_ent.takedamage)
|
||||
{
|
||||
SpawnBlood (org, PLAT_LOW_TRIGGER);
|
||||
dam = 1 + random()*dam + random()*dam;
|
||||
dam = dam + random()*dam;
|
||||
dam = dam * (1 - (trace_fraction/2));
|
||||
T_Damage (trace_ent, self, self, dam);
|
||||
}
|
||||
|
@ -657,7 +656,7 @@ void () army_walk8 = [ 80, army_walk1 ]
|
|||
void () army_run1 = [ 73, army_run2 ]
|
||||
{
|
||||
|
||||
if ((random()<0.25 || self.health <= 25) && self.charmed != 1)
|
||||
if ((self.health <= 25) && self.charmed <= 1)
|
||||
find_hide();
|
||||
|
||||
ai_run (TE_TELEPORT);
|
||||
|
@ -789,7 +788,7 @@ void () army_atka4 = [ 84, army_atka5 ]
|
|||
void () army_atka5 = [ 85, army_atka6 ]
|
||||
{
|
||||
ai_face ();
|
||||
army_fire2 (250, 7);
|
||||
army_fire2 (250, 5);
|
||||
};
|
||||
|
||||
void () army_atka6 = [ 86, army_atka7 ]
|
||||
|
@ -850,7 +849,7 @@ void () army_atkb5 = [ 85, army_atkb6 ]
|
|||
if (r == RANGE_NEAR || r == RANGE_MELEE)
|
||||
self.recoil = 1;
|
||||
|
||||
army_fire3 (120, 15);
|
||||
army_fire3 (120, 9);
|
||||
};
|
||||
|
||||
void () army_atkb6 = [ 86, army_atkb7 ]
|
||||
|
@ -858,8 +857,8 @@ void () army_atkb6 = [ 86, army_atkb7 ]
|
|||
ai_face ();
|
||||
if (self.recoil == 1)
|
||||
{
|
||||
army_fire3 (160, 14);
|
||||
army_fire3 (160, 14);
|
||||
army_fire3 (160, 9);
|
||||
army_fire3 (160, 9);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -867,7 +866,7 @@ void () army_atkb7 = [ 87, army_atkb8 ]
|
|||
{
|
||||
ai_face ();
|
||||
if (self.recoil == 1)
|
||||
army_fire3 (160, 14);
|
||||
army_fire3 (200, 9);
|
||||
};
|
||||
|
||||
void () army_atkb8 = [ 88, army_atkb9 ]
|
||||
|
@ -875,8 +874,8 @@ void () army_atkb8 = [ 88, army_atkb9 ]
|
|||
ai_face ();
|
||||
if (self.recoil == 1)
|
||||
{
|
||||
army_fire3 (160, 14);
|
||||
army_fire3 (160, 14);
|
||||
army_fire3 (200, 9);
|
||||
army_fire3 (200, 9);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -885,8 +884,8 @@ void () army_atkb9 = [ 89, army_run1 ]
|
|||
ai_face ();
|
||||
if (self.recoil == 1)
|
||||
{
|
||||
army_fire3 (170, 14);
|
||||
army_fire3 (170, 14);
|
||||
army_fire3 (240, 9);
|
||||
army_fire3 (240, 9);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1384,7 +1383,7 @@ void () grunt_pain =
|
|||
{
|
||||
if (random()*100<10)
|
||||
{
|
||||
remove(self);
|
||||
self.solid = SOLID_NOT;
|
||||
return;
|
||||
}
|
||||
if (random()*100<50)
|
||||
|
@ -1703,7 +1702,7 @@ void () monster_army =
|
|||
self.movetype = MOVETYPE_STEP;
|
||||
setmodel (self, "progs/soldier.mdl");
|
||||
setsize (self, '-12 -12 -24', '12 12 28');
|
||||
self.max_health = 80;
|
||||
self.max_health = 120;
|
||||
self.health = self.max_health;
|
||||
self.team = 3;
|
||||
self.islot3 = SlotVal(IID_ARM_LEATHER, 1);
|
||||
|
@ -1899,7 +1898,7 @@ void () monster_commander =
|
|||
commanders = commanders + 1;
|
||||
|
||||
setsize (self, '-12 -12 -24', '12 12 32');
|
||||
self.max_health = 200;
|
||||
self.max_health = 160;
|
||||
self.health = self.max_health;
|
||||
self.islot3 = SlotVal(IID_ARM_COMBAT, 1);
|
||||
self.armortype = 0.5;
|
||||
|
|
|
@ -421,10 +421,10 @@ local vector org;
|
|||
|
||||
spawn_tfog (org);
|
||||
//spawn_tdeath(t.origin, other);
|
||||
if (self.classname == "player")
|
||||
if (other.classname == "player")
|
||||
{
|
||||
self.solid = SOLID_NOT;
|
||||
self.materialize = 200;
|
||||
other.solid = SOLID_NOT;
|
||||
other.materialize = 200;
|
||||
}
|
||||
// move the player and lock him down for a little while
|
||||
if (!other.health)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
*/
|
||||
void () player_use1;
|
||||
void() show_light_level;
|
||||
void() UseStimpack;
|
||||
void() UseSuperStim;
|
||||
|
@ -123,7 +122,7 @@ float (entity healer, entity saved) RevivePlayer =
|
|||
|
||||
self = oself;
|
||||
|
||||
// saved.materialize = 200;
|
||||
saved.materialize = 200;
|
||||
saved.ghost = 0;
|
||||
saved.health = 20 + (healer.skill_doctor);
|
||||
saved.air_finished = time + 10;
|
||||
|
@ -239,28 +238,83 @@ void () puppet_master =
|
|||
{
|
||||
local entity te;
|
||||
local float charm_monster;
|
||||
local vector org;
|
||||
//this allows you to control other monsters
|
||||
|
||||
|
||||
charm_monster = 0;
|
||||
te = findradius(self.origin, 400);
|
||||
while (te)
|
||||
makevectors (self.v_angle);
|
||||
traceline (self.origin, self.origin+v_forward*4000, FALSE, self);
|
||||
|
||||
org = self.origin;
|
||||
|
||||
if (trace_ent.classname == "monster" && trace_ent != self.friend)
|
||||
{
|
||||
if (te.classname == "monster" && (charm_monster == 0) && (visible(te)))
|
||||
{
|
||||
spawn_heart(te, 300);
|
||||
charm_monster = 1;
|
||||
te.friend = self;
|
||||
te.charmed = 300;
|
||||
te.enemy = world;
|
||||
te.goalentity = self;
|
||||
self.friend = te;
|
||||
}
|
||||
te = te.chain;
|
||||
trace_ent.friend = self;
|
||||
trace_ent.charmed = 30000;
|
||||
self.friend = trace_ent;
|
||||
spawn_heart(trace_ent, 3000);
|
||||
|
||||
self.friend.think = HuntTarget;
|
||||
self.friend.nextthink = time + 0.25;
|
||||
|
||||
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
||||
WriteByte (MSG_MULTICAST, TE_LIGHTNING2);
|
||||
WriteEntity (MSG_MULTICAST, self);
|
||||
WriteCoord (MSG_MULTICAST, org_x);
|
||||
WriteCoord (MSG_MULTICAST, org_y);
|
||||
WriteCoord (MSG_MULTICAST, org_z);
|
||||
WriteCoord (MSG_MULTICAST, trace_endpos_x);
|
||||
WriteCoord (MSG_MULTICAST, trace_endpos_y);
|
||||
WriteCoord (MSG_MULTICAST, trace_endpos_z);
|
||||
multicast (org, MULTICAST_PHS);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
void () puppet_master_command =
|
||||
{
|
||||
local entity te, ent;
|
||||
local vector org;
|
||||
local float charm_monster;
|
||||
//this allows you to control other monsters
|
||||
|
||||
makevectors (self.v_angle);
|
||||
traceline (self.origin, self.origin+v_forward*4000, FALSE, self);
|
||||
|
||||
if (self.friend.classname != "monster")
|
||||
return;
|
||||
|
||||
org = self.origin;
|
||||
|
||||
if (trace_ent.classname == "monster" && trace_ent != self.friend)
|
||||
{
|
||||
self.friend.enemy = trace_ent;
|
||||
self.friend.think = HuntTarget;
|
||||
self.friend.nextthink = time + 0.25;
|
||||
|
||||
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
||||
WriteByte (MSG_MULTICAST, TE_LIGHTNING2);
|
||||
WriteEntity (MSG_MULTICAST, self);
|
||||
WriteCoord (MSG_MULTICAST, org_x);
|
||||
WriteCoord (MSG_MULTICAST, org_y);
|
||||
WriteCoord (MSG_MULTICAST, org_z);
|
||||
WriteCoord (MSG_MULTICAST, trace_endpos_x);
|
||||
WriteCoord (MSG_MULTICAST, trace_endpos_y);
|
||||
WriteCoord (MSG_MULTICAST, trace_endpos_z);
|
||||
multicast (org, MULTICAST_PHS);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.friend.enemy = self;
|
||||
self.friend.oldenemy = self;
|
||||
self.friend.movetarget = self;
|
||||
self.friend.goalentity = self;
|
||||
self.friend.pausetime = time + 0.01;
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
void () illusion_heal =
|
||||
{
|
||||
|
@ -302,26 +356,7 @@ void () illusion_heal =
|
|||
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.classname == "player")//healing another team-mate
|
||||
{
|
||||
if (trace_ent.health >= trace_ent.max_health)
|
||||
{
|
||||
|
@ -361,34 +396,30 @@ void () illusion_heal =
|
|||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void () puppet_master_command =
|
||||
{
|
||||
local entity te, ent;
|
||||
local float charm_monster;
|
||||
//this allows you to control other monsters
|
||||
|
||||
makevectors (self.v_angle);
|
||||
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)
|
||||
else//nobody in front of user, so heal self
|
||||
{
|
||||
self.friend.enemy = trace_ent;
|
||||
self.friend.think = HuntTarget;
|
||||
self.friend.nextthink = time + 0.25;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.friend.enemy = self;
|
||||
self.friend.think = HuntTarget;
|
||||
self.friend.nextthink = time + 0.25;
|
||||
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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
void(float slotno) UsePerk =
|
||||
{
|
||||
local float x, mcount, eat;
|
||||
|
@ -449,25 +480,21 @@ void(float slotno) UsePerk =
|
|||
}
|
||||
if ((self.perk1 == 3 && slotno == 1) || (self.perk2 == 3 && slotno == 2))
|
||||
{
|
||||
if (slotno == 1)
|
||||
self.perk1timer = 2000;
|
||||
if (slotno == 2)
|
||||
self.perk2timer = 2000;
|
||||
|
||||
sound (self, CHAN_BODY, "misc/beep1.wav", 1, ATTN_NORM);
|
||||
|
||||
org = self.origin;
|
||||
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
||||
WriteByte (MSG_MULTICAST, TE_TELEPORT);
|
||||
WriteCoord (MSG_MULTICAST, org_x);
|
||||
WriteCoord (MSG_MULTICAST, org_y);
|
||||
WriteCoord (MSG_MULTICAST, org_z);
|
||||
|
||||
if (self.friend.classname != "monster")
|
||||
puppet_master();
|
||||
else
|
||||
puppet_master_command();
|
||||
|
||||
if (self.friend.classname == "monster")
|
||||
{
|
||||
if (slotno == 1)
|
||||
self.perk1timer = 2000;
|
||||
if (slotno == 2)
|
||||
self.perk2timer = 2000;
|
||||
}
|
||||
}
|
||||
else if ((self.perk1 == 7 && slotno == 1) || (self.perk2 == 7 && slotno == 2))
|
||||
{
|
||||
|
@ -485,13 +512,16 @@ void(float slotno) UsePerk =
|
|||
WriteCoord (MSG_MULTICAST, org_y);
|
||||
WriteCoord (MSG_MULTICAST, org_z);
|
||||
|
||||
stuffcmd(self, "gl_motionblur 0.9\n");
|
||||
self.blurtime = 5;
|
||||
|
||||
te = findradius (self.origin, 6000);
|
||||
while (te)
|
||||
{
|
||||
if (te.classname == "monster")
|
||||
{
|
||||
te.hold = 120;
|
||||
spawn_stop(te, 8);
|
||||
spawn_stop(te, 5);
|
||||
mcount = mcount + 1;
|
||||
}
|
||||
te = te.chain;
|
||||
|
@ -507,11 +537,11 @@ void(float slotno) UsePerk =
|
|||
sound (self, CHAN_BODY, "items/damage.wav", 1, ATTN_NORM);
|
||||
sprint(self, 2, "it is time...\n");
|
||||
self.supertime = 15;
|
||||
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.skill_combat = self.skill_combat + 10;
|
||||
self.skill_doctor = self.skill_doctor + 10;
|
||||
self.skill_sneak = self.skill_sneak + 10;
|
||||
self.skill_science = self.skill_science + 10;
|
||||
self.skill_speech = self.skill_speech + 10;
|
||||
}
|
||||
else if ((self.perk1 == 9 && slotno == 1) || (self.perk2 == 9 && slotno == 2))
|
||||
{
|
||||
|
@ -584,7 +614,7 @@ void(float damage, float dist, float rate) FireMelee =
|
|||
if (getperk(5))//living anatomy
|
||||
{
|
||||
if (self.steadyaim == 0)
|
||||
damage = damage + self.skill_doctor;
|
||||
damage = damage + self.skill_doctor + self.skill_speech;
|
||||
}
|
||||
|
||||
self.recoil = self.recoil + 5;
|
||||
|
@ -2252,13 +2282,13 @@ void () ProneOff =
|
|||
sprint (self, 2, "position: stand.\n");
|
||||
if (getperk(10))
|
||||
{
|
||||
self.attack_finished = time + 0.5;
|
||||
self.rtime = time + 0.5;
|
||||
self.attack_finished = time + 0.75 - (self.skill_speech*0.05);
|
||||
self.rtime = time + 0.75 - (self.skill_speech*0.05);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.attack_finished = time + 1.5;
|
||||
self.rtime = time + 1.5;
|
||||
self.attack_finished = time + 1.5 - (self.skill_speech*0.05);
|
||||
self.rtime = time + 1.5 - (self.skill_speech*0.05);
|
||||
}
|
||||
self.position = 0;
|
||||
PositionControl();
|
||||
|
@ -2291,10 +2321,15 @@ void () ProneOn =
|
|||
self.position = 2;
|
||||
self.view_ofs = '0 0 -10';
|
||||
sprint (self, 2, "position: prone.\n");
|
||||
if (!getperk(10))
|
||||
if (getperk(10))
|
||||
{
|
||||
self.attack_finished = time + 1.5;
|
||||
self.rtime = time + 1.5;
|
||||
self.attack_finished = time + 0.75 - (self.skill_speech*0.05);
|
||||
self.rtime = time + 0.75 - (self.skill_speech*0.05);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.attack_finished = time + 1.5 - (self.skill_speech*0.05);
|
||||
self.rtime = time + 1.5 - (self.skill_speech*0.05);
|
||||
}
|
||||
PositionControl();
|
||||
};
|
||||
|
@ -2312,10 +2347,15 @@ void () DuckOff =
|
|||
return;
|
||||
}
|
||||
sprint (self, 2, "position: stand.\n");
|
||||
if (!getperk(10))
|
||||
if (getperk(10))
|
||||
{
|
||||
self.attack_finished = time + 0.2;
|
||||
self.rtime = time + 0.2;
|
||||
self.attack_finished = time + 0.25 - (self.skill_speech*0.05);
|
||||
self.rtime = time + 0.75 - (self.skill_speech*0.05);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.attack_finished = time + 0.75 - (self.skill_speech*0.05);
|
||||
self.rtime = time + 1.5 - (self.skill_speech*0.05);
|
||||
}
|
||||
self.view_ofs = '0 0 22';
|
||||
self.position = 0;
|
||||
|
@ -2351,10 +2391,15 @@ void () DuckOn =
|
|||
return;
|
||||
}
|
||||
|
||||
if (!getperk(10))
|
||||
if (getperk(10))
|
||||
{
|
||||
self.attack_finished = time + 0.5;
|
||||
self.rtime = time + 0.5;
|
||||
self.attack_finished = time + 0.25 - (self.skill_speech*0.05);
|
||||
self.rtime = time + 0.25 - (self.skill_speech*0.05);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.attack_finished = time + 0.75 - (self.skill_speech*0.05);
|
||||
self.rtime = time + 0.75 - (self.skill_speech*0.05);
|
||||
}
|
||||
self.walk = 0;
|
||||
self.speedmulti = 1.00;
|
||||
|
@ -2421,25 +2466,15 @@ void() ImpulseCommands =
|
|||
}
|
||||
|
||||
|
||||
if (self.impulse == 11)
|
||||
ServerflagsCommand ();
|
||||
|
||||
if (self.impulse == 200)
|
||||
DuckOn ();
|
||||
if (self.impulse == 201)
|
||||
ProneOn ();
|
||||
|
||||
if (self.impulse == 240)
|
||||
AddClone ();
|
||||
|
||||
if (self.impulse == 50)
|
||||
ReloadWeapon (self.current_slot);
|
||||
// if (self.impulse == 51)
|
||||
// UseChem ();
|
||||
if (self.impulse == 52)
|
||||
BuyMenu ();
|
||||
if (self.impulse == 53)
|
||||
Special ();
|
||||
Sneak ();
|
||||
if (self.impulse == 100)
|
||||
ExitScreen ();
|
||||
if (self.impulse == 55)
|
||||
|
@ -2455,39 +2490,13 @@ void() ImpulseCommands =
|
|||
if (self.impulse == 62)
|
||||
UsePerk (2);
|
||||
|
||||
if (self.impulse == 65)
|
||||
HostageReport ();
|
||||
|
||||
if (self.impulse == 66)
|
||||
WalkOn ();
|
||||
if (self.impulse == 67)
|
||||
WalkOff ();
|
||||
|
||||
if (self.impulse == 212)
|
||||
function_radio ("radio/1_yes.wav", 1);
|
||||
if (self.impulse == 213)
|
||||
function_radio ("radio/2_no.wav", 2);
|
||||
if (self.impulse == 214)
|
||||
function_radio ("radio/3_letsgo.wav", 3);
|
||||
if (self.impulse == 215)
|
||||
function_radio ("radio/4_cover.wav", 4);
|
||||
if (self.impulse == 216)
|
||||
function_radio ("radio/5_recon.wav", 5);
|
||||
if (self.impulse == 217)
|
||||
function_radio ("radio/6_backup.wav", 6);
|
||||
if (self.impulse == 218)
|
||||
function_radio ("radio/7_hold.wav", 7);
|
||||
if (self.impulse == 219)
|
||||
function_radio ("radio/8_behind.wav", 8);
|
||||
if (self.impulse == 220)
|
||||
function_radio ("radio/9_secure.wav", 9);
|
||||
if (self.impulse == 221)
|
||||
function_radio ("radio/10_suppressing.wav", 10);
|
||||
if (self.impulse == 222)
|
||||
function_radio ("radio/11_quiet.wav", 11);
|
||||
if (self.impulse == 223)
|
||||
CheatCommand();
|
||||
if (self.impulse == 224)
|
||||
show_light_level();
|
||||
|
||||
if (self.impulse == 225)
|
||||
UseStimpack();
|
||||
if (self.impulse == 226)
|
||||
|
@ -2519,16 +2528,11 @@ void() W_WeaponFrame =
|
|||
|
||||
// check for attack
|
||||
if (self.button0)
|
||||
{
|
||||
SuperDamageSound ();
|
||||
W_Attack ();
|
||||
}
|
||||
if (!self.button0)
|
||||
{
|
||||
|
||||
if (self.attack > 0)
|
||||
player_run ();
|
||||
|
||||
self.attack = 0;
|
||||
}
|
||||
};
|
||||
|
@ -3196,7 +3200,7 @@ void (float dam, float ap, string snd, float rng, float rate) FirePistol =
|
|||
if (getperk(5))
|
||||
{
|
||||
if (self.steadyaim == 0)
|
||||
dam = dam + self.skill_doctor;
|
||||
dam = dam + self.skill_doctor + self.skill_speech;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3340,20 +3344,21 @@ void (float dam, float ap, string snd, float rng, float rate) FireSMG =
|
|||
if (getperk(5))
|
||||
{
|
||||
if (self.steadyaim == 0)
|
||||
dam = dam + self.skill_doctor;
|
||||
dam = dam + self.skill_doctor + self.skill_speech;
|
||||
}
|
||||
|
||||
sound (self, CHAN_WEAPON, snd, 1, ATTN_NORM);
|
||||
loud_noise(40);
|
||||
|
||||
|
||||
|
||||
self.equipment_slot = 0;
|
||||
sprint(self, PRINT_HIGH, "<EFBFBD> Uncloaked <20>\n");
|
||||
setmodel (self, "progs/guy.mdl");
|
||||
self.sneak = 0;
|
||||
sound (self, CHAN_BODY, "misc/r_tele4.wav", 1, ATTN_NORM);
|
||||
|
||||
if (self.sneak > 0)
|
||||
{
|
||||
self.equipment_slot = 0;
|
||||
sprint(self, PRINT_HIGH, "<EFBFBD> Uncloaked <20>\n");
|
||||
setmodel (self, "progs/guy.mdl");
|
||||
self.sneak = 0;
|
||||
sound (self, CHAN_BODY, "misc/r_tele4.wav", 1, ATTN_NORM);
|
||||
}
|
||||
|
||||
self.attack_finished = (time + rate);
|
||||
|
||||
|
@ -3395,8 +3400,8 @@ void (float dam, float ap, string snd, float rng, float rate) FireSMG =
|
|||
|
||||
if (weap == IID_WP_MP9)
|
||||
{
|
||||
tmp = 200;
|
||||
dam = dam * 1.25;
|
||||
tmp = 165;
|
||||
dam = dam * 1.1;
|
||||
}
|
||||
|
||||
if (self.velocity == '0 0 0')
|
||||
|
@ -3631,7 +3636,7 @@ void (float dam, float accuracy, string snd, float rng, float rate) FireAssaultR
|
|||
if (getperk(5))
|
||||
{
|
||||
if (self.steadyaim == 0)
|
||||
dam = dam + self.skill_doctor;
|
||||
dam = dam + self.skill_doctor + self.skill_speech;
|
||||
}
|
||||
|
||||
if (weap == IID_WP_MOONLIGHT)
|
||||
|
@ -3913,7 +3918,7 @@ void (float dam, float xrecoil, string snd, float rng, float rate) FireMinigun =
|
|||
if (getperk(5))
|
||||
{
|
||||
if (self.steadyaim == 0)
|
||||
dam = dam + self.skill_doctor;
|
||||
dam = dam + self.skill_doctor + self.skill_speech;
|
||||
}
|
||||
|
||||
loud_noise(50);
|
||||
|
@ -4521,43 +4526,8 @@ void () UseStimpack =
|
|||
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
|
||||
{
|
||||
x = SlotOfItem(self, IID_CHEM_STIMPACK);
|
||||
if (x == 0)
|
||||
{
|
||||
sprint(self, PRINT_MEDIUM, "you don't have a stimpack\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.regen > 0)
|
||||
sprint(self, PRINT_MEDIUM, "you are already affected by a stimpack\n");
|
||||
else if (self.health >= self.max_health)
|
||||
sprint(self, PRINT_MEDIUM, "you are not injured.\n");
|
||||
else if (self.health < self.max_health)
|
||||
{
|
||||
DecreaseDestroySlot(x);//take away a stimpack
|
||||
|
||||
sound (self, CHAN_BODY, "items/r_item2.wav", 1, ATTN_NORM);
|
||||
sprint(self, PRINT_MEDIUM, "you heal yourself with a stimpack\n");
|
||||
|
||||
thing = findradius(self.origin, 400);
|
||||
while (thing)
|
||||
{
|
||||
if (thing.classname == "player" && thing.health < self.health)
|
||||
self.score = self.score - 50;
|
||||
|
||||
thing = thing.chain;
|
||||
}
|
||||
|
||||
self.health = self.health + 30 + (self.skill_doctor);
|
||||
self.regen = self.regen + (5 + (self.skill_doctor/2));
|
||||
spawn_healing(self);
|
||||
spawn_healing(self);
|
||||
spawn_healing(self);
|
||||
}
|
||||
}
|
||||
else if (trace_ent.classname == "player")//healing another team-mate
|
||||
if (trace_ent.classname == "player")//healing another team-mate
|
||||
{
|
||||
if (trace_ent.regen >= 1 && trace_ent.health > 0)
|
||||
{
|
||||
|
@ -4633,6 +4603,42 @@ void () UseStimpack =
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
x = SlotOfItem(self, IID_CHEM_STIMPACK);
|
||||
if (x == 0)
|
||||
{
|
||||
sprint(self, PRINT_MEDIUM, "you don't have a stimpack\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.regen > 0)
|
||||
sprint(self, PRINT_MEDIUM, "you are already affected by a stimpack\n");
|
||||
else if (self.health >= self.max_health)
|
||||
sprint(self, PRINT_MEDIUM, "you are not injured.\n");
|
||||
else if (self.health < self.max_health)
|
||||
{
|
||||
DecreaseDestroySlot(x);//take away a stimpack
|
||||
|
||||
sound (self, CHAN_BODY, "items/r_item2.wav", 1, ATTN_NORM);
|
||||
sprint(self, PRINT_MEDIUM, "you heal yourself with a stimpack\n");
|
||||
|
||||
thing = findradius(self.origin, 400);
|
||||
while (thing)
|
||||
{
|
||||
if (thing.classname == "player" && thing.health < self.health)
|
||||
self.score = self.score - 50;
|
||||
|
||||
thing = thing.chain;
|
||||
}
|
||||
|
||||
self.health = self.health + 30 + (self.skill_doctor);
|
||||
self.regen = self.regen + (5 + (self.skill_doctor/2));
|
||||
spawn_healing(self);
|
||||
spawn_healing(self);
|
||||
spawn_healing(self);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void () UseSuperStim =
|
||||
|
@ -4758,40 +4764,7 @@ void () UseMedicalBag =
|
|||
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
|
||||
{
|
||||
x = SlotOfItem(self, IID_CHEM_MEDICALBAG);
|
||||
if (x == 0)
|
||||
{
|
||||
sprint(self, PRINT_MEDIUM, "you don't have a medkit\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.regen > 0)
|
||||
sprint(self, PRINT_MEDIUM, "you are already affected by a healing chem\n");
|
||||
else if (self.health >= self.max_health)
|
||||
sprint(self, PRINT_MEDIUM, "you are not injured.\n");
|
||||
else if (self.health < self.max_health)
|
||||
{
|
||||
DecreaseDestroySlot(x);//take away a medkit
|
||||
|
||||
local entity thing;
|
||||
thing = findradius(self.origin, 400);
|
||||
while (thing)
|
||||
{
|
||||
if (thing.classname == "player" && (thing.health+20) < self.health)
|
||||
self.score = self.score - 25;
|
||||
|
||||
thing = thing.chain;
|
||||
}
|
||||
|
||||
sound (self, CHAN_BODY, "items/r_item1.wav", 1, ATTN_NORM);
|
||||
self.health = self.health + 5 + (self.skill_doctor/2);
|
||||
self.regen = self.regen + 3 + (self.skill_doctor/2);
|
||||
spawn_healing(self);
|
||||
}
|
||||
}
|
||||
else if (trace_ent.classname == "player")//healing another team-mate
|
||||
if (trace_ent.classname == "player")//healing another team-mate
|
||||
{
|
||||
if (trace_ent.regen >= 1 && trace_ent.health > 0)
|
||||
{
|
||||
|
@ -4844,6 +4817,40 @@ void () UseMedicalBag =
|
|||
}
|
||||
}
|
||||
}
|
||||
else//nobody in front of user, so heal self
|
||||
{
|
||||
x = SlotOfItem(self, IID_CHEM_MEDICALBAG);
|
||||
if (x == 0)
|
||||
{
|
||||
sprint(self, PRINT_MEDIUM, "you don't have a medkit\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.regen > 0)
|
||||
sprint(self, PRINT_MEDIUM, "you are already affected by a healing chem\n");
|
||||
else if (self.health >= self.max_health)
|
||||
sprint(self, PRINT_MEDIUM, "you are not injured.\n");
|
||||
else if (self.health < self.max_health)
|
||||
{
|
||||
DecreaseDestroySlot(x);//take away a medkit
|
||||
|
||||
local entity thing;
|
||||
thing = findradius(self.origin, 400);
|
||||
while (thing)
|
||||
{
|
||||
if (thing.classname == "player" && (thing.health+20) < self.health)
|
||||
self.score = self.score - 25;
|
||||
|
||||
thing = thing.chain;
|
||||
}
|
||||
|
||||
sound (self, CHAN_BODY, "items/r_item1.wav", 1, ATTN_NORM);
|
||||
self.health = self.health + 5 + (self.skill_doctor/2);
|
||||
self.regen = self.regen + 3 + (self.skill_doctor/2);
|
||||
spawn_healing(self);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
void () DisplayMenu =
|
||||
|
@ -5111,7 +5118,7 @@ void () ExitScreen =
|
|||
|
||||
makevectors (self.v_angle);
|
||||
traceline (self.origin, self.origin + v_forward*128, FALSE, self);
|
||||
|
||||
/*
|
||||
if (self.pickup == 1)
|
||||
{
|
||||
self.pickup = 0;
|
||||
|
@ -5134,7 +5141,7 @@ void () ExitScreen =
|
|||
return;
|
||||
}
|
||||
else if (self.pickup == 1)
|
||||
self.pickup = 0;
|
||||
self.pickup = 0;*/
|
||||
|
||||
if (trace_ent.classname == "bomb")
|
||||
{
|
||||
|
@ -6132,7 +6139,7 @@ void (float rec, float number, float dam, float spread, float ran, float auto, s
|
|||
if (getperk(5))
|
||||
{
|
||||
if (self.steadyaim == 0)
|
||||
dam = dam + self.skill_doctor/3;
|
||||
dam = dam + (self.skill_doctor/3) + (self.skill_speech/3);
|
||||
}
|
||||
|
||||
weap = ToIID(self.(SlotField(self.current_slot)));
|
||||
|
|
|
@ -202,24 +202,22 @@ void() load_monster =
|
|||
{
|
||||
self.zone = 1;
|
||||
|
||||
if (world.map_ent2 == 1)
|
||||
if (world.map_ent2 == 1 || world.map_ent2 == 2)
|
||||
monster_dog();
|
||||
if (world.map_ent2 == 2)
|
||||
monster_zombie();
|
||||
if (world.map_ent2 == 3 || world.map_ent2 == 4)
|
||||
monster_army();
|
||||
if (world.map_ent2 == 5 || world.map_ent2 == 6)
|
||||
if (world.map_ent2 == 5)
|
||||
monster_army();
|
||||
if (world.map_ent2 == 6)
|
||||
monster_ogre();
|
||||
if (world.map_ent2 == 7)
|
||||
monster_army();
|
||||
monster_enforcer();
|
||||
if (world.map_ent2 == 8)
|
||||
monster_demon1();
|
||||
monster_enforcer();
|
||||
if (world.map_ent2 == 9)
|
||||
monster_demon1();
|
||||
if (world.map_ent2 == 10)
|
||||
monster_enforcer();
|
||||
if (world.map_ent2 == 11)
|
||||
monster_shalrath();
|
||||
monster_demon1();
|
||||
if (world.map_ent2 == 12)
|
||||
monster_shambler();
|
||||
}
|
||||
|
@ -233,8 +231,6 @@ void() load_monster =
|
|||
monster_zombie();
|
||||
else if (random()<0.10)
|
||||
monster_army();
|
||||
else if (random()<0.10)
|
||||
monster_ogre();
|
||||
else if (random()<0.10)
|
||||
monster_army();
|
||||
else if (random()<0.10)
|
||||
|
@ -326,23 +322,23 @@ void() map_startup =
|
|||
world.map_ent2_percent = t;
|
||||
world.map_ent3_percent = x;
|
||||
|
||||
if (challenge_rating < 2)
|
||||
if (challenge_rating < 4)
|
||||
{
|
||||
world.map_ent1 = ceil(random()*6);
|
||||
world.map_ent2 = ceil(random()*6);
|
||||
world.map_ent3 = ceil(random()*6);
|
||||
}
|
||||
else if (challenge_rating < 8)
|
||||
{
|
||||
world.map_ent1 = 2 + ceil(random()*6);
|
||||
world.map_ent2 = ceil(random()*8);
|
||||
world.map_ent3 = ceil(random()*8);
|
||||
}
|
||||
else if (challenge_rating < 4)
|
||||
{
|
||||
world.map_ent1 = 2 + ceil(random()*8);
|
||||
world.map_ent2 = 4 + ceil(random()*6);
|
||||
world.map_ent3 = 6 + ceil(random()*4);
|
||||
world.map_ent2 = 2 + ceil(random()*6);
|
||||
world.map_ent3 = 2 + ceil(random()*6);
|
||||
}
|
||||
else
|
||||
{
|
||||
world.map_ent1 = 4 + ceil(random()*8);
|
||||
world.map_ent2 = 6 + ceil(random()*6);
|
||||
world.map_ent3 = 8 + ceil(random()*4);
|
||||
world.map_ent1 = 4 + ceil(random()*6);
|
||||
world.map_ent2 = 4 + ceil(random()*6);
|
||||
world.map_ent3 = 4 + ceil(random()*6);
|
||||
}
|
||||
|
||||
if (world.map_obj == OBJ_HOSTAGE)
|
||||
|
@ -1392,7 +1388,7 @@ void () RecoilControl =
|
|||
}
|
||||
|
||||
|
||||
te.recoil = te.recoil - (0.10+(te.skill_combat*0.01));
|
||||
te.recoil = te.recoil - (0.15+(te.skill_combat*0.01));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1419,7 +1415,7 @@ void () RecoilControl =
|
|||
//support fire: going prone gives a -10 recoil bonus with this perk
|
||||
if (getperk(1) && self.position == 2 && te.recoil > 3)
|
||||
{
|
||||
te.recoil = te.recoil - 0.20;
|
||||
te.recoil = te.recoil - (0.15 +(self.skill_speech*0.01));
|
||||
te.driftx = te.driftx * 0.5;
|
||||
te.drifty = te.drifty * 0.5;
|
||||
}
|
||||
|
@ -1758,7 +1754,7 @@ void() worldspawn =
|
|||
precache_sound ("weapons/g11.wav");
|
||||
precache_sound ("weapons/gauss.wav");
|
||||
precache_sound ("weapons/gpull.wav");
|
||||
precache_sound ("weapons/citykiller.wav");
|
||||
precache_sound ("weapons/shotgun1.wav");
|
||||
precache_sound ("weapons/laser.wav");
|
||||
precache_sound ("weapons/blaster.wav");
|
||||
precache_sound ("weapons/moonlight-1.wav");
|
||||
|
|
Loading…
Reference in a new issue