djcev.com

//

Git Repos / fte_dogmode / qc / triggers / explosion.qc

Last update to this file was on 2025-03-30 at 19:29.

Show explosion.qc

//==============================================================================
// trigger_explosion -- from MachineGames Dimension Of The machine -- CEV
//==============================================================================

//======================================================================
// constants
//======================================================================

#ifdef SSQC
//----------------------------------------------------------------------
// trigger_explosion spawnflags -- CEV
//----------------------------------------------------------------------
typedef enumflags
{
SPAWNFLAG_TRIGGER_EXPLOSION_NO_DAMAGE = 1
// SPAWNFLAG_NOT_ON_EASY = 256, // see base_entities.qc -- CEV
// SPAWNFLAG_NOT_ON_NORMAL = 512,
// SPAWNFLAG_NOT_ON_HARD_OR_NIGHTMARE = 1024,
// SPAWNFLAG_NOT_IN_DEATHMATCH = 2048,
// SPAWNFLAG_NOT_IN_COOP = 4096,
// SPAWNFLAG_NOT_IN_SP = 8192,
// SPAWNFLAG_NOT_ON_SKILL2 = 32768, // see base_entities.qc -- CEV
// SPAWNFLAG_NOT_ON_SKILL3 = 65536, // see base_entities.qc -- CEV
// SPAWNFLAG_CENTERPRINTALL = 131072 // see base_entities.qc -- CEV
} trigger_explosion_spawnflags;
#endif

//======================================================================
// forward declarations
//======================================================================

#ifdef SSQC
// trigger_explosion
void() trigger_explosion_activate;
void() trigger_explosion_use;
void(entity e) trigger_explosion_init;
void() trigger_explosion;
#endif

//------------------------------------------------------------------------------

#ifdef SSQC
//----------------------------------------------------------------------
// class trigger_explosion: base_trigger
// {
//--------------------------------------------------------------
void() trigger_explosion_activate =
{
self.delay = 0;
sub_usetargets ();

if (!(self.spawnflags & SPAWNFLAG_TRIGGER_EXPLOSION_NO_DAMAGE))
t_radiusdamage2 (self, self.owner, 120, self);

// BecomeExplosion
write_explosion (self.origin);
become_base_explosion (self);
};

//--------------------------------------------------------------
void() trigger_explosion_use =
{
if (self.delay > 0)
{
self.think = trigger_explosion_activate;
self.nextthink = time + self.delay;
}
else
{
trigger_explosion_activate ();
}
};

//--------------------------------------------------------------
void(entity e) trigger_explosion_init =
{
e.classname = "trigger_explosion";
e.classtype = CT_TRIGGER_EXPLOSION;

base_trigger_init (e);

e.use = trigger_explosion_use;
};

//--------------------------------------------------------------
void() trigger_explosion =
{
// new spawnflags for all entities -- iw
if (SUB_Inhibit())
return;

trigger_explosion_init (self);
};
// };
#endif

Return to the top of this page or return to the overview of this repo.

Log explosion.qc

Date Commit Message Author + -
2025-03-30 Big commit. Entity networking, etc. cev +95  

Return to the top of this page or return to the overview of this repo.