const int HITTYPE_SPLASH = BITS(1) << 9;
const int HITTYPE_BOUNCE = BITS(1) << 10;
const int HITTYPE_ARMORPIERCE = BITS(1) << 11;
-// unused yet
-const int HITTYPE_RESERVED = BITS(1) << 12;
-const int DEATH_HITTYPEMASK = HITTYPE_SECONDARY | HITTYPE_SPLASH | HITTYPE_BOUNCE | HITTYPE_ARMORPIERCE | HITTYPE_RESERVED;
+const int HITTYPE_SOUND = BITS(1) << 12;
+const int DEATH_HITTYPEMASK = HITTYPE_SECONDARY | HITTYPE_SPLASH | HITTYPE_BOUNCE | HITTYPE_ARMORPIERCE | HITTYPE_SOUND;
// normal deaths begin
const int DT_FIRST = BIT(13);
vector o;
float n = W_Tuba_GetNote(actor, hittype);
- hittype = 0;
+ hittype = HITTYPE_SOUND;
if(actor.(weaponentity).tuba_instrument & 1)
hittype |= HITTYPE_SECONDARY;
if(actor.(weaponentity).tuba_instrument & 2)
if (time < this.spawnshieldtime && autocvar_g_spawnshield_blockdamage < 1)
damage *= 1 - max(0, autocvar_g_spawnshield_blockdamage);
- if(DEATH_ISWEAPON(deathtype, WEP_TUBA))
+ if(deathtype & HITTYPE_SOUND) // sound based attacks cause bleeding from the ears
{
- // tuba causes blood to come out of the ears
vector ear1, ear2;
vector d;
float f;