*** empty log message ***
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1752 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
4a0c9a0e79
commit
a80a951e94
17 changed files with 2327 additions and 4051 deletions
|
@ -7,6 +7,7 @@ void() player_stand1;
|
|||
void (vector org) spawn_tfog;
|
||||
void (vector org, entity death_owner) spawn_tdeath;
|
||||
void(float slot) WeaponAmmo;
|
||||
void() Identify;
|
||||
|
||||
float modelindex_dead, modelindex_sneak, modelindex_prone, modelindex_eyes, modelindex_player, modelindex_gone;
|
||||
|
||||
|
@ -331,19 +332,12 @@ entity() SelectSpawnPoint =
|
|||
if (spot)
|
||||
return spot;
|
||||
|
||||
ent1 = "info_player_start";
|
||||
|
||||
spot = find (world, classname, "info_player_start");
|
||||
|
||||
if (spot)
|
||||
cooperate = 1;
|
||||
|
||||
spot = find (world, classname, "spawn3");
|
||||
|
||||
if (spot)
|
||||
if (coop == 1)
|
||||
ent1 = "info_player_coop";
|
||||
else
|
||||
ent1 = "spawn3";
|
||||
|
||||
if (spot)
|
||||
|
||||
if (ent1 == "spawn3")
|
||||
{
|
||||
if (self.team == 1)
|
||||
ent1 = "spawn1";
|
||||
|
@ -488,7 +482,6 @@ void() PutClientInServer =
|
|||
self.classname = "player";
|
||||
self.health = 100;
|
||||
self.takedamage = DAMAGE_AIM;
|
||||
self.solid = SOLID_SLIDEBOX;
|
||||
self.movetype = MOVETYPE_WALK;
|
||||
self.show_hostile = 0;
|
||||
self.max_health = 100;
|
||||
|
@ -503,6 +496,8 @@ void() PutClientInServer =
|
|||
self.effects = 0;
|
||||
self.invincible_time = 0;
|
||||
self.active = 1;
|
||||
self.solid = SOLID_NOT;
|
||||
self.materialize = 200;
|
||||
|
||||
DecodeLevelParms ();
|
||||
|
||||
|
@ -512,7 +507,7 @@ void() PutClientInServer =
|
|||
self.th_pain = player_pain;
|
||||
self.th_die = PlayerDie;
|
||||
self.slot1 = 17;
|
||||
self.slot2 = 19;
|
||||
self.armor = 2;
|
||||
self.current_slot = 1;
|
||||
WeaponAmmo(1);
|
||||
WeaponAmmo(2);
|
||||
|
@ -833,7 +828,7 @@ void() PlayerJump =
|
|||
self.button2 = 0;
|
||||
|
||||
// player jumping sound
|
||||
sound (self, CHAN_BODY, "player/plyrjmp8.wav", 1, ATTN_NORM);
|
||||
sound (self, CHAN_BODY, "player/ax1.wav", 1, ATTN_NORM);
|
||||
};
|
||||
|
||||
|
||||
|
@ -952,6 +947,89 @@ void() CheckWaterJump =
|
|||
}
|
||||
};
|
||||
|
||||
void () SpeedControl =
|
||||
{
|
||||
|
||||
self.maxspeed = 200;
|
||||
|
||||
if (self.position == 1)
|
||||
self.maxspeed = self.maxspeed * 0.50;
|
||||
if (self.position == 2)
|
||||
self.maxspeed = self.maxspeed * 0.25;
|
||||
if (self.currentmenu != "none")
|
||||
self.maxspeed = 0;
|
||||
};
|
||||
|
||||
void() ArmorCheck =
|
||||
{
|
||||
local float type;
|
||||
local float bit;
|
||||
local float value;
|
||||
|
||||
//Armor
|
||||
if (self.armor == 1)
|
||||
type = 0.20;
|
||||
if (self.armor == 2)
|
||||
type = 0.30;
|
||||
if (self.armor == 3)
|
||||
type = 0.35;
|
||||
if (self.armor == 4)
|
||||
type = 0.35;
|
||||
if (self.armor == 5)
|
||||
type = 0.40;
|
||||
if (self.armor == 6)
|
||||
type = 0.45;
|
||||
if (self.armor == 7)
|
||||
type = 0.10;
|
||||
if (self.armor == 8)
|
||||
type = 0.50;
|
||||
|
||||
if (self.armor <= 3)
|
||||
self.items = (self.items - (self.items & ((IT_ARMOR1 | IT_ARMOR2) | IT_ARMOR3)) + IT_ARMOR1);
|
||||
else if (self.armor <= 6)
|
||||
self.items = (self.items - (self.items & ((IT_ARMOR1 | IT_ARMOR2) | IT_ARMOR3)) + IT_ARMOR1);
|
||||
else
|
||||
self.items = (self.items - (self.items & ((IT_ARMOR1 | IT_ARMOR2) | IT_ARMOR3)) + IT_ARMOR1);
|
||||
|
||||
if (self.armor == 1)
|
||||
self.armornoise = "misc/thud.wav";
|
||||
if (self.armor == 2)
|
||||
self.armornoise = "misc/thud.wav";
|
||||
if (self.armor == 3)
|
||||
self.armornoise = "misc/thud.wav";
|
||||
if (self.armor == 4)
|
||||
self.armornoise = "weapons/ric1.wav";
|
||||
if (self.armor == 5)
|
||||
self.armornoise = "misc/thud.wav";
|
||||
if (self.armor == 6)
|
||||
self.armornoise = "misc/thud.wav";
|
||||
if (self.armor == 7)
|
||||
self.armornoise = "misc/laserdef.wav";
|
||||
if (self.armor == 8)
|
||||
self.armornoise = "weapons/ric1.wav";
|
||||
|
||||
self.armorvalue = type * 100;
|
||||
self.armortype = type;
|
||||
};
|
||||
|
||||
void () WeightControl =
|
||||
{
|
||||
|
||||
GetArmorWeight();
|
||||
GetWeaponWeight(self, 1);
|
||||
GetWeaponWeight(self, 2);
|
||||
|
||||
if (self.class == 1)
|
||||
self.max_weight = 20;
|
||||
if (self.class == 2)
|
||||
self.max_weight = 20;
|
||||
if (self.class == 3)
|
||||
self.max_weight = 30;
|
||||
if (self.class == 4)
|
||||
self.max_weight = 15;
|
||||
};
|
||||
|
||||
|
||||
void () PositionControl =
|
||||
{
|
||||
local string img;
|
||||
|
@ -1002,6 +1080,35 @@ void() PlayerPreThink =
|
|||
makevectors (self.v_angle); // is this still used
|
||||
|
||||
|
||||
if (self.materialize > 0)
|
||||
{
|
||||
self.materialize = self.materialize - 1;
|
||||
|
||||
if (self.materialize <= 0)
|
||||
{
|
||||
if (walkmove(0, 0))
|
||||
{
|
||||
self.solid = SOLID_SLIDEBOX;
|
||||
//bprint(2, "turning solid\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
self.materialize = 50;
|
||||
//bprint(2, "stuck in object, returning non-solid\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (self.team == 0 && self.currentmenu == "none")
|
||||
{
|
||||
self.currentmenu = "select_team";
|
||||
DisplayMenu ();
|
||||
}
|
||||
else if (self.class == 0 && self.currentmenu == "none")
|
||||
{
|
||||
self.currentmenu = "select_skill";
|
||||
DisplayMenu ();
|
||||
}
|
||||
|
||||
self.recoil = self.recoil - 0.2;
|
||||
|
||||
|
@ -1013,7 +1120,11 @@ void() PlayerPreThink =
|
|||
|
||||
if (self.cycle1 < time)
|
||||
{
|
||||
Identify();
|
||||
PositionControl();
|
||||
SpeedControl();
|
||||
WeightControl();
|
||||
ArmorCheck();
|
||||
Crosshair();
|
||||
if (self.currentmenu != "none")
|
||||
DisplayMenu();
|
||||
|
@ -1026,7 +1137,37 @@ void() PlayerPreThink =
|
|||
|
||||
if (self.cycle2 < time)
|
||||
{
|
||||
self.cycle2 = time + 2;
|
||||
if (self.equipment == 8)
|
||||
r = 30;
|
||||
else
|
||||
r = 20;
|
||||
|
||||
if (self.sneak == 0)
|
||||
{
|
||||
if (self.ammo_cells < r)
|
||||
self.ammo_cells = self.ammo_cells + 1;
|
||||
|
||||
if (self.ammo_cells > r)
|
||||
self.ammo_cells = r;
|
||||
}
|
||||
if (self.sneak >= 1)
|
||||
{
|
||||
self.ammo_cells = self.ammo_cells = 1;
|
||||
|
||||
if (self.ammo_cells <= 0)
|
||||
{
|
||||
sprint(self, 2, "uncloaked.\n");
|
||||
self.sneak = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (self.regen > 0)
|
||||
{
|
||||
self.health = self.health + 3;
|
||||
self.regen = self.regen - 1;
|
||||
}
|
||||
|
||||
self.cycle2 = time + 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1244,6 +1385,8 @@ void() CheckPowerups =
|
|||
};
|
||||
|
||||
|
||||
void() Footstep;
|
||||
|
||||
/*
|
||||
================
|
||||
PlayerPostThink
|
||||
|
@ -1263,7 +1406,7 @@ void() PlayerPostThink =
|
|||
return;
|
||||
|
||||
// check to see if player landed and play landing sound
|
||||
if ((self.jump_flag < -300) && (self.flags & FL_ONGROUND) )
|
||||
if ((self.jump_flag < -50) && (self.flags & FL_ONGROUND) )
|
||||
{
|
||||
if (self.watertype == CONTENT_WATER)
|
||||
sound (self, CHAN_BODY, "player/h2ojump.wav", 1, ATTN_NORM);
|
||||
|
@ -1274,11 +1417,20 @@ void() PlayerPostThink =
|
|||
sound (self, CHAN_VOICE, "player/land2.wav", 1, ATTN_NORM);
|
||||
}
|
||||
else
|
||||
sound (self, CHAN_VOICE, "player/land.wav", 1, ATTN_NORM);
|
||||
Footstep();
|
||||
}
|
||||
|
||||
self.jump_flag = self.velocity_z;
|
||||
|
||||
if (self.rtime >= 1)
|
||||
{
|
||||
self.weaponframe = 3;
|
||||
self.rtime = (self.rtime - 1);
|
||||
|
||||
if (self.perk == 3)
|
||||
self.rtime = (self.rtime - 1);
|
||||
}
|
||||
|
||||
CheckPowerups ();
|
||||
|
||||
W_WeaponFrame ();
|
||||
|
@ -1299,10 +1451,28 @@ void() ClientConnect =
|
|||
bprint (PRINT_HIGH, " entered the game\n");
|
||||
|
||||
|
||||
stuffcmd(self, "bind shift impulse 200\n");
|
||||
stuffcmd(self, "bind ctrl impulse 201\n");
|
||||
stuffcmd(self, "v_damagecshift 1\n");
|
||||
stuffcmd(self, "alias duck impulse 200\n");
|
||||
stuffcmd(self, "alias prone impulse 201\n");
|
||||
stuffcmd(self, "alias reload impulse 50\n");
|
||||
stuffcmd(self, "alias chem impulse 51\n");
|
||||
stuffcmd(self, "alias buy impulse 52\n");
|
||||
stuffcmd(self, "alias special impulse 53\n");
|
||||
stuffcmd(self, "alias exit impulse 54\n");
|
||||
stuffcmd(self, "alias drop impulse 55\n");
|
||||
stuffcmd(self, "alias info impulse 56\n");
|
||||
stuffcmd(self, "alias equip impulse 57\n");
|
||||
|
||||
stuffcmd(self, "bind c equip\n");
|
||||
stuffcmd(self, "bind g drop\n");
|
||||
stuffcmd(self, "bind e exit\n");
|
||||
stuffcmd(self, "bind z special\n");
|
||||
stuffcmd(self, "bind r reload\n");
|
||||
stuffcmd(self, "bind x chem\n");
|
||||
stuffcmd(self, "bind b buy\n");
|
||||
stuffcmd(self, "bind q info\n");
|
||||
stuffcmd(self, "bind shift prone\n");
|
||||
stuffcmd(self, "bind ctrl duck\n");
|
||||
|
||||
stuffcmd(self, "exec fallout.cfg\n");
|
||||
|
||||
|
@ -1350,6 +1520,68 @@ void(entity targ, entity attacker) ClientObituary =
|
|||
attackerteam = infokey(attacker, "team");
|
||||
targteam = infokey(targ, "team");
|
||||
|
||||
if (targ.classname == "player")
|
||||
{
|
||||
if (coop == 1 && no_connect < 4)
|
||||
no_connect = no_connect + 1;
|
||||
|
||||
if (no_connect > 4)
|
||||
no_connect = 4;
|
||||
}
|
||||
|
||||
if (attacker.classname == "player")
|
||||
{
|
||||
if (coop == 1 && no_connect < 4)
|
||||
no_connect = no_connect + 1;
|
||||
|
||||
if (attacker == targ)
|
||||
attacker.kills = attacker.kills - 1;
|
||||
else if (attacker.team == targ.team)
|
||||
attacker.kills = attacker.kills - 1;
|
||||
else if (targ.classname == "player")
|
||||
attacker.kills = attacker.kills + 1;
|
||||
else if (targ.classname == "monster")
|
||||
attacker.kills = attacker.kills + 1;
|
||||
}
|
||||
|
||||
if (targ == attacker && targ.deathtype == "suicide")
|
||||
{
|
||||
bprint(2, attacker.netname);
|
||||
bprint(2, " takes the easy way out\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (targ == attacker && targ.deathtype == "bleed")
|
||||
{
|
||||
bprint(2, attacker.netname);
|
||||
bprint(2, " bled to death\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (targ != attacker && (targ.classname == "monster" || targ.classname == "player") && (attacker.classname == "monster" || attacker.classname == "player"))
|
||||
{
|
||||
bprint (PRINT_MEDIUM, "[ ");
|
||||
|
||||
if (attacker.critical == 3) //headshot
|
||||
bprint (PRINT_MEDIUM, "X ");
|
||||
if (attacker.critical == 777) //through the wall
|
||||
bprint (PRINT_MEDIUM, "% ");
|
||||
if (attacker.critical == 778) //wall headshot
|
||||
bprint (PRINT_MEDIUM, "& ");
|
||||
if (attacker.velocity_z != 0)
|
||||
bprint (PRINT_MEDIUM, "@ ");
|
||||
if (attacker.current_slot == 1 && attacker.mag1 == 0)
|
||||
bprint (PRINT_MEDIUM, "! ");
|
||||
|
||||
bprint (PRINT_MEDIUM, "] ");
|
||||
|
||||
bprint(2, attacker.netname);
|
||||
bprint(2, " >>> ");
|
||||
bprint(2, targ.netname);
|
||||
bprint(2, "\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (targ.classname == "player")
|
||||
{
|
||||
|
||||
|
@ -1631,3 +1863,112 @@ void(entity targ, entity attacker) ClientObituary =
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
void() Identify =
|
||||
{
|
||||
local string c1, c2, c3, c5, c6, c7;
|
||||
|
||||
makevectors (self.v_angle);
|
||||
traceline (self.origin, (self.origin + (v_forward * 2000)), FALSE, self);
|
||||
if (trace_ent.classname == "player" && self.currentmenu == "none" && self.team == trace_ent.team)
|
||||
{
|
||||
if (trace_ent.class == 2)
|
||||
c1 = "medic\n";
|
||||
if (trace_ent.class == 3)
|
||||
c1 = "assassin\n";
|
||||
if (trace_ent.class == 4)
|
||||
c1 = "soldier\n";
|
||||
if (trace_ent.class == 6)
|
||||
c1 = "scientist\n";
|
||||
|
||||
c2 = ftos (trace_ent.health);
|
||||
c3 = GetWeaponName (trace_ent, trace_ent.current_slot);
|
||||
|
||||
if (trace_ent.armor == 0)
|
||||
c5 = "\nno armor";
|
||||
if (trace_ent.armor == 1)
|
||||
c5 = "\nlightly armored";
|
||||
if (trace_ent.armor == 2)
|
||||
c5 = "\nleather armor";
|
||||
if (trace_ent.armor == 3)
|
||||
c5 = "\nkevlar armor";
|
||||
if (trace_ent.armor == 4)
|
||||
c5 = "\nmetal armor";
|
||||
if (trace_ent.armor == 5)
|
||||
c5 = "\ncombat armor";
|
||||
if (trace_ent.armor == 6)
|
||||
c5 = "\nbrotherhood armor";
|
||||
if (trace_ent.armor == 7)
|
||||
c5 = "\nforce armor";
|
||||
if (trace_ent.armor == 8)
|
||||
c5 = "\nmetal armor mkii";
|
||||
|
||||
centerprint7 (self, trace_ent.netname, "\n", c1, c2, "\n", c3, c5);
|
||||
}
|
||||
if (trace_ent.classname == "robowolf" && self.currentmenu == "none")
|
||||
{
|
||||
c1 = "robo-fang\n";
|
||||
c2 = "robot construct\nowned by ";
|
||||
c3 = trace_ent.track.netname;
|
||||
if (trace_ent.team == self.team)
|
||||
c5 = "\nfriendly\n";
|
||||
else
|
||||
c5 = "\nhostile\n";
|
||||
|
||||
centerprint7 (self, trace_ent.netname, c1, c2, c3, c5, "", "");
|
||||
}
|
||||
if (trace_ent.classname == "station" && self.currentmenu == "none")
|
||||
{
|
||||
c1 = trace_ent.netname;
|
||||
if (self.armor == 0)
|
||||
c2 = "uncompleted";
|
||||
else if (trace_ent.health >= trace_ent.max_health)
|
||||
c2 = "online";
|
||||
else if (trace_ent.health >= trace_ent.max_health*0.75)
|
||||
c2 = "banged up";
|
||||
else if (trace_ent.health >= trace_ent.max_health*0.50)
|
||||
c2 = "damaged";
|
||||
else
|
||||
c2 = "almost destroyed";
|
||||
|
||||
c3 = trace_ent.track.netname;
|
||||
|
||||
centerprint7 (self, c1, "\nstationary bot", "\n", c2, "\n", "owned by ", c3);
|
||||
}
|
||||
if (trace_ent.classname == "monster" && self.currentmenu == "none")
|
||||
{
|
||||
c1 = "hostile";
|
||||
c2 = "natural armor";
|
||||
if (trace_ent.armor == 1)
|
||||
c2 = "lightly armored";
|
||||
if (trace_ent.armor == 2)
|
||||
c2 = "leather armor";
|
||||
if (trace_ent.armor == 3)
|
||||
c2 = "kevlar armor";
|
||||
if (trace_ent.armor == 4)
|
||||
c2 = "metal armor";
|
||||
if (trace_ent.armor == 5)
|
||||
c2 = "combat armor";
|
||||
if (trace_ent.armor == 6)
|
||||
c2 = "brotherhood armor";
|
||||
if (trace_ent.armor == 7)
|
||||
c2 = "force armor";
|
||||
if (trace_ent.armor == 8)
|
||||
c2 = "metal armor mkii";
|
||||
|
||||
if (trace_ent.weapon == 1)
|
||||
c3 = "rifle";
|
||||
if (trace_ent.weapon == 2)
|
||||
c3 = "pistol";
|
||||
if (trace_ent.weapon == 3)
|
||||
c3 = "shotgun";
|
||||
if (trace_ent.weapon == 4)
|
||||
c3 = "smg";
|
||||
if (trace_ent.weapon >= 5)
|
||||
c3 = "assault rifle";
|
||||
|
||||
centerprint7 (self, trace_ent.netname, "\n", c1, "\n", c2, "\n", c3);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -105,12 +105,13 @@ The damage is coming from inflictor, but get mad at attacker
|
|||
This should be the only function that ever reduces health.
|
||||
============
|
||||
*/
|
||||
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage=
|
||||
|
||||
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
|
||||
{
|
||||
local vector dir;
|
||||
local entity oldself;
|
||||
local float save;
|
||||
local float take;
|
||||
local float take, severity, helm;
|
||||
local string s;
|
||||
local string attackerteam, targteam;
|
||||
|
||||
|
@ -129,6 +130,56 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage=
|
|||
else
|
||||
damage = damage * 4;
|
||||
|
||||
if (attacker.critical == 3)//attacker scored a headshot/critical
|
||||
{
|
||||
if (attacker.critical == 3)
|
||||
{
|
||||
severity = 0 + random()*20;
|
||||
if (attacker.perk == 7)
|
||||
severity = severity + 4;
|
||||
|
||||
if (attacker.class == 3)
|
||||
severity = severity + 2;
|
||||
|
||||
if (severity >= 19)
|
||||
damage = (damage * 5);
|
||||
else if (severity >= 14)
|
||||
damage = (damage * 4);
|
||||
else
|
||||
damage = (damage * 3);
|
||||
|
||||
helm = targ.armortype;
|
||||
if (targ.helmet == 0)
|
||||
{
|
||||
sound (targ, CHAN_BODY, "player/headshot.wav", 1, ATTN_NORM);
|
||||
helm = 0;
|
||||
}
|
||||
if (targ.helmet == AS_STRAIGHT)
|
||||
{
|
||||
sound (targ, CHAN_BODY, "weapons/helmet.wav", 1, ATTN_NORM);
|
||||
helm = 0.30;
|
||||
}
|
||||
if (targ.helmet == AS_SLIDING)
|
||||
{
|
||||
sound (targ, CHAN_BODY, "weapons/helmet.wav", 1, ATTN_NORM);
|
||||
helm = 0.45;
|
||||
}
|
||||
|
||||
damage = (damage - (damage * helm));
|
||||
|
||||
makevectors (targ.v_angle);
|
||||
}
|
||||
}
|
||||
|
||||
if (damage <= 0)
|
||||
{
|
||||
damage = 0;
|
||||
sound (targ, CHAN_BODY, targ.armornoise, 1, ATTN_NORM);
|
||||
}
|
||||
|
||||
if (random()*4<=1)
|
||||
sound (targ, CHAN_BODY, targ.armornoise, 1, ATTN_NORM);
|
||||
|
||||
// save damage based on the target's armor level
|
||||
|
||||
save = ceil(targ.armortype*damage);
|
||||
|
@ -139,7 +190,6 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage=
|
|||
targ.items = targ.items - (targ.items & (IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3));
|
||||
}
|
||||
|
||||
targ.armorvalue = targ.armorvalue - save;
|
||||
take = ceil(damage-save);
|
||||
|
||||
// add to the damage total for clients, which will be sent as a single
|
||||
|
@ -154,7 +204,7 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage=
|
|||
|
||||
damage_inflictor = inflictor;
|
||||
|
||||
|
||||
/*
|
||||
// figure momentum add
|
||||
if ( (inflictor != world) && (targ.movetype == MOVETYPE_WALK) )
|
||||
{
|
||||
|
@ -174,7 +224,7 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage=
|
|||
if ( (rj > 1) & ((attacker.classname == "player") & (targ.classname == "player")) & ( attacker.netname == targ.netname))
|
||||
targ.velocity = targ.velocity + dir * damage * rj;
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
@ -207,6 +257,7 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage=
|
|||
return;
|
||||
|
||||
// do the damage
|
||||
take = take - targ.armor;
|
||||
targ.health = targ.health - take;
|
||||
|
||||
if (targ.health <= 0)
|
||||
|
|
|
@ -468,7 +468,7 @@ float fraglimit;
|
|||
float deathmatch;
|
||||
float coop;
|
||||
float rj = 1;
|
||||
|
||||
float no_connect;
|
||||
//================================================
|
||||
|
||||
//
|
||||
|
@ -626,7 +626,12 @@ float red_armor;
|
|||
.float ctimer;
|
||||
.float flash;
|
||||
.float oldteam;
|
||||
.float dead;
|
||||
.float grenadetoggle;
|
||||
.float kills;
|
||||
.float materialize;
|
||||
|
||||
.string armornoise;
|
||||
.string ammotype1;
|
||||
.string ammotype2;
|
||||
.string deathsound;
|
||||
|
@ -796,6 +801,7 @@ void(string s) changelevel = #70;
|
|||
void(string var, string val) cvar_set = #72; // sets cvar.value
|
||||
|
||||
void(entity client, string s) centerprint = #73; // sprint, but in middle
|
||||
void (entity client, string x1, string x2, string x3, string x4, string x5, string x6, string x7) centerprint7 = #73;
|
||||
|
||||
void(vector pos, string samp, float vol, float atten) ambientsound = #74;
|
||||
|
||||
|
|
|
@ -237,7 +237,7 @@ void () door_touch =
|
|||
{
|
||||
if (self.size_y <= 128 && self.size_x <= 128)
|
||||
{
|
||||
if (other.class == 6)
|
||||
if (other.class == 4)
|
||||
{
|
||||
SpawnOpenDoor(self, other);
|
||||
return;
|
||||
|
|
|
@ -427,12 +427,14 @@ void() armor_touch =
|
|||
|
||||
void() item_armor1 =
|
||||
{
|
||||
self.touch = armor_touch;
|
||||
precache_model ("progs/armor.mdl");
|
||||
setmodel (self, "progs/armor.mdl");
|
||||
self.touch = SUB_Null;
|
||||
self.solid = SOLID_BBOX;
|
||||
precache_model ("progs/enforcer.mdl");
|
||||
setmodel (self, "progs/enforcer.mdl");
|
||||
self.skin = 0;
|
||||
setsize (self, '-16 -16 0', '16 16 56');
|
||||
StartItem ();
|
||||
setsize (self, '-16 -16 -24', '16 16 32');
|
||||
setorigin(self, self.origin + '0 0 24');
|
||||
self.classname = "merchant";
|
||||
};
|
||||
|
||||
/*QUAKED item_armor2 (0 .5 .8) (-16 -16 0) (16 16 32)
|
||||
|
|
|
@ -262,6 +262,7 @@ void() monster_knight =
|
|||
self.th_melee = knight_atk1;
|
||||
self.th_pain = knight_pain;
|
||||
self.th_die = knight_die;
|
||||
|
||||
self.armornoise = "weapons/ric1.wav";
|
||||
|
||||
walkmonster_start ();
|
||||
};
|
||||
|
|
|
@ -175,5 +175,5 @@ string () de_dust =
|
|||
|
||||
string () EquipmentString =
|
||||
{
|
||||
return ("+ special equipment +\npress your c key to activate!\n\n<EFBFBD>1‘ stealth boy <20>20c‘\n<EFBFBD>2‘ displacer cloak <20>20c‘\n<EFBFBD>3‘ security alarm <20>20c‘\n<EFBFBD>4‘ motion sensor <20>20c‘\n<EFBFBD>5‘ extra magazines <20>20c‘\n<EFBFBD>6‘ electronic tools mark ii <20>30c‘\n<EFBFBD>7‘ climbing gear <20>30c‘\n<EFBFBD>8‘ remote camera <20>40c‘\n<EFBFBD>9‘ enhanced battery <20>50c‘\n<EFBFBD>0‘ laser defense field <20>50c‘\n");
|
||||
return ("+ special equipment +\npress your c key to activate!\n\n<EFBFBD>1‘ medic's bag <20>15c‘\n<EFBFBD>2‘ security alarm <20>15c‘\n<EFBFBD>3‘ remote camera <20>15c‘\n<EFBFBD>4‘ belt pouch <20>15c‘\n<EFBFBD>5‘ backpack <20>15c‘\n<EFBFBD>6‘ toolkit mark ii <20>15c‘\n<EFBFBD>7‘ climbing gear <20>15c‘\n<EFBFBD>8‘ enhanced battery <20>15c‘\n<EFBFBD>9‘ stealth boy <20>45c‘\n\n");
|
||||
};
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -880,6 +880,7 @@ void () monster_ogre =
|
|||
self.health = 280;
|
||||
self.team = 3;
|
||||
self.armorvalue = 0;
|
||||
self.armornoise = "misc/thud.wav";
|
||||
self.th_stand = ogre_stand1;
|
||||
self.th_walk = ogre_walk1;
|
||||
self.th_run = ogre_run1;
|
||||
|
|
|
@ -18,32 +18,68 @@ void () Footstep =
|
|||
local float r;
|
||||
|
||||
rand = random ();
|
||||
|
||||
if (self.sneak != 0)
|
||||
return;
|
||||
|
||||
if (self.perk == 5)
|
||||
r = 0.4;
|
||||
else
|
||||
r = 0.8;
|
||||
if ((rand < 0.25))
|
||||
sound (self, CHAN_ITEM, "player/step1.wav", r, ATTN_NORM);
|
||||
r = 0.5;
|
||||
else
|
||||
{
|
||||
if ((rand < 0.5))
|
||||
{
|
||||
r = 1;
|
||||
if (random()*4<=1)
|
||||
self.show_hostile = time + 0.1;
|
||||
}
|
||||
|
||||
if (world.worldtype == 1 || world.worldtype == 2)
|
||||
{
|
||||
if ((rand < 0.25))
|
||||
sound (self, CHAN_ITEM, "player/step1.wav", r, ATTN_NORM);
|
||||
else if ((rand < 0.5))
|
||||
sound (self, CHAN_ITEM, "player/step2.wav", r, ATTN_NORM);
|
||||
}
|
||||
else if ((rand < 0.75))
|
||||
sound (self, CHAN_ITEM, "player/step3.wav", r, ATTN_NORM);
|
||||
else
|
||||
{
|
||||
if ((rand < 0.75))
|
||||
{
|
||||
sound (self, CHAN_ITEM, "player/step3.wav", r, ATTN_NORM);
|
||||
}
|
||||
else
|
||||
{
|
||||
sound (self, CHAN_ITEM, "player/step4.wav", r, ATTN_NORM);
|
||||
}
|
||||
}
|
||||
sound (self, CHAN_ITEM, "player/step4.wav", r, ATTN_NORM);
|
||||
}
|
||||
if (world.worldtype == 0)
|
||||
{
|
||||
if ((rand < 0.25))
|
||||
sound (self, CHAN_ITEM, "player/step1a.wav", r, ATTN_NORM);
|
||||
else if ((rand < 0.5))
|
||||
sound (self, CHAN_ITEM, "player/step2a.wav", r, ATTN_NORM);
|
||||
else if ((rand < 0.75))
|
||||
sound (self, CHAN_ITEM, "player/step3a.wav", r, ATTN_NORM);
|
||||
else
|
||||
sound (self, CHAN_ITEM, "player/step4a.wav", r, ATTN_NORM);
|
||||
}
|
||||
};
|
||||
|
||||
float (entity guy) holding_melee =
|
||||
{
|
||||
if ((guy.current_slot == WEAPON_SHOTGUN))
|
||||
{
|
||||
if ((guy.slot1 <= TE_WIZSPIKE))
|
||||
{
|
||||
return (TRUE);
|
||||
}
|
||||
if ((guy.slot1 >= WEAPON_BIG))
|
||||
{
|
||||
return (FALSE);
|
||||
}
|
||||
}
|
||||
if ((guy.current_slot == WEAPON_ROCKET))
|
||||
{
|
||||
if ((guy.slot2 <= TE_WIZSPIKE))
|
||||
{
|
||||
return (TRUE);
|
||||
}
|
||||
if ((guy.slot2 >= WEAPON_BIG))
|
||||
{
|
||||
return (FALSE);
|
||||
}
|
||||
}
|
||||
};
|
||||
void () player_crouch;
|
||||
|
||||
void () player_stand1 = [ 149, player_stand1 ]
|
||||
|
@ -51,14 +87,14 @@ void () player_stand1 = [ 149, player_stand1 ]
|
|||
if (self.rtime == 0)
|
||||
self.weaponframe = 0;
|
||||
|
||||
if ((self.position == WEAPON_SHOTGUN))
|
||||
if (self.position == 1)
|
||||
{
|
||||
player_crouch ();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((self.position == WEAPON_SHOTGUN))
|
||||
if (self.position == 2)
|
||||
{
|
||||
player_lay ();
|
||||
return;
|
||||
|
@ -66,13 +102,13 @@ void () player_stand1 = [ 149, player_stand1 ]
|
|||
}
|
||||
if ((self.velocity_x || self.velocity_y))
|
||||
{
|
||||
self.walkframe = 0;
|
||||
self.walkframe = MULTICAST_ALL;
|
||||
player_run ();
|
||||
return;
|
||||
}
|
||||
if ((self.walkframe >= MULTICAST_PVS_R))
|
||||
{
|
||||
self.walkframe = 0;
|
||||
self.walkframe = MULTICAST_ALL;
|
||||
}
|
||||
self.frame = (149 + self.walkframe);
|
||||
self.walkframe = (self.walkframe + WEAPON_SHOTGUN);
|
||||
|
@ -83,39 +119,41 @@ void () player_crouch = [ 45, player_run ]
|
|||
if (self.rtime == 0)
|
||||
self.weaponframe = 0;
|
||||
|
||||
if ((!self.velocity_x && !self.velocity_y))
|
||||
if (!self.velocity_x && !self.velocity_y)
|
||||
{
|
||||
self.frame = 45;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((self.position == WEAPON_SHOTGUN))
|
||||
if (self.position == 2)
|
||||
{
|
||||
player_lay ();
|
||||
return;
|
||||
}
|
||||
}
|
||||
self.frame = (36 + self.walkframe);
|
||||
if (self.walkframe >= TE_TELEPORT)
|
||||
self.walkframe = 0;
|
||||
self.walkframe = (self.walkframe + 1);
|
||||
if ((self.walkframe >= TE_TELEPORT))
|
||||
{
|
||||
self.walkframe = MULTICAST_ALL;
|
||||
}
|
||||
self.walkframe = (self.walkframe + WEAPON_SHOTGUN);
|
||||
};
|
||||
|
||||
void () player_climb = [ 20, player_run ]
|
||||
void () player_climb = [ 23, player_run ]
|
||||
{
|
||||
self.weaponframe = 0;
|
||||
if (((!self.velocity_x && !self.velocity_y) && !self.velocity_z))
|
||||
if (self.velocity == '0 0 0')
|
||||
{
|
||||
self.frame = 25;
|
||||
return;
|
||||
}
|
||||
self.frame = (SVC_TEMPENTITY + self.walkframe);
|
||||
if ((self.walkframe >= TE_LIGHTNINGBLOOD))
|
||||
self.frame = (23 + self.walkframe);
|
||||
if ((self.walkframe >= 10))
|
||||
{
|
||||
self.walkframe = 0;
|
||||
}
|
||||
self.walkframe = (self.walkframe + WEAPON_SHOTGUN);
|
||||
self.walkframe = (self.walkframe + 1);
|
||||
};
|
||||
|
||||
void () player_run = [ 137, player_run ]
|
||||
|
@ -125,7 +163,7 @@ void () player_run = [ 137, player_run ]
|
|||
if (self.rtime == 0)
|
||||
self.weaponframe = 0;
|
||||
|
||||
if (((((self.equipment == 7) && (self.equipment_state == WEAPON_SHOTGUN)) && (self.grab == WEAPON_SHOTGUN)) && !(self.flags & FL_ONGROUND)))
|
||||
if (self.equipment == 7 && self.equipment_state == 1 && self.grab == 1 && !(self.flags & FL_ONGROUND))
|
||||
{
|
||||
player_climb ();
|
||||
return;
|
||||
|
@ -135,42 +173,44 @@ void () player_run = [ 137, player_run ]
|
|||
player_stand1 ();
|
||||
return;
|
||||
}
|
||||
if ((self.position == WEAPON_SHOTGUN))
|
||||
if ((self.position == 1))
|
||||
{
|
||||
player_crouch ();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (self.position == 1)
|
||||
if ((self.position == 2))
|
||||
{
|
||||
player_lay ();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if ((((((self.walkframe == AS_MELEE) && (self.ghost == 0)) && (self.position == 0)) && (self.velocity_z == 0)) && (self.vehicle == 0)))
|
||||
{
|
||||
if (self.walkframe == 1 && self.ghost == 0 && self.position == 0 && self.velocity_z == 0)
|
||||
Footstep ();
|
||||
}
|
||||
if ((((((self.walkframe == 6) && (self.ghost == 0)) && (self.position == 0)) && (self.velocity_z == 0)) && (self.vehicle == 0)))
|
||||
{
|
||||
|
||||
if (self.walkframe == 4 && self.ghost == 0 && self.position == 0 && self.velocity_z == 0)
|
||||
Footstep ();
|
||||
}
|
||||
if ((((((self.walkframe == TE_LIGHTNING3) && (self.ghost == 0)) && (self.position == 0)) && (self.velocity_z == 0)) && (self.vehicle == 0)))
|
||||
{
|
||||
|
||||
if (self.walkframe == 7 && self.ghost == 0 && self.position == 0 && self.velocity_z == 0)
|
||||
Footstep ();
|
||||
}
|
||||
|
||||
self.frame = (137 + self.walkframe);
|
||||
if ((self.walkframe >= TE_LIGHTNING3))
|
||||
{
|
||||
if (self.walkframe >= 9)
|
||||
self.walkframe = 0;
|
||||
}
|
||||
self.walkframe = (self.walkframe + WEAPON_SHOTGUN);
|
||||
|
||||
self.walkframe = (self.walkframe + 1);
|
||||
};
|
||||
|
||||
void () player_reload1 = [ 123, player_reload2 ]
|
||||
{
|
||||
sound (self, CHAN_WEAPON, "weapons/reload.wav", WEAPON_SHOTGUN, ATTN_NORM);
|
||||
if (self.current_slot == 1 && self.slot1 == 26)
|
||||
sound (self, CHAN_WEAPON, "weapons/shell.wav", WEAPON_SHOTGUN, ATTN_NORM);
|
||||
else if (self.current_slot == 2 && self.slot2 == 26)
|
||||
sound (self, CHAN_WEAPON, "weapons/shell.wav", WEAPON_SHOTGUN, ATTN_NORM);
|
||||
else
|
||||
sound (self, CHAN_WEAPON, "misc/greload.wav", WEAPON_SHOTGUN, ATTN_NORM);
|
||||
|
||||
};
|
||||
|
||||
void () player_reload2 = [ 124, player_reload3 ]
|
||||
|
@ -228,7 +268,7 @@ void () player_reload14 = [ 136, player_run ]
|
|||
|
||||
void () player_creload1 = [ 74, player_creload2 ]
|
||||
{
|
||||
sound (self, CHAN_WEAPON, "weapons/reload.wav", WEAPON_SHOTGUN, ATTN_NORM);
|
||||
sound (self, CHAN_WEAPON, "misc/greload.wav", WEAPON_SHOTGUN, ATTN_NORM);
|
||||
};
|
||||
|
||||
void () player_creload2 = [ 75, player_creload3 ]
|
||||
|
@ -432,6 +472,27 @@ void () player_jump9 = [ 48, player_run ]
|
|||
{
|
||||
};
|
||||
|
||||
void () player_single1_left = [ 88, player_single2_left ]
|
||||
{
|
||||
self.weaponframe = 4;
|
||||
muzzleflash ();
|
||||
};
|
||||
|
||||
void () player_single2_left = [ 89, player_run ]
|
||||
{
|
||||
self.weaponframe = 5;
|
||||
};
|
||||
|
||||
void () player_single1s_left = [ 183, player_single2_s ]
|
||||
{
|
||||
self.weaponframe = 4;
|
||||
muzzleflash ();
|
||||
};
|
||||
|
||||
void () player_single2s_left = [ 184, player_run ]
|
||||
{
|
||||
self.weaponframe = 5;
|
||||
};
|
||||
|
||||
void () player_singlea = [ 88, player_run ]
|
||||
{
|
||||
|
@ -516,152 +577,151 @@ void () player_pull5 = [ 157, player_pull6 ]
|
|||
|
||||
void () player_pull6 = [ 156, player_pull7 ]
|
||||
{
|
||||
self.weaponframe = 6;
|
||||
self.weaponframe = TE_LIGHTNING2;
|
||||
sound (self, CHAN_WEAPON, "weapons/gpull.wav", WEAPON_SHOTGUN, ATTN_IDLE);
|
||||
};
|
||||
|
||||
void () player_pull7 = [ 155, player_pull8 ]
|
||||
{
|
||||
self.weaponframe = 7;
|
||||
self.weaponframe = TE_WIZSPIKE;
|
||||
};
|
||||
|
||||
void () player_pull8 = [ 155, player_pull9 ]
|
||||
{
|
||||
self.weaponframe = WEAPON_BIG;
|
||||
self.grenade_hold = WEAPON_SHOTGUN;
|
||||
self.weaponframe = 8;
|
||||
self.grenadetoggle = 1;
|
||||
};
|
||||
|
||||
void () player_pull9 = [ 155, player_pull10 ]
|
||||
{
|
||||
self.weaponframe = TE_LIGHTNING3;
|
||||
self.weaponframe = 9;
|
||||
};
|
||||
|
||||
void () player_pull10 = [ 155, player_pull11 ]
|
||||
{
|
||||
self.weaponframe = TE_LAVASPLASH;
|
||||
self.weaponframe = 10;
|
||||
};
|
||||
|
||||
void () player_pull11 = [ 155, player_run ]
|
||||
{
|
||||
self.weaponframe = TE_TELEPORT;
|
||||
self.weaponframe = 11;
|
||||
};
|
||||
|
||||
void () player_throw1 = [ 155, player_throw2 ]
|
||||
{
|
||||
self.weaponframe = TE_BLOOD;
|
||||
self.weaponframe = 12;
|
||||
if (((random () * WEAPON_BIG) <= WEAPON_SPIKES))
|
||||
{
|
||||
sound (self, CHAN_VOICE, "radio/grenade.wav", 0.7, ATTN_NORM);
|
||||
}
|
||||
else
|
||||
{
|
||||
sound (self, CHAN_VOICE, "radio/lookout.wav", 0.7, ATTN_NORM);
|
||||
}
|
||||
};
|
||||
|
||||
void () player_throw2 = [ 156, player_throw3 ]
|
||||
{
|
||||
self.weaponframe = TE_LIGHTNINGBLOOD;
|
||||
FireHandGrenade ();
|
||||
//FireHandGrenade ();
|
||||
};
|
||||
|
||||
void () player_throw3 = [ 157, player_throw4 ]
|
||||
{
|
||||
self.weaponframe = 14;
|
||||
self.weaponframe = IDLE2A;
|
||||
};
|
||||
|
||||
void () player_throw4 = [ 158, player_throw5 ]
|
||||
{
|
||||
self.weaponframe = 15;
|
||||
self.weaponframe = IDLE3A;
|
||||
};
|
||||
|
||||
void () player_throw5 = [ 157, player_throw6 ]
|
||||
{
|
||||
self.weaponframe = 16;
|
||||
self.weaponframe = EF_FLAG1;
|
||||
};
|
||||
|
||||
void () player_throw6 = [ 156, player_throw7 ]
|
||||
{
|
||||
self.weaponframe = 17;
|
||||
self.weaponframe = IDLE5A;
|
||||
};
|
||||
|
||||
void () player_throw7 = [ 155, player_throw8 ]
|
||||
{
|
||||
self.weaponframe = 18;
|
||||
self.weaponframe = IDLE6A;
|
||||
if (self.handgrenade <= 0)
|
||||
stuffcmd (self, "impulse 1\n");
|
||||
else
|
||||
stuffcmd (self, "impulse 3\n");
|
||||
|
||||
};
|
||||
|
||||
void () player_throw8 = [ 159, player_throw9 ]
|
||||
{
|
||||
self.weaponframe = 19;
|
||||
self.weaponframe = IDLE7A;
|
||||
};
|
||||
|
||||
void () player_throw9 = [ 160, player_throw10 ]
|
||||
{
|
||||
self.weaponframe = 20;
|
||||
self.weaponframe = IDLE8A;
|
||||
};
|
||||
|
||||
void () player_throw10 = [ 161, player_throw11 ]
|
||||
{
|
||||
self.weaponframe = 21;
|
||||
self.weaponframe = IDLE9A;
|
||||
};
|
||||
|
||||
void () player_throw11 = [ 162, player_run ]
|
||||
{
|
||||
self.weaponframe = 22;
|
||||
self.weaponframe = IDLE10A;
|
||||
};
|
||||
|
||||
void () player_shotty1b = [ 183, player_shotty2b ]
|
||||
{
|
||||
self.weaponframe = 1;
|
||||
self.weaponframe = WEAPON_SHOTGUN;
|
||||
};
|
||||
|
||||
void () player_shotty2b = [ 183, player_shotty3b ]
|
||||
{
|
||||
self.weaponframe = 2;
|
||||
self.weaponframe = WEAPON_ROCKET;
|
||||
};
|
||||
|
||||
void () player_shotty3b = [ 184, player_shotty4b ]
|
||||
{
|
||||
self.weaponframe = 3;
|
||||
self.weaponframe = AS_MELEE;
|
||||
};
|
||||
|
||||
void () player_shotty4b = [ 184, player_run ]
|
||||
{
|
||||
self.weaponframe = 4;
|
||||
self.weaponframe = WEAPON_ROCKET;
|
||||
};
|
||||
|
||||
void () player_knife1 = [ 155, player_knife2 ]
|
||||
{
|
||||
self.weaponframe = 1;
|
||||
self.weaponframe = WEAPON_SHOTGUN;
|
||||
};
|
||||
|
||||
void () player_knife2 = [ 156, player_knife3 ]
|
||||
{
|
||||
self.weaponframe = 2;
|
||||
self.weaponframe = WEAPON_ROCKET;
|
||||
FireMelee ();
|
||||
};
|
||||
|
||||
void () player_knife3 = [ 157, player_run ]
|
||||
{
|
||||
self.weaponframe = 3;
|
||||
self.weaponframe = AS_MELEE;
|
||||
};
|
||||
|
||||
void () player_knifea = [ 155, player_knifeb ]
|
||||
{
|
||||
self.weaponframe = 4;
|
||||
self.weaponframe = WEAPON_SPIKES;
|
||||
};
|
||||
|
||||
void () player_knifeb = [ 156, player_knifec ]
|
||||
{
|
||||
self.weaponframe = 5;
|
||||
self.weaponframe = MULTICAST_PVS_R;
|
||||
FireMelee ();
|
||||
};
|
||||
|
||||
void () player_knifec = [ 157, player_run ]
|
||||
{
|
||||
self.weaponframe = 6;
|
||||
self.weaponframe = TE_LIGHTNING2;
|
||||
};
|
||||
|
||||
void () player_nail1 = [ 88, player_nail2 ]
|
||||
|
@ -743,7 +803,7 @@ void () player_auto4 = [ 89, player_auto3 ]
|
|||
player_run ();
|
||||
return;
|
||||
}
|
||||
self.weaponframe = 0;
|
||||
self.weaponframe = MULTICAST_ALL;
|
||||
};
|
||||
void (float num_bubbles) DeathBubbles;
|
||||
|
||||
|
@ -751,9 +811,18 @@ void () PainSound =
|
|||
{
|
||||
local float rs;
|
||||
|
||||
if (self.health <= 0)
|
||||
if ((self.equipment == 8))
|
||||
return;
|
||||
|
||||
if ((self.health <= 0))
|
||||
return;
|
||||
|
||||
if (self.air_finished < time)
|
||||
{
|
||||
sound (self, CHAN_VOICE, "player/drown2.wav", 1, ATTN_NORM);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((damage_attacker.classname == "teledeath"))
|
||||
{
|
||||
sound (self, CHAN_VOICE, "player/teledth1.wav", WEAPON_SHOTGUN, ATTN_NONE);
|
||||
|
@ -768,30 +837,22 @@ void () PainSound =
|
|||
if ((self.watertype == CONTENT_SLIME))
|
||||
{
|
||||
if ((random () > 0.5))
|
||||
{
|
||||
sound (self, CHAN_VOICE, "player/slimbrn2.wav", WEAPON_SHOTGUN, ATTN_NORM);
|
||||
}
|
||||
else
|
||||
{
|
||||
sound (self, CHAN_VOICE, "player/lburn2.wav", WEAPON_SHOTGUN, ATTN_NORM);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ((self.watertype == CONTENT_LAVA))
|
||||
{
|
||||
if ((random () > 0.5))
|
||||
{
|
||||
sound (self, CHAN_VOICE, "player/lburn1.wav", WEAPON_SHOTGUN, ATTN_NORM);
|
||||
}
|
||||
else
|
||||
{
|
||||
sound (self, CHAN_VOICE, "player/lburn2.wav", WEAPON_SHOTGUN, ATTN_NORM);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ((self.pain_finished > time))
|
||||
{
|
||||
self.axhitme = 0;
|
||||
self.axhitme = MULTICAST_ALL;
|
||||
return;
|
||||
}
|
||||
self.pain_finished = (time + 1.5);
|
||||
|
@ -832,26 +893,27 @@ void () player_pain6 = [ 19, player_run ]
|
|||
|
||||
void () player_pain =
|
||||
{
|
||||
if (self.pain_finished > time)
|
||||
{
|
||||
sound (self, CHAN_VOICE, self.armornoise, 1, ATTN_NORM);
|
||||
return;
|
||||
}
|
||||
|
||||
self.pain_finished = time + 0.5;
|
||||
|
||||
if (self.weaponframe)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (((random () * WEAPON_BIG) < WEAPON_SPIKES))
|
||||
{
|
||||
|
||||
if (random () * WEAPON_BIG < WEAPON_SPIKES)
|
||||
sound (self, CHAN_VOICE, "player/paina.wav", WEAPON_SHOTGUN, ATTN_NORM);
|
||||
}
|
||||
else
|
||||
{
|
||||
sound (self, CHAN_VOICE, "player/painb.wav", WEAPON_SHOTGUN, ATTN_NORM);
|
||||
}
|
||||
if (((random () * WEAPON_BIG) < 6))
|
||||
{
|
||||
if (random () * WEAPON_BIG < TE_LIGHTNING2)
|
||||
sound (self, CHAN_BODY, "player/hit1.wav", WEAPON_SHOTGUN, ATTN_NORM);
|
||||
}
|
||||
if ((self.invisible_finished > time))
|
||||
{
|
||||
if (self.invisible_finished > time)
|
||||
return;
|
||||
}
|
||||
|
||||
self.maxspeed = (self.maxspeed * 0.6);
|
||||
player_pain1 ();
|
||||
};
|
||||
void () player_dieb1;
|
||||
|
@ -874,12 +936,12 @@ void () DeathBubblesSpawn =
|
|||
bubble.nextthink = (time + 0.5);
|
||||
bubble.think = bubble_bob;
|
||||
bubble.classname = "bubble";
|
||||
bubble.frame = 0;
|
||||
bubble.cnt = 0;
|
||||
bubble.frame = MULTICAST_ALL;
|
||||
bubble.cnt = MULTICAST_ALL;
|
||||
setsize (bubble, '-8 -8 -8', '8 8 8');
|
||||
self.nextthink = (time + 0.1);
|
||||
self.think = DeathBubblesSpawn;
|
||||
self.air_finished = (self.air_finished + WEAPON_SHOTGUN);
|
||||
self.air_finished = (self.air_finished + 1);
|
||||
if ((self.air_finished >= self.bubble_count))
|
||||
{
|
||||
remove (self);
|
||||
|
@ -896,7 +958,7 @@ void (float num_bubbles) DeathBubbles =
|
|||
bubble_spawner.solid = SOLID_NOT;
|
||||
bubble_spawner.nextthink = (time + 0.1);
|
||||
bubble_spawner.think = DeathBubblesSpawn;
|
||||
bubble_spawner.air_finished = 0;
|
||||
bubble_spawner.air_finished = MULTICAST_ALL;
|
||||
bubble_spawner.owner = self;
|
||||
bubble_spawner.bubble_count = num_bubbles;
|
||||
return;
|
||||
|
@ -907,6 +969,10 @@ void () DeathSound =
|
|||
local float rs;
|
||||
local float r;
|
||||
|
||||
if ((self.equipment == 8))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ((self.waterlevel == AS_MELEE))
|
||||
{
|
||||
sound (self, CHAN_VOICE, "player/drown2.wav", WEAPON_SHOTGUN, ATTN_NONE);
|
||||
|
@ -914,59 +980,14 @@ void () DeathSound =
|
|||
}
|
||||
r = random ();
|
||||
self.noise = "player/agdie4.wav";
|
||||
if ((self.deathsound == ""))
|
||||
{
|
||||
if ((r < 0.3))
|
||||
{
|
||||
self.noise = "player/agdie1.wav";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((r < 0.6))
|
||||
{
|
||||
self.noise = "player/agdie3.wav";
|
||||
}
|
||||
else
|
||||
{
|
||||
self.noise = "player/agdie4.wav";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((self.deathsound == ""))
|
||||
{
|
||||
if ((r < 0.5))
|
||||
{
|
||||
self.noise = "player/teledth1.wav";
|
||||
}
|
||||
else
|
||||
{
|
||||
self.noise = "player/agdie4.wav";
|
||||
}
|
||||
}
|
||||
if ((self.deathsound ==""))
|
||||
{
|
||||
if ((r < 0.3))
|
||||
{
|
||||
self.noise = "player/udeath.wav";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((r < 0.6))
|
||||
{
|
||||
self.noise = "player/agdie3.wav";
|
||||
}
|
||||
else
|
||||
{
|
||||
self.noise = "player/gib1.wav";
|
||||
}
|
||||
}
|
||||
}
|
||||
sound (self, CHAN_VOICE, self.noise, 0.9, ATTN_NORM);
|
||||
return;
|
||||
};
|
||||
|
||||
void () PlayerDead =
|
||||
{
|
||||
setmodel(self, "progs/dead.mdl");
|
||||
setsize(self, '-16 -16 -24', '16 16 0');
|
||||
self.nextthink = CONTENT_EMPTY;
|
||||
self.deadflag = DEAD_DEAD;
|
||||
};
|
||||
|
@ -1068,8 +1089,8 @@ void () SmokeBob2 =
|
|||
{
|
||||
remove (self);
|
||||
}
|
||||
rnd1 = (self.velocity_x + (-10 + (random () * 20)));
|
||||
rnd2 = (self.velocity_y + (-10 + (random () * 20)));
|
||||
rnd1 = (self.velocity_x + (-10 + (random () * IDLE8A)));
|
||||
rnd2 = (self.velocity_y + (-10 + (random () * IDLE8A)));
|
||||
rnd3 = ((self.velocity_z + TE_LAVASPLASH) + (random () * TE_LAVASPLASH));
|
||||
if ((rnd1 > MULTICAST_PVS_R))
|
||||
{
|
||||
|
@ -1089,11 +1110,11 @@ void () SmokeBob2 =
|
|||
}
|
||||
if ((rnd3 < TE_LAVASPLASH))
|
||||
{
|
||||
rnd3 = 15;
|
||||
rnd3 = IDLE3A;
|
||||
}
|
||||
if ((rnd3 > SVC_INTERMISSION))
|
||||
{
|
||||
rnd3 = 25;
|
||||
rnd3 = DRAW3;
|
||||
}
|
||||
self.velocity_x = rnd1;
|
||||
self.velocity_y = rnd2;
|
||||
|
@ -1105,15 +1126,11 @@ void () SmokeBob2 =
|
|||
void (string gibname, float dm) ThrowPlayerHead =
|
||||
{
|
||||
setmodel (self, gibname);
|
||||
self.frame = 0;
|
||||
if ((self.team == WEAPON_ROCKET))
|
||||
{
|
||||
self.frame = MULTICAST_ALL;
|
||||
if (self.team == 1)
|
||||
self.skin = 0;
|
||||
}
|
||||
if ((self.team == WEAPON_SHOTGUN))
|
||||
{
|
||||
self.skin = WEAPON_SHOTGUN;
|
||||
}
|
||||
if (self.team == 2)
|
||||
self.skin = 1;
|
||||
self.nextthink = (time + WEAPON_SHOTGUN);
|
||||
self.think = SUB_Null;
|
||||
self.movetype = MOVETYPE_BOUNCE;
|
||||
|
@ -1121,7 +1138,7 @@ void (string gibname, float dm) ThrowPlayerHead =
|
|||
self.view_ofs = '0 0 8';
|
||||
setsize (self, '-8 -8 -8', '8 8 8');
|
||||
self.velocity = VelocityForDamage (dm);
|
||||
self.origin_z = (self.origin_z + 24);
|
||||
self.origin_z = (self.origin_z + DRAW2);
|
||||
self.flags = (self.flags - (self.flags & FL_ONGROUND));
|
||||
self.avelocity = (crandom () * '0 600 0');
|
||||
};
|
||||
|
@ -1146,79 +1163,27 @@ void () PlayerDie =
|
|||
local float i;
|
||||
local float r;
|
||||
|
||||
self.solid = 0;
|
||||
|
||||
//self.solid = SOLID_NOT;
|
||||
self.dead = self.dead + 1;
|
||||
if ((self.deathtype == "fall"))
|
||||
{
|
||||
sound (self, CHAN_VOICE, "player/agdie4.wav", WEAPON_SHOTGUN, ATTN_NONE);
|
||||
self.deathsound = "";
|
||||
self.deathtype = "";
|
||||
}
|
||||
if ((self.waterlevel == AS_MELEE))
|
||||
{
|
||||
DeathBubbles (20);
|
||||
DeathBubbles (IDLE8A);
|
||||
sound (self, CHAN_VOICE, "player/drown2.wav", WEAPON_SHOTGUN, ATTN_NONE);
|
||||
self.deathsound = "";
|
||||
}
|
||||
r = random ();
|
||||
self.noise = "player/agdie2.wav";
|
||||
if ((self.deathsound == ""))
|
||||
{
|
||||
if ((r < 0.3))
|
||||
{
|
||||
self.noise = "player/agdie1.wav";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((r < 0.6))
|
||||
{
|
||||
self.noise = "player/agdie3.wav";
|
||||
}
|
||||
else
|
||||
{
|
||||
self.noise = "player/agdie4.wav";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((self.deathsound == ""))
|
||||
{
|
||||
if ((r < 0.5))
|
||||
{
|
||||
self.noise = "player/teledth1.wav";
|
||||
}
|
||||
else
|
||||
{
|
||||
self.noise = "player/agdie4.wav";
|
||||
}
|
||||
}
|
||||
if ((self.deathsound == ""))
|
||||
{
|
||||
if ((r < 0.3))
|
||||
{
|
||||
self.noise = "player/udeath.wav";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((r < 0.6))
|
||||
{
|
||||
self.noise = "player/agdie3.wav";
|
||||
}
|
||||
else
|
||||
{
|
||||
self.noise = "player/teledth1.wav";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((self.deathsound == ""))
|
||||
{
|
||||
self.noise = "player/vaporized.wav";
|
||||
}
|
||||
sound (self, CHAN_VOICE, self.noise, WEAPON_SHOTGUN, ATTN_NORM);
|
||||
|
||||
sound (self, CHAN_VOICE, self.noise, 1, ATTN_NORM);
|
||||
self.items = (self.items - (self.items & IT_INVISIBILITY));
|
||||
self.invisible_finished = 0;
|
||||
self.invincible_finished = 0;
|
||||
self.super_damage_finished = 0;
|
||||
self.radsuit_finished = 0;
|
||||
self.invisible_finished = MULTICAST_ALL;
|
||||
self.invincible_finished = MULTICAST_ALL;
|
||||
self.super_damage_finished = MULTICAST_ALL;
|
||||
self.radsuit_finished = MULTICAST_ALL;
|
||||
self.modelindex = modelindex_player;
|
||||
self.weaponmodel = "";
|
||||
self.view_ofs = '0 0 -8';
|
||||
|
@ -1233,21 +1198,15 @@ void () PlayerDie =
|
|||
self.angles_y = 0;
|
||||
self.angles_z = 0;
|
||||
i = (WEAPON_SHOTGUN + floor ((random () * WEAPON_ROCKET)));
|
||||
self.angles_z = 0;
|
||||
if (((self.position == WEAPON_SHOTGUN) || (self.position == WEAPON_SHOTGUN)))
|
||||
{
|
||||
self.angles_z = MULTICAST_ALL;
|
||||
if (self.position == 1 || self.position == 2)
|
||||
player_diec1 ();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((self.health <= -40))
|
||||
{
|
||||
if (self.health <= -40)
|
||||
player_dieb1 ();
|
||||
}
|
||||
else
|
||||
{
|
||||
player_diea1 ();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
../qwprogs.dat
|
||||
../quake/turn/qwprogs.dat
|
||||
|
||||
defs.qc
|
||||
subs.qc
|
||||
|
@ -7,6 +7,7 @@ fight.qc
|
|||
ai.qc
|
||||
combat.qc
|
||||
items.qc
|
||||
name.qc
|
||||
menus.qc
|
||||
weapons.qc
|
||||
world.qc
|
||||
|
@ -29,4 +30,4 @@ wizard.qc
|
|||
dog.qc
|
||||
ogre.qc
|
||||
misc.qc
|
||||
modbuy.qc
|
||||
mod_buy.qc
|
||||
|
|
|
@ -1340,6 +1340,7 @@ void () monster_army =
|
|||
self.th_pain = enf_pain;
|
||||
self.th_die = enf_die;
|
||||
self.th_missile = enf_atk1;
|
||||
self.armornoise = "misc/thud.wav";
|
||||
|
||||
walkmonster_start();
|
||||
if (random()*4 <= 2)
|
||||
|
@ -1375,6 +1376,7 @@ void () monster_army =
|
|||
self.team = 3;
|
||||
self.armor = 2;
|
||||
self.armortype = 0.2;
|
||||
self.armornoise = "misc/thud.wav";
|
||||
self.th_stand = army_stand1;
|
||||
self.th_walk = army_walk1;
|
||||
self.th_run = army_run1;
|
||||
|
|
|
@ -410,7 +410,11 @@ local vector org;
|
|||
|
||||
spawn_tfog (org);
|
||||
spawn_tdeath(t.origin, other);
|
||||
|
||||
if (self.classname == "player")
|
||||
{
|
||||
self.solid = SOLID_NOT;
|
||||
self.materialize = 200;
|
||||
}
|
||||
// move the player and lock him down for a little while
|
||||
if (!other.health)
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -398,6 +398,7 @@ void() monster_wizard =
|
|||
self.th_missile = Wiz_Missile;
|
||||
self.th_pain = Wiz_Pain;
|
||||
self.th_die = wiz_die;
|
||||
|
||||
self.armornoise = "misc/thud.wav";
|
||||
|
||||
flymonster_start ();
|
||||
};
|
||||
|
|
|
@ -387,17 +387,113 @@ void() worldspawn =
|
|||
precache_model ("progs/v_fist.mdl");
|
||||
precache_model ("progs/v_knife.mdl");
|
||||
precache_model ("progs/v_1911.mdl");
|
||||
precache_model ("progs/v_mp5.mdl");
|
||||
precache_model ("progs/v_ak47.mdl");
|
||||
precache_model ("progs/v_mp7.mdl");
|
||||
precache_model ("progs/v_rangem.mdl");
|
||||
precache_model ("progs/v_pipe.mdl");
|
||||
precache_model ("progs/v_shotgun.mdl");
|
||||
precache_model ("progs/v_double.mdl");
|
||||
precache_model ("progs/v_mp9.mdl");
|
||||
precache_model ("progs/v_sa80.mdl");
|
||||
precache_model ("progs/v_deagle.mdl");
|
||||
precache_model ("progs/v_alien.mdl");
|
||||
precache_model ("progs/v_srifle.mdl");
|
||||
precache_model ("progs/v_night.mdl");
|
||||
precache_model ("progs/sneak.mdl");
|
||||
precache_model ("progs/dead.mdl");
|
||||
precache_model ("progs/hbar.spr");
|
||||
|
||||
precache_model ("progs/w_knife.mdl");
|
||||
precache_model ("progs/w_pipe.mdl");
|
||||
precache_model ("progs/w_shotgun.mdl");
|
||||
precache_model ("progs/w_axe.mdl");
|
||||
precache_model ("progs/w_1911.mdl");
|
||||
precache_model ("progs/w_deagle.mdl");
|
||||
precache_model ("progs/w_alien.mdl");
|
||||
precache_model ("progs/w_mp7.mdl");
|
||||
precache_model ("progs/w_mp9.mdl");
|
||||
precache_model ("progs/w_jackhammer.mdl");
|
||||
precache_model ("progs/w_rangem.mdl");
|
||||
precache_model ("progs/w_sa80.mdl");
|
||||
precache_model ("progs/w_ak47.mdl");
|
||||
precache_model ("progs/w_night.mdl");
|
||||
precache_model ("progs/w_srifle.mdl");
|
||||
precache_model ("progs/w_gauss.mdl");
|
||||
precache_model ("progs/w_carbine.mdl");
|
||||
precache_model ("progs/w_laser.mdl");
|
||||
|
||||
|
||||
precache_sound ("player/step1.wav");
|
||||
precache_sound ("player/step2.wav");
|
||||
precache_sound ("player/step3.wav");
|
||||
precache_sound ("player/step4.wav");
|
||||
precache_sound ("player/step1a.wav");
|
||||
precache_sound ("player/step2a.wav");
|
||||
precache_sound ("player/step3a.wav");
|
||||
precache_sound ("player/step4a.wav");
|
||||
precache_sound ("dog/dattack1.wav");
|
||||
precache_sound ("dog/ddeath.wav");
|
||||
precache_sound ("dog/dpain1.wav");
|
||||
precache_sound ("dog/dsight.wav");
|
||||
precache_sound ("dog/idle.wav");
|
||||
precache_sound ("weapons/1911.wav");
|
||||
precache_sound ("weapons/auto.wav");
|
||||
precache_sound ("weapons/auto2.wav");
|
||||
precache_sound ("weapons/ak112.wav");
|
||||
precache_sound ("weapons/ak47.wav");
|
||||
precache_sound ("weapons/reload.wav");
|
||||
precache_sound ("weapons/amr.wav");
|
||||
precache_sound ("weapons/blaster.wav");
|
||||
precache_sound ("weapons/blaster2.wav");
|
||||
precache_sound ("weapons/blowoff.wav");
|
||||
precache_sound ("weapons/bounce.wav");
|
||||
precache_sound ("weapons/burst.wav");
|
||||
precache_sound ("weapons/caws.wav");
|
||||
precache_sound ("weapons/click.wav");
|
||||
|
||||
precache_sound ("weapons/deagle.wav");
|
||||
precache_sound ("weapons/dks-1.wav");
|
||||
precache_sound ("weapons/energy1.wav");
|
||||
precache_sound ("weapons/energy2.wav");
|
||||
precache_sound ("weapons/energy3.wav");
|
||||
precache_sound ("weapons/energy4.wav");
|
||||
precache_sound ("weapons/flamer.wav");
|
||||
precache_sound ("weapons/fnfal.wav");
|
||||
precache_sound ("weapons/g11.wav");
|
||||
precache_sound ("weapons/gauss.wav");
|
||||
precache_sound ("weapons/gl-1.wav");
|
||||
precache_sound ("weapons/gpull.wav");
|
||||
precache_sound ("weapons/helmet.wav");
|
||||
precache_sound ("weapons/jackhammer.wav");
|
||||
precache_sound ("weapons/laser.wav");
|
||||
precache_sound ("weapons/m249.wav");
|
||||
precache_sound ("weapons/m4-nw.wav");
|
||||
precache_sound ("weapons/needler.wav");
|
||||
precache_sound ("weapons/shotgun1.wav");
|
||||
precache_sound ("weapons/shotgun2.wav");
|
||||
precache_sound ("weapons/mp5.wav");
|
||||
precache_sound ("weapons/mp7.wav");
|
||||
precache_sound ("weapons/rangem.wav");
|
||||
precache_sound ("weapons/ric1.wav");
|
||||
precache_sound ("weapons/ric2.wav");
|
||||
precache_sound ("weapons/ric3.wav");
|
||||
precache_sound ("weapons/ric4.wav");
|
||||
precache_sound ("weapons/ric5.wav");
|
||||
precache_sound ("weapons/tink1.wav");
|
||||
precache_sound ("weapons/sa80-1.wav");
|
||||
precache_sound ("weapons/shell.wav");
|
||||
precache_sound ("misc/build1.wav");
|
||||
precache_sound ("misc/build2.wav");
|
||||
precache_sound ("misc/build3.wav");
|
||||
precache_sound ("player/agdie1.wav");
|
||||
precache_sound ("player/agdie2.wav");
|
||||
precache_sound ("player/agdie3.wav");
|
||||
precache_sound ("player/agdie4.wav");
|
||||
precache_sound ("player/agdie5.wav");
|
||||
precache_sound ("player/berserk.wav");
|
||||
precache_sound ("player/breathe.wav");
|
||||
precache_sound ("player/headshot.wav");
|
||||
precache_sound ("player/hit1.wav");
|
||||
precache_sound ("player/paina.wav");
|
||||
precache_sound ("player/painb.wav");
|
||||
precache_model ("progs/bolt.mdl"); // for lightning gun
|
||||
precache_model ("progs/bolt2.mdl"); // for lightning gun
|
||||
precache_model ("progs/bolt3.mdl"); // for boss shock
|
||||
|
|
Loading…
Reference in a new issue