Scientist Hunt: Add skill_scihunt.cfg and make the weapons damage values respect the internal values.

This commit is contained in:
Marco Cawthorne 2020-07-25 00:46:18 +02:00
parent 4427529e51
commit e82cc69671
4 changed files with 37 additions and 8 deletions

View File

@ -0,0 +1,17 @@
exec skill_valve.cfg
set sk_plr_hammer1 "100"
set sk_plr_hammer2 "100"
set sk_plr_hammer3 "100"
set sk_plr_hammeralt1 "200"
set sk_plr_hammeralt2 "200"
set sk_plr_hammeralt3 "200"
set sk_plr_chainsaw1 "10"
set sk_plr_chainsaw2 "10"
set sk_plr_chainsaw3 "10"
set sk_plr_cannon1 "5"
set sk_plr_cannon2 "5"
set sk_plr_cannon3 "5"

View File

@ -138,12 +138,15 @@ void w_cannon_primary(void)
View_SetMuzzleflash(MUZZLE_SMALL);
Weapons_ViewPunchAngle([-5,0,0]);
#else
int dmg;
if (pl.cannon_mag != 2) {
w_cannon_reload();
return;
}
TraceAttack_FireBullets(20, pl.origin + pl.view_ofs, 5, [0.08716,0.04362], WEAPON_CANNON);
dmg = Skill_GetValue("plr_cannon");
TraceAttack_FireBullets(20, pl.origin + pl.view_ofs, dmg, [0.08716,0.04362], WEAPON_CANNON);
pl.cannon_mag -= 2;
Weapons_PlaySound(pl, CHAN_WEAPON, "cannon/fire.wav", 1, ATTN_NORM);
Weapons_UpdateAmmo(pl, pl.cannon_mag, pl.ammo_buckshot, __NULL__);
@ -152,6 +155,7 @@ void w_cannon_primary(void)
pl.w_attack_next = 1.5f;
pl.w_idle_next = 2.5f;
}
void w_cannon_secondary(void)
{
player pl = (player)self;
@ -168,12 +172,14 @@ void w_cannon_secondary(void)
Weapons_ViewPunchAngle([-5,0,0]);
#else
int dmg;
if (!pl.cannon_mag) {
w_cannon_reload();
return;
}
TraceAttack_FireBullets(10, pl.origin + pl.view_ofs, 5, [0.08716,0.04362], WEAPON_CANNON);
dmg = Skill_GetValue("plr_cannon");
TraceAttack_FireBullets(10, pl.origin + pl.view_ofs, dmg, [0.08716,0.04362], WEAPON_CANNON);
pl.cannon_mag--;
Weapons_PlaySound(pl, CHAN_WEAPON, "cannon/fire.wav", 1, ATTN_NORM);
Weapons_UpdateAmmo(pl, pl.cannon_mag, pl.ammo_buckshot, __NULL__);

View File

@ -94,6 +94,7 @@ void w_chainsaw_primary(void)
Weapons_PlaySound(pl, CHAN_WEAPON, "sh/chainsaw_idle2.wav", 1, ATTN_NORM);
pl.w_attack_next = 0.2f;
} else {
int dmg;
FX_Impact(IMPACT_MELEE, trace_endpos, trace_plane_normal);
if (trace_ent.takedamage) {
@ -101,8 +102,8 @@ void w_chainsaw_primary(void)
/* Push the player towards the victim */
pl.velocity = normalize(trace_ent.origin - pl.origin) * 240;
}
Damage_Apply(trace_ent, self, 10, WEAPON_CHAINSAW, DMG_BLUNT);
dmg = Skill_GetValue("plr_chainsaw");
Damage_Apply(trace_ent, self, dmg, WEAPON_CHAINSAW, DMG_BLUNT);
Weapons_PlaySound(pl, CHAN_WEAPON, "sh/chainsaw_cutintoflesh.wav", 1, ATTN_NORM);
} else {
FX_Spark(trace_endpos, trace_plane_normal);

View File

@ -116,6 +116,7 @@ void w_hammer_release(void)
}
#ifdef SERVER
int hdmg;
int hitsound = 0;
vector src = pl.origin + pl.view_ofs;
makevectors(pl.v_angle);
@ -126,11 +127,14 @@ void w_hammer_release(void)
#ifdef SERVER
if (trace_ent.takedamage) {
hitsound = floor(random(1, 4));
/* players only take half damage */
if (trace_ent.classname == "player")
Damage_Apply(trace_ent, self, 50, WEAPON_HAMMER, DMG_BLUNT);
hdmg = Skill_GetValue("plr_hammer") / 2;
else
Damage_Apply(trace_ent, self, 100, WEAPON_HAMMER, DMG_BLUNT);
hdmg = Skill_GetValue("plr_hammer");
Damage_Apply(trace_ent, self, hdmg, WEAPON_HAMMER, DMG_BLUNT);
if (trace_ent.classname == "monster_scientist") {
trace_ent.movetype = MOVETYPE_TOSS;
@ -150,7 +154,8 @@ void w_hammer_release(void)
#ifdef SERVER
if (trace_ent.takedamage) {
hitsound = floor(random(1, 4));
Damage_Apply(trace_ent, self, 200, WEAPON_HAMMER, DMG_BLUNT);
hdmg = Skill_GetValue("plr_hammeralt");
Damage_Apply(trace_ent, self, hdmg, WEAPON_HAMMER, DMG_BLUNT);
} else {
if (trace_fraction < 1.0) {
hitsound = 4;