void Point_EffectUse(ServerEntity_t *eEntity) { switch(eEntity->local.style) { case 1: Entity_RadiusDamage(eEntity,MONSTER_RANGE_MEDIUM,eEntity->local.iDamage, eEntity->local.iDamageType); break; case 2: Engine.WriteByte(MSG_BROADCAST,SVC_TEMPENTITY); Engine.WriteByte(MSG_BROADCAST,CTE_GUNSHOT); Engine.WriteCoord(MSG_BROADCAST,eEntity->v.origin[0]); Engine.WriteCoord(MSG_BROADCAST,eEntity->v.origin[1]); Engine.WriteCoord(MSG_BROADCAST,eEntity->v.origin[2]); break; case 3: Engine.WriteByte(MSG_BROADCAST,SVC_TEMPENTITY); Engine.WriteByte(MSG_BROADCAST,CTE_TELEPORT); Engine.WriteCoord(MSG_BROADCAST,eEntity->v.origin[0]); Engine.WriteCoord(MSG_BROADCAST,eEntity->v.origin[1]); Engine.WriteCoord(MSG_BROADCAST,eEntity->v.origin[2]); break; default: Engine.Con_Warning("Unknown effect style! (%i)\n",eEntity->local.style); } if(eEntity->v.noise) Sound(eEntity,CHAN_ITEM,eEntity->v.noise,255,ATTN_NORM); }
void C4Vizatergo_Explode(ServerEntity_t *eVizatergo) { Sound(eVizatergo,CHAN_AUTO,va("fx/explosion%i.wav",rand()%6+1),255,ATTN_NORM); Entity_RadiusDamage(eVizatergo,MONSTER_RANGE_NEAR,40,DAMAGE_TYPE_EXPLODE); Entity_Remove(eVizatergo); }
void Point_ExplodeUse(ServerEntity_t *ePoint) { Entity_RadiusDamage(ePoint, MONSTER_RANGE_NEAR, ePoint->local.iDamage, DAMAGE_TYPE_EXPLODE); if (Engine.Server_PointContents(ePoint->v.origin) <= BSP_CONTENTS_WATER) Sound(ePoint, CHAN_AUTO, SOUND_EXPLODE_UNDERWATER0, 255, ATTN_NORM); else Sound(ePoint, CHAN_AUTO, SOUND_EXPLODE, 255, ATTN_NORM); if (ePoint->v.spawnflags & EXPLODE_FLAG_REMOVE) Entity_Remove(ePoint); }
// [2/8/2012] Renamed to SideWinder_MissileExplode ~hogsy void SideWinder_MissileExplode(edict_t *ent,edict_t *other) { vec3_t vVelocity; if(other && (other == ent->local.eOwner)) { SideWinder_Think(ent); return; } Entity_RadiusDamage(ent,MONSTER_RANGE_NEAR,30,1); // [4/8/2012] Simplified ~hogsy Math_VectorNegate(ent->v.velocity,vVelocity); // [4/8/2012] TODO: Underwater explosion too! ~hogsy Sound(ent,CHAN_AUTO,va("fx/explosion%i.wav",rand()%6+1),255,ATTN_NORM); Engine.Particle(ent->v.origin,vVelocity,1.0f,"spark2",25); Entity_Remove(ent); }