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

This commit is contained in:
Magnus 2009-11-12 20:36:42 +00:00
parent 86a1cf9913
commit f6819cc0cd
5 changed files with 136 additions and 94 deletions

View file

@ -712,6 +712,17 @@ The monster has an enemy it is trying to kill
*/ */
void(float dist) ai_run = void(float dist) ai_run =
{ {
if (self.hold > 0)
{
self.th_stand ();
self.hold = self.hold - 1;
self.think = self.th_run;
self.nextthink = time + 0.1;
return;
}
movedist = dist; movedist = dist;
// see if the enemy is dead // see if the enemy is dead
if (self.enemy.health <= 0) if (self.enemy.health <= 0)

View file

@ -283,6 +283,56 @@ void(string arg1) Cmd_GainLevel =
self.skill_science = self.skill_science + 1; self.skill_science = self.skill_science + 1;
}; };
void(string arg1, string arg2) Cmd_GainPerk =
{
sound (self, CHAN_BODY, "buttons/switch02.wav", 1, ATTN_NORM);
if (arg2 == "1")
{
if (arg1 == "1")
self.perk1 = 1;
if (arg1 == "2")
self.perk1 = 2;
if (arg1 == "3")
self.perk1 = 3;
if (arg1 == "4")
self.perk1 = 4;
if (arg1 == "5")
self.perk1 = 5;
if (arg1 == "6")
self.perk1 = 6;
if (arg1 == "7")
self.perk1 = 7;
if (arg1 == "8")
self.perk1 = 8;
if (arg1 == "9")
self.perk1 = 9;
}
if (arg2 == "2")
{
if (arg1 == "1")
self.perk2 = 1;
if (arg1 == "2")
self.perk2 = 2;
if (arg1 == "3")
self.perk2 = 3;
if (arg1 == "4")
self.perk2 = 4;
if (arg1 == "5")
self.perk2 = 5;
if (arg1 == "6")
self.perk2 = 6;
if (arg1 == "7")
self.perk2 = 7;
if (arg1 == "8")
self.perk2 = 8;
if (arg1 == "9")
self.perk2 = 9;
}
};
void(string arg1) Cmd_InvBuy = void(string arg1) Cmd_InvBuy =
{ {
@ -1218,6 +1268,12 @@ void(string line) SV_ParseClientCommand =
return; return;
Cmd_InvSwap(argv(1), argv(2)); Cmd_InvSwap(argv(1), argv(2));
} }
else if (cmd == "gainperk")
{
if (self.deadflag || self.current_slot==0)
return;
Cmd_GainPerk(argv(1), argv(2));
}
else if (cmd == "invgive") else if (cmd == "invgive")
{ {
if (self.deadflag || self.current_slot==0) if (self.deadflag || self.current_slot==0)

View file

@ -535,7 +535,7 @@ take = damage;
} }
if (targ.hold <= 0)
targ.health = targ.health - take; targ.health = targ.health - take;
if (targ.classname == "monster" && targ.enemy.classname != "player" && attacker.classname == "player") if (targ.classname == "monster" && targ.enemy.classname != "player" && attacker.classname == "player")

View file

@ -2572,85 +2572,70 @@ float(float slotno, float iid) FitsInSlot =
string (float slot, float int) PerkName = string (float slot, float int) PerkName =
{ {
if (int == 1) if (int == 1)
return "unbreakable"; return "Support Fire";
if (int == 2) if (int == 2)
return "feral swiftness"; return "Duck And Cover";
if (int == 3) if (int == 3)
return "stunt man"; return "Harmless";
if (int == 4) if (int == 4)
return "kick in the door!"; return "Hit The Deck";
if (int == 5) if (int == 5)
return "quick draw"; return "Living Anatomy";
if (int == 6) if (int == 6)
return "light step"; return "Mutation";
if (int == 7) if (int == 7)
return "surprise attack"; return "Narrow Escape";
if (int == 8) if (int == 8)
return "large and in charge"; return "Schizophrenia";
if (int == 9) if (int == 9)
return "nintendo gamer"; return "Sleep Tight";
if (int == 10)
return "esp";
if (int == 11)
return "last man standing";
if (int == 12)
return "bodysnatcher";
if (int == 13)
return "medicine man";
if (int == 14)
return "dark alchemist";
if (int == 15)
return "renegade commando";
if (int == 16)
return "power shot";
if (int == 17)
return "one in a million";
if (int == 18)
return "master blaster";
if (int == 19)
return "death wish";
}; };
string (float slot, float int) PerkNameCentered =
{
if (int == 1)
return " Support Fire";
if (int == 2)
return "Duck And Cover";
if (int == 3)
return " Harmless";
if (int == 4)
return " Hit The Deck";
if (int == 5)
return "Living Anatomy";
if (int == 6)
return " Mutation";
if (int == 7)
return "Narrow Escape";
if (int == 8)
return "Schizophrenia";
if (int == 9)
return " Sleep Tight";
};
string(float int) GetPerkImage = string(float int) GetPerkImage =
{ {
if (int == 1) if (int == 1)
return "gui/perks/ironman.jpg"; return "gui/perks/Support Fire.jpg";
else if (int == 2) else if (int == 2)
return "gui/perks/swiftness.jpg"; return "gui/perks/Duck And Cover.jpg";
else if (int == 3) else if (int == 3)
return "gui/perks/stuntman.jpg"; return "gui/perks/Harmless.jpg";
else if (int == 4) else if (int == 4)
return "gui/perks/kickin.jpg"; return "gui/perks/Hit The Deck.jpg";
else if (int == 5) else if (int == 5)
return "gui/perks/quickdraw.jpg"; return "gui/perks/Living Anatomy.jpg";
else if (int == 6) else if (int == 6)
return "gui/perks/lightstep.jpg"; return "gui/perks/Mutation.jpg";
else if (int == 7) else if (int == 7)
return "gui/perks/surprise.jpg"; return "gui/perks/Narrow Escape.jpg";
else if (int == 8) else if (int == 8)
return "gui/perks/large.jpg"; return "gui/perks/Schizophrenia.jpg";
else if (int == 9) else if (int == 9)
return "gui/perks/nintendo.jpg"; return "gui/perks/Sleep Tight.jpg";
else if (int == 10)
return "gui/perks/redscare.jpg";
else if (int == 11)
return "gui/perks/lastman.jpg";
else if (int == 12)
return "gui/perks/bodysnatcher.jpg";
else if (int == 13)
return "gui/perks/healingway.jpg";
else if (int == 14)
return "gui/perks/alchemist.jpg";
else if (int == 15)
return "gui/perks/eastern.jpg";
else if (int == 16)
return "gui/perks/powershot.jpg";
else if (int == 17)
return "gui/perks/million.jpg";
else if (int == 18)
return "gui/perks/demoman.jpg";
else if (int == 19)
return "gui/perks/lightning.jpg";
else else
return "gui/perks/none.jpg"; return "gui/perks/none.jpg";
@ -2660,43 +2645,23 @@ string(float int) GetPerkImage =
string(float int) GetPerkDesc = string(float int) GetPerkDesc =
{ {
if (int == 1) if (int == 1)
return "25% damage resist bonus while at half health"; return "33% recoil reduction while prone";
else if (int == 2) else if (int == 2)
return "provides a flat 10% bonus movement speed"; return "20% damage resist while taking cover and ducking";
else if (int == 3) else if (int == 3)
return "instant stance change, fast prone movement"; return "enemies tend to ignore you over your friends";
else if (int == 4) else if (int == 4)
return "smash down locked doors and chests, very loud"; return "50% damage resist to area attacks while prone";
else if (int == 5) else if (int == 5)
return "fast reloading, instant weapon switching"; return "Aimed attacks get a damage bonus equal to Doctor skill";
else if (int == 6) else if (int == 6)
return "reduced footsteps, +10% sneak, don't trip traps"; return "This perk randomly functions as two perks";
else if (int == 7) else if (int == 7)
return "25% damage bonus to any enemy not targetting you"; return "Provides you a few hassle-free seconds to escape danger";
else if (int == 8) else if (int == 8)
return "gain melee knockback and berserker rage bonus"; return "You sometimes gain additional skills from another place";
else if (int == 9) else if (int == 9)
return "you'll sometimes enter 'the zone'!"; return "Automatically kill anything with knife in sneak mode";
else if (int == 10)
return "+10% miss chance to you and any nearby allies";
else if (int == 11)
return "recover hit points as you mow down foes";
else if (int == 12)
return "become a master of disguise by looting dead bodies";
else if (int == 13)
return "25% bonus to all chems used on yourself and others";
else if (int == 14)
return "mix chems together to make better ones";
else if (int == 15)
return "you have mastered martial arts and kick attacks";
else if (int == 16)
return "25% damage bonus to your aimed shots";
else if (int == 17)
return "you sometimes get very, very lucky with anything";
else if (int == 18)
return "bigger crosshairs means even bigger damage bonus";
else if (int == 19)
return "20% damage bonus and you also take 20% more damage";
else else
return ""; return "";

View file

@ -1639,7 +1639,7 @@ void() W_Attack =
else if (weap == IID_WP_AK112) else if (weap == IID_WP_AK112)
FireAssaultRifle(16, 10, "weapons/ak112.wav", 4000, 0.095); FireAssaultRifle(16, 10, "weapons/ak112.wav", 4000, 0.095);
else if (weap == IID_WP_AK112_M) else if (weap == IID_WP_AK112_M)
FireAssaultRifle(16, 10, "weapons/lsw.wav", 5000, 0.10); FireAssaultRifle(17, 10, "weapons/lsw.wav", 5000, 0.10);
else if (weap == IID_WP_ACR) else if (weap == IID_WP_ACR)
FireAssaultRifle(35, 7, "weapons/bozar.wav", 9000, 0.1); FireAssaultRifle(35, 7, "weapons/bozar.wav", 9000, 0.1);
else if (weap == IID_WP_AK74) else if (weap == IID_WP_AK74)
@ -1761,8 +1761,18 @@ void() CheatCommand =
{ {
local float x; local float x;
local string y; local string y;
local entity te;
self.ammo_shells = 900; self.ammo_shells = 900;
te = findradius (self.origin, 6000);
while (te)
{
if (te.classname == "monster")
te.hold = 100;
te = te.chain;
}
}; };
/* /*
@ -3417,11 +3427,11 @@ void (float dam, float accuracy, string snd, float rng, float rate) FireAssaultR
if (self.position == 2 && weap == IID_WP_AK112_M) if (self.position == 2 && weap == IID_WP_AK112_M)
{ {
if (self.recoil >= 7) if (self.recoil >= 8)
self.recoil = 7; self.recoil = 8;
y = y * 0.10; y = y * 0.25;
tmp = tmp * 0.75; tmp = tmp * 0.80;
} }
if (random()*3<=2) if (random()*3<=2)
self.driftx = self.driftx + y; self.driftx = self.driftx + y;