trigger_teleport: add telefrag.
This commit is contained in:
parent
9847f3828e
commit
a9836563d1
1 changed files with 12 additions and 0 deletions
|
@ -227,6 +227,18 @@ trigger_teleport::Touch(entity eToucher)
|
||||||
endpos[2] -= eToucher.mins[2];
|
endpos[2] -= eToucher.mins[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* test if something is in the way. */
|
||||||
|
tracebox(endpos, eToucher.mins, eToucher.maxs, endpos, MOVE_NORMAL, eToucher);
|
||||||
|
|
||||||
|
/* indeed something is in the way... */
|
||||||
|
if (trace_ent && trace_startsolid == true) {
|
||||||
|
/* it can be killed */
|
||||||
|
if (trace_ent.takedamage != DAMAGE_NO) {
|
||||||
|
/* telefrag */
|
||||||
|
Damage_Apply(trace_ent, eToucher, trace_ent.health * 2.0, 0, DMG_SKIP_ARMOR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setorigin_safe(eToucher, endpos);
|
setorigin_safe(eToucher, endpos);
|
||||||
|
|
||||||
if (m_sndTeleport) {
|
if (m_sndTeleport) {
|
||||||
|
|
Loading…
Reference in a new issue