Wrench now detects sentries, has commented code in place for other buildings.
Also fixed up the damage code/squibs code, left in a duplicate function when updating, my bad.
This commit is contained in:
parent
7512619a06
commit
25a70fb2d2
1 changed files with 27 additions and 19 deletions
|
@ -119,29 +119,37 @@ w_wrench_primary(player pl)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* don't bother with decals, we got squibs */
|
if (trace_ent.classname == "TFCSentry") {
|
||||||
if (trace_ent.iBleeds) {
|
TFCSentry sentry = (TFCSentry)trace_ent;
|
||||||
FX_Blood(trace_endpos, [1,0,0]);
|
/* todo
|
||||||
|
} else if (trace_ent.classname == "TFCDispenser") {
|
||||||
|
TFCDispenser dispenser = (TFCDispenser)trace_ent;
|
||||||
|
todo
|
||||||
|
} else if (trace_ent.classname == "TFCTeleporter") {
|
||||||
|
TFCTeleporter teleporter = (TFCTeleporter)trace_ent;
|
||||||
|
todo
|
||||||
|
} else if (trace_ent.classname == "TFCTeleporterExit") {
|
||||||
|
TFCTeleporterExit teleporterexit = (TFCTeleporterExit)trace_ent;
|
||||||
|
todo */
|
||||||
} else {
|
} else {
|
||||||
FX_Impact(IMPACT_MELEE, trace_endpos, trace_plane_normal);
|
/* don't bother with decals, we got squibs */
|
||||||
}
|
|
||||||
|
|
||||||
/* don't bother with decals, we got squibs */
|
|
||||||
if (trace_ent.iBleeds) {
|
|
||||||
FX_Blood(trace_endpos, [1,0,0]);
|
|
||||||
} else {
|
|
||||||
FX_Impact(IMPACT_MELEE, trace_endpos, trace_plane_normal);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Damage is between 12 - 20, so let's just do 15 for now */
|
|
||||||
if (trace_ent.takedamage) {
|
|
||||||
Damage_Apply(trace_ent, pl, Skill_GetValue("plr_crowbar", 15), WEAPON_WRENCH, DMG_BLUNT);
|
|
||||||
if (trace_ent.iBleeds) {
|
if (trace_ent.iBleeds) {
|
||||||
Sound_Play(self, CHAN_WEAPON, "weapon_crowbar.hitbody");
|
FX_Blood(trace_endpos, [1,0,0]);
|
||||||
|
} else {
|
||||||
|
FX_Impact(IMPACT_MELEE, trace_endpos, trace_plane_normal);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Damage without armor is between 12 - 20, so let's just do 15 for now */
|
||||||
|
if (trace_ent.takedamage) {
|
||||||
|
Damage_Apply(trace_ent, pl, Skill_GetValue("plr_wrench", 15), WEAPON_WRENCH, DMG_BLUNT);
|
||||||
|
if (trace_ent.iBleeds) {
|
||||||
|
Sound_Play(self, CHAN_WEAPON, "weapon_crowbar.hitbody");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Sound_Play(self, CHAN_WEAPON, "weapon_crowbar.hit");
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Sound_Play(self, CHAN_WEAPON, "weapon_crowbar.hit");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue