Scientist Hunt: Tweak the Hammer to not violate our precious ears
This commit is contained in:
parent
a7c2c04651
commit
bc4bd0580d
1 changed files with 50 additions and 49 deletions
|
@ -108,73 +108,74 @@ void w_hammer_release(void)
|
|||
}
|
||||
|
||||
#ifdef SSQC
|
||||
int hitsound = 0;
|
||||
vector src = pl.origin + pl.view_ofs;
|
||||
makevectors(pl.v_angle);
|
||||
traceline(src, src + v_forward * 64, FALSE, self);
|
||||
int hitsound = 0;
|
||||
vector src = pl.origin + pl.view_ofs;
|
||||
makevectors(pl.v_angle);
|
||||
traceline(src, src + v_forward * 64, FALSE, self);
|
||||
#endif
|
||||
|
||||
if (pl.a_ammo1 == 1) {
|
||||
#ifdef SSQC
|
||||
#ifdef SSQC
|
||||
if (trace_ent.takedamage) {
|
||||
hitsound = floor(random(1, 4));
|
||||
hitsound = floor(random(1, 4));
|
||||
|
||||
if (trace_ent.classname == "player")
|
||||
Damage_Apply(trace_ent, self, 50, trace_endpos, FALSE);
|
||||
else
|
||||
Damage_Apply(trace_ent, self, 100, trace_endpos, FALSE);
|
||||
if (trace_ent.classname == "player")
|
||||
Damage_Apply(trace_ent, self, 50, trace_endpos, FALSE);
|
||||
else
|
||||
Damage_Apply(trace_ent, self, 100, trace_endpos, FALSE);
|
||||
|
||||
if (trace_ent.classname == "monster_scientist") {
|
||||
trace_ent.movetype = MOVETYPE_TOSS;
|
||||
trace_ent.velocity = v_forward * 768 + v_up * 256;
|
||||
} else if (trace_ent.classname == "player") {
|
||||
trace_ent.velocity = v_forward * 768 + v_up * 256;
|
||||
}
|
||||
} else {
|
||||
if (trace_fraction < 1.0) {
|
||||
hitsound = 4;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (trace_ent.classname == "monster_scientist") {
|
||||
trace_ent.movetype = MOVETYPE_TOSS;
|
||||
trace_ent.velocity = v_forward * 768 + v_up * 256;
|
||||
} else if (trace_ent.classname == "player") {
|
||||
trace_ent.velocity = v_forward * 768 + v_up * 256;
|
||||
}
|
||||
} else {
|
||||
if (trace_fraction < 1.0) {
|
||||
hitsound = 4;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Weapons_ViewAnimation(HAMMER_ATTACK1);
|
||||
pl.w_attack_next = 1.0f;
|
||||
} else if (pl.a_ammo1 == 2) {
|
||||
#ifdef SSQC
|
||||
if (trace_ent.takedamage) {
|
||||
hitsound = floor(random(1, 4));
|
||||
Damage_Apply(trace_ent, self, 200, trace_endpos, FALSE);
|
||||
} else {
|
||||
if (trace_fraction < 1.0) {
|
||||
hitsound = 4;
|
||||
}
|
||||
}
|
||||
if (trace_ent.takedamage) {
|
||||
hitsound = floor(random(1, 4));
|
||||
Damage_Apply(trace_ent, self, 200, trace_endpos, FALSE);
|
||||
} else {
|
||||
if (trace_fraction < 1.0) {
|
||||
hitsound = 4;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Weapons_ViewAnimation(HAMMER_ATTACK2);
|
||||
pl.w_attack_next = 0.75f;
|
||||
}
|
||||
|
||||
#ifdef SSQC
|
||||
switch (hitsound) {
|
||||
case 1:
|
||||
Weapons_PlaySound(pl, CHAN_WEAPON, "sh/ham_hitbod1.wav", 1, ATTN_NORM);
|
||||
break;
|
||||
case 2:
|
||||
Weapons_PlaySound(pl, CHAN_WEAPON, "sh/ham_hitbod2.wav", 1, ATTN_NORM);
|
||||
break;
|
||||
case 3:
|
||||
Weapons_PlaySound(pl, CHAN_WEAPON, "sh/ham_hitbod3.wav", 1, ATTN_NORM);
|
||||
break;
|
||||
case 4:
|
||||
Weapons_PlaySound(pl, CHAN_WEAPON, "sh/ham_hitw.wav", 1, ATTN_NORM);
|
||||
break;
|
||||
default:
|
||||
Weapons_PlaySound(pl, CHAN_WEAPON, "sh/ham_swing.wav", 1, ATTN_NORM);
|
||||
}
|
||||
if (pl.a_ammo1 > 0) {
|
||||
string snd = "sh/ham_swing.wav";
|
||||
switch (hitsound) {
|
||||
case 1:
|
||||
snd = "sh/ham_hitbod1.wav";
|
||||
break;
|
||||
case 2:
|
||||
snd = "sh/ham_hitbod2.wav";
|
||||
break;
|
||||
case 3:
|
||||
snd = "sh/ham_hitbod3.wav";
|
||||
break;
|
||||
case 4:
|
||||
snd = "sh/ham_hitw.wav";
|
||||
break;
|
||||
}
|
||||
Weapons_PlaySound(pl, CHAN_WEAPON, snd, 1.0f, ATTN_NORM);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Reset the hack */
|
||||
pl.a_ammo1 = 0;
|
||||
|
||||
/* Reset the hack */
|
||||
pl.a_ammo1 = 0;
|
||||
|
||||
/* Pure cosmetics start here */
|
||||
if (pl.w_idle_next) {
|
||||
|
|
Loading…
Reference in a new issue