Source/ThunderBeast/QuakeToon/game/g_weapon.c
void blaster_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
{
	int		mod;

	if (other == self->owner)
		return;

	if (surf && (surf->flags & SURF_SKY))
	{
		G_FreeEdict (self);
		return;
	}

	if (self->owner->client)
		PlayerNoise(self->owner, self->s.origin, PNOISE_IMPACT);

	if (other->takedamage)
	{
		if (self->spawnflags & 1)
			mod = MOD_HYPERBLASTER;
		else
			mod = MOD_BLASTER;
		T_Damage (other, self, self->owner, self->velocity, self->s.origin, plane->normal, self->dmg, 1, DAMAGE_ENERGY, mod);
	}
	else
	{
		gi.WriteByte (svc_temp_entity);
		gi.WriteByte (TE_BLASTER);
		gi.WritePosition (self->s.origin);
		if (!plane)
			gi.WriteDir (vec3_origin);
		else
			gi.WriteDir (plane->normal);
		gi.multicast (self->s.origin, MULTICAST_PVS);
	}

	G_FreeEdict (self);
}
/*
=================
fire_blaster

Fires a single blaster bolt.  Used by the blaster and hyper blaster.
=================
*/
fire_blaster
Fires a single blaster bolt.  Used by the blaster and hyper blaster.
fire_blaster Fires a single blaster bolt . Used by the blaster and hyper blaster .
void blaster_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
{
	int		mod;
	if (other == self->owner)
		return;
	if (surf && (surf->flags & SURF_SKY))
	{
		G_FreeEdict (self);
		return;
	}
	if (self->owner->client)
		PlayerNoise(self->owner, self->s.origin, PNOISE_IMPACT);
	if (other->takedamage)
	{
		if (self->spawnflags & 1)
			mod = MOD_HYPERBLASTER;
		else
			mod = MOD_BLASTER;
		T_Damage (other, self, self->owner, self->velocity, self->s.origin, plane->normal, self->dmg, 1, DAMAGE_ENERGY, mod);
	}
	else
	{
		gi.WriteByte (svc_temp_entity);
		gi.WriteByte (TE_BLASTER);
		gi.WritePosition (self->s.origin);
		if (!plane)
			gi.WriteDir (vec3_origin);
		else
			gi.WriteDir (plane->normal);
		gi.multicast (self->s.origin, MULTICAST_PVS);
	}
	G_FreeEdict (self);
}
void blaster_touch ( edict_t * self , edict_t * other , cplane_t * plane , csurface_t * surf ) { int mod ; if ( other == self -> owner ) return ; if ( surf && ( surf -> flags & SURF_SKY ) ) { G_FreeEdict ( self ) ; return ; } if ( self -> owner -> client ) PlayerNoise ( self -> owner , self -> s . origin , PNOISE_IMPACT ) ; if ( other -> takedamage ) { if ( self -> spawnflags & 1 ) mod = MOD_HYPERBLASTER ; else mod = MOD_BLASTER ; T_Damage ( other , self , self -> owner , self -> velocity , self -> s . origin , plane -> normal , self -> dmg , 1 , DAMAGE_ENERGY , mod ) ; } else { gi . WriteByte ( svc_temp_entity ) ; gi . WriteByte ( TE_BLASTER ) ; gi . WritePosition ( self -> s . origin ) ; if ( ! plane ) gi . WriteDir ( vec3_origin ) ; else gi . WriteDir ( plane -> normal ) ; gi . multicast ( self -> s . origin , MULTICAST_PVS ) ; } G_FreeEdict ( self ) ; }
fire_blaster
Fires a single blaster bolt.
fire_blaster Fires a single blaster bolt .