*** empty log message ***

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1813 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Magnus 2006-01-07 13:20:43 +00:00
parent 0887be0383
commit a078f6fc97
5 changed files with 33 additions and 29 deletions

View file

@ -386,6 +386,10 @@ float() FindTarget =
if (!visible (client))
return FALSE;
if (client.sneak != 0)//sneaking players are invisible
return FALSE;
if (r == RANGE_NEAR)
{
if (client.show_hostile < time && !infront (client))

View file

@ -138,8 +138,6 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
{
if (attacker.critical == 3)
{
attacker.critical = 0;
severity = 0 + random()*20;
if (attacker.perk == 7)
severity = severity + 4;

View file

@ -72,7 +72,7 @@ void () player_crouch;
void () player_stand1 = [ 149, player_stand1 ]
{
if (self.rtime == 0)
if (self.rtime < time && self.attack == 0)
self.weaponframe = 0;
if (self.position == 1)
@ -103,7 +103,7 @@ void () player_stand1 = [ 149, player_stand1 ]
void () player_crouch = [ 45, player_run ]
{
if (self.rtime == 0)
if (self.rtime < time && self.attack == 0)
self.weaponframe = 0;
if (!self.velocity_x && !self.velocity_y)
@ -145,7 +145,7 @@ void () player_climb = [ 23, player_run ]
void () player_run = [ 137, player_run ]
{
if (self.rtime < time)
if (self.rtime < time && self.attack == 0)
self.weaponframe = 0;
if (self.equipment == 7 && self.equipment_state == 1 && self.grab == 1 && !(self.flags & FL_ONGROUND))

View file

@ -1290,7 +1290,7 @@ void () monster_army =
self.classname = "monster";
self.netname = "enforcer";
setsize (self, '-12 -12 -24', '12 12 32');
setsize (self, '-16 -16 -24', '16 16 32');
self.health = 120;
self.islot3 = SlotVal(IID_ARM_COMBAT, 1);
self.armortype = 35;
@ -1331,7 +1331,7 @@ void () monster_army =
self.netname = "raider";
self.movetype = MOVETYPE_STEP;
setmodel (self, "progs/soldier.mdl");
setsize (self, '-16 -16 -24', '16 16 32');
setsize (self, '-16 -16 -24', '16 16 28');
self.health = 90;
self.team = 3;
self.islot3 = SlotVal(IID_ARM_LEATHER, 1);

View file

@ -2059,6 +2059,8 @@ void (float dam, float rec, string snd, float rng, float rate) FirePistol =
zdif = org_z - trace_ent.origin_z;
ydif = org2_y - trace_ent.origin_y;
xdif = org2_x - trace_ent.origin_x;
is_headshot = 0;
if (((ydif >= CONTENT_SKY) && (ydif <= TE_LIGHTNING2)))
@ -2077,6 +2079,8 @@ void (float dam, float rec, string snd, float rng, float rate) FirePistol =
T_Damage (trace_ent, self, self, dam);
self.critical = 0;
if (trace_ent.solid == SOLID_BSP)
penetrate (org, (dam / 2), (dam / 2));
}
@ -2184,6 +2188,7 @@ void (float dam, float rec, string snd, float rng, float rate) FireSMG =
SpawnWood (trace_ent, org, 1);
T_Damage (trace_ent, self, self, dam);
self.critical = 0;
if (trace_ent.solid == SOLID_BSP)
penetrate (org, (dam / 2), (dam / 2));
@ -2199,9 +2204,9 @@ void (float dam, float rec, string snd, float rng, float rate) FireSMG =
void (float dam, float rec, string snd, float rng, float rate) FireAssaultRifle =
{
local float tmp, zdif, xdif, ydif, is_headshot, z;
local float hs, tmp, zdif, xdif, ydif, is_headshot, z;
local string xd, yd, zd;
local vector dir, source, targ, org, org2, adjust;
local vector dir, source, targ, org, org2, adjust, headshot_check;
sound (self, CHAN_WEAPON, snd, 1, ATTN_NORM);
@ -2271,42 +2276,38 @@ void (float dam, float rec, string snd, float rng, float rate) FireAssaultRifle
return;
org = trace_endpos - v_forward * 2;
headshot_check = trace_endpos + v_forward * (trace_ent.size_x / 2);
if (trace_ent.takedamage)
{
zdif = trace_endpos_z - trace_ent.origin_z;
ydif = trace_endpos_y - trace_ent.origin_y;
xdif = trace_endpos_x - trace_ent.origin_x;
xd = ftos(xdif);
yd = ftos(ydif);
zd = ftos(zdif);
sprint(self, 2, "x: ");
sprint(self, 2, xd);
sprint(self, 2, "y: ");
sprint(self, 2, yd);
sprint(self, 2, "z: ");
sprint(self, 2, zd);
sprint(self, 2, "\n");
is_headshot = 0;
if (ydif >= -6 && ydif <= 6)
hs = headshot_check_x - trace_ent.origin_x;
hs = hs + headshot_check_y - trace_ent.origin_y;
if (hs < 0)
hs = hs * -1;
if (hs <= 4)
is_headshot = 1;
if (xdif >= -6 && xdif <= 6)
is_headshot = 1;
if (self.attack <= 5 && is_headshot == 1 && zdif >= (trace_ent.size_z / 2 * 0.8))
zdif = trace_endpos_z - trace_ent.origin_z;
if (is_headshot == 1 && zdif >= (trace_ent.size_z / 2 * 0.8))
self.critical = 3;
dam = (dam * (1 - trace_fraction));
if (trace_ent.solid != SOLID_BSP && self.critical == 3)
SpawnBlood (org, 1);
else
SpawnBlood (org, 0.5);
if (trace_ent.solid == SOLID_BSP)
SpawnWood (trace_ent, org, 1);
T_Damage (trace_ent, self, self, dam);
self.critical = 0;
if (trace_ent.solid == SOLID_BSP)
penetrate (org, (dam / 2), (dam / 2));
@ -3715,6 +3716,7 @@ void (vector s_aim, float dam, float tmp, float ran) W_FireBuckshotSpread1 =
self.critical = 3;
}
T_Damage (trace_ent, self, self, dam);
self.critical = 0;
}
else
{