djcev.com

//

Git Repos / fte_dogmode / qc / func / explobox.qc

Last update to this file was on 2024-04-12 at 18:56.

Show explobox.qc

//==============================================================================
// func_explobox -- selections from Rubicon 2 qc by john fitzgibbons
//==============================================================================

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

// func_explobox
void() func_explobox_explode_silent;
void(vector dir) func_explobox_destroy;
// void() func_explobox_think =
void(entity e) func_explobox_init;
void() func_explobox;

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

/*QUAKED func_explobox (0 .5 .8) ? START_OFF X X X X X X X NOT_ON_EASY NOT_ON_NORMAL NOT_ON_HARD_OR_NIGHTMARE NOT_IN_DEATHMATCH NOT_IN_COOP NOT_IN_SINGLEPLAYER X NOT_ON_HARD_ONLY NOT_ON_NIGHTMARE_ONLY

An exploding brush entity. Works just like misc_explobox.

Keys:

"health" Default 20

"dmg" default 100

*/
//----------------------------------------------------------------------
// class func_explobox: base_func
// {
//--------------------------------------------------------------
void() func_explobox_explode_silent =
{
self.takedamage = DAMAGE_NO;
self.origin = ((self.absmin + self.absmax) * 0.5);
t_radiusdamage2 (self, self, self.dmg, world);
write_explosion (self.origin);
// BecomeExplosion
spawn_base_explosion (self.origin);
remove (self);
};

//--------------------------------------------------------------
void(vector dir) func_explobox_destroy =
{
// for some reason, time + 0.2 doesn't work
self.think = func_explobox_explode_silent;
self.nextthink = 0.2;
};

//--------------------------------------------------------------
/*
void() func_explobox_think =
{
// sound (this, CHAN_VOICE, "weapons/r_exp3.wav", 1, ATTN_NORM);
func_explobox_explode_silent ();
};
*/

//--------------------------------------------------------------
void(entity e) func_explobox_init =
{
e.classname = "func_explobox";
e.classtype = CT_FUNC_EXPLOBOX;
base_func_init (e);

e.solid = SOLID_BSP;
e.movetype = MOVETYPE_PUSH;
setmodel (e, e.model);
precache_sound ("weapons/r_exp3.wav");

if (!e.health)
e.health = 20;

if (!e.dmg)
e.dmg = 100;

e.destroy = func_explobox_destroy;
e.takedamage = DAMAGE_AIM;
};

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

func_explobox_init (self);
};
// };

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

Log explobox.qc

Date Commit Message Author + -
2024-04-12 Moveable gibs, heads, some bugfixes cev +2 -2
2024-03-24 2nd pass refactor, rework QC class structure cev +50 -27
2024-02-18 Client/player, projectiles, entrypoints refactor cev +5 -10
2024-01-31 Class based monster refactor & start projectiles cev +5 -2
2024-01-09 Continue OO / Class-based refactor cev +48 -46
2023-11-27 Code reorg, minor movement changes, misc cev +69  

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