mirror of
https://github.com/yquake2/xatrix.git
synced 2025-02-23 04:11:28 +00:00
Force an MASK_SHOT
clip mask for thrown heads.
The ThrowHead() and ThrowClientHead() functions are special. They transform the entity given in `self` (mostly the caller itself) into a ripped off head. They don't reset the entities clip mask, which may cause problems in interactions with other entities. Fix that by reseting the clip mask to `MASK_SHOT`. Suggested by @BjossiAlfreds.
This commit is contained in:
parent
dfd2224bbf
commit
f97f46f91d
1 changed files with 8 additions and 0 deletions
|
@ -261,6 +261,10 @@ ThrowHead(edict_t *self, char *gibname, int damage, int type)
|
|||
self->takedamage = DAMAGE_YES;
|
||||
self->die = gib_die;
|
||||
|
||||
// The entity still has the monsters clipmaks.
|
||||
// Reset it to MASK_SHOT to be on the save side.
|
||||
self->clipmask = MASK_SHOT;
|
||||
|
||||
if (type == GIB_ORGANIC)
|
||||
{
|
||||
self->movetype = MOVETYPE_TOSS;
|
||||
|
@ -442,6 +446,10 @@ ThrowClientHead(edict_t *self, int damage)
|
|||
self->s.sound = 0;
|
||||
self->flags |= FL_NO_KNOCKBACK;
|
||||
|
||||
// The entity still has the monsters clipmaks.
|
||||
// Reset it to MASK_SHOT to be on the save side.
|
||||
self->clipmask = MASK_SHOT;
|
||||
|
||||
self->movetype = MOVETYPE_BOUNCE;
|
||||
VelocityForDamage(damage, vd);
|
||||
VectorAdd(self->velocity, vd, self->velocity);
|
||||
|
|
Loading…
Reference in a new issue