text
stringlengths 0
451
|
---|
{ |
Speed *= 1.5; |
} |
} |
Actor GetLastSeg() |
{ |
for (int i = NUMWORMSEGS-1; i >= -1; i--) |
{ |
Actor Seg = self; |
if (i >= 0 && i < NUMWORMSEGS) |
{ |
Seg = SegList[i]; |
} |
if (Seg == null || Seg.Health <= 0) |
{ |
continue; |
} |
return Seg; |
} |
return null; |
} |
override int DamageMobj(Actor inflictor, Actor source, int damage, Name mod, int flags, double angle) |
{ |
let LastSeg = GetLastSeg(); |
if (LastSeg != null && self != LastSeg) |
{ |
LastSeg.DamageMobj(inflictor, source, damage, mod, flags, angle); |
return 0; |
} |
return super.DamageMobj(inflictor, source, damage, mod, flags, angle); |
} |
} |