djcev.com

//

Git Repos / fte_dogmode / qc / misc / fireball.qc

Last update to this file was on 2024-03-24 at 02:40.

Show fireball.qc

//==============================================================================
// misc_fireball
//==============================================================================

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

// misc_fireball
void() misc_fireball_think;
void(entity e) misc_fireball_init;
void() misc_fireball;

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

/*QUAKED misc_fireball (0 .5 .8) (-8 -8 -8) (8 8 8) X 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
{ model ("progs/lavaball.mdl"); }
Flying lava balls spawner
speed - set vertical speed of fireballs. default 1000.
*/
//----------------------------------------------------------------------
// class misc_fireball: base_mapentity
// {
//--------------------------------------------------------------
// was fire_fly -- CEV
//--------------------------------------------------------------
void() misc_fireball_think =
{
spawn_projectile_fireball (self, self.origin,
[(random() * 100) - 50,
(random() * 100) - 50,
self.speed + (random() * 200)],
FIREBALL_DIRECT_DAMAGE);

self.think = misc_fireball_think;
self.nextthink = time + (random() * 5) + 3;
};

//--------------------------------------------------------------
void(entity e) misc_fireball_init =
{
e.classname = "misc_fireball";
e.classtype = CT_MISC_FIREBALL;

base_mapentity_init (e);

precache_model ("progs/lavaball.mdl");

if (!e.speed)
// fixed typo QIP - dumptruck_ds
e.speed = FIREBALL_SPEED;

e.think = misc_fireball_think;
// 1998-08-14 Incorrect setting of nextthink fix
// by Maddes/Lord Sméagol
// e.nextthink = time + (random() * 5);
e.nextthink = time + 0.1 + (random() * 5);
// 1998-08-14 Incorrect setting of nextthink fix
// by Maddes/Lord Sméagol
};

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

misc_fireball_init (self);
};
// };

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

Log fireball.qc

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