Git Repos / fte_dogmode / qc / projectiles / voreball.qc
Last update to this file was on 2024-06-15 at 19:50.
Show voreball.qc
//==============================================================================
// vore / shalrath projectile
//==============================================================================
//======================================================================
// constants
//======================================================================
const float VOREBALL_DIRECT_DAMAGE = 110;// only for zombies -- CEV
const float VOREBALL_SPLASH_DAMAGE = 40;// splash damage; 120 is id1
const float VOREBALL_SPEED = 400; // id1 400ups
const float VOREBALL_HEALTH = 80; // slightly more difficult to destroy
// found with FTE's sv_gameplayfix_setmodelrealbox
const vector VOREBALL_MINS = '-16 -16 -16';
const vector VOREBALL_MAXS = '16 16 16';
//======================================================================
// forward declarations
//======================================================================
// projectile_voreball
void(vector dir) projectile_voreball_destroy;
void() projectile_voreball_touch;
entity(entity src, vector org, vector vel, float basespeed)
spawn_projectile_voreball;
void(entity e) projectile_voreball_init;
strip void() projectile_voreball;
//------------------------------------------------------------------------------
//----------------------------------------------------------------------
// class projectile_voreball: base_projectile
// {
//--------------------------------------------------------------
void(vector dir) projectile_voreball_destroy =
{
if (self.aflag & PROJECTILE_DESTROYED)
return;
self.aflag |= PROJECTILE_DESTROYED;
self.destroy = sub_nulldestroy;
self.think = sub_null;
self.touch = sub_null;
projectile_voreball_touch ();
};
//--------------------------------------------------------------
// ShalMissileTouch
//--------------------------------------------------------------
void() projectile_voreball_touch =
{
if (base_projectile_check_touch())
return;
if (other.classtype == CT_MONSTER_ZOMBIE)
t_damage2 (other, self, self, self.direct_damage);
if (self.takedamage)
self.takedamage = DAMAGE_NO;
t_radiusdamage2 (self, self.owner, self.splash_damage, world);
sound (self, CHAN_WEAPON, "weapons/r_exp3.wav",
VOL_HIGH, ATTN_NORM);
// BecomeExplosion
write_explosion (self.origin);
become_base_explosion (self);
};
//--------------------------------------------------------------
entity(entity src, vector org, vector vel, float basespeed)
spawn_projectile_voreball =
{
local entity e = spawn ();
e.owner = src;
e.enemy = src.enemy;
e.origin = org;
e.velocity = vel;
e.avelocity = src.cust_avelocity;
// homing setup
e.homing = src.homing;
e.proj_basespeed = basespeed;
e.proj_speed_mod = src.proj_speed_mod;
// model, skin, & sounds
e.mdl_proj = src.mdl_proj;
e.skin_proj = src.skin_proj;
e.snd_hit = src.snd_hit;
projectile_voreball_init (e);
return e;
};
//--------------------------------------------------------------
void(entity e) projectile_voreball_init =
{
base_projectile_init (e);
e.classname = "voreball";
e.classtype = CT_PROJECTILE_VOREBALL;
e.movetype = MOVETYPE_FLYMISSILE;
e.solid = SOLID_BBOX;
// e.destroy = projectile_voreball_destroy;
e.touch = projectile_voreball_touch;
e.aflag |= PROJECTILE_EXPLOSIVE;
// e.health = VOREBALL_HEALTH;
// e.takedamage = DAMAGE_YES;
e.angles = vectoangles (e.velocity);
// custom spin on projectile -- dumptruck_ds
if (!e.avelocity)
e.avelocity = '300 300 300';
if (!e.proj_basespeed)
e.proj_basespeed = VOREBALL_SPEED;
if (!e.direct_damage)
e.direct_damage = VOREBALL_DIRECT_DAMAGE;
if (!e.splash_damage)
e.splash_damage = VOREBALL_SPLASH_DAMAGE;
// dumptruck_ds custom_mdls
if (e.mdl_proj != "")
setmodel (e, e.mdl_proj);
else
setmodel (e, "progs/v_spike.mdl");
// dumptruck_ds
if (e.skin_proj)
e.skin = e.skin_proj;
else
e.skin = 0;
if (e.homing > 0)
{
base_projectile_setup_homing (e,
e.proj_basespeed * e.proj_speed_mod);
}
else
{
// SetSpeed
e.think = sub_remove;
e.nextthink = time + 5;
}
// setsize (e, VOREBALL_MINS, VOREBALL_MAXS);
setsize (e, '0 0 0', '0 0 0');
setorigin (e, e.origin);
};
//--------------------------------------------------------------
strip void() projectile_voreball =
{
projectile_voreball_init (self);
};
// };
Return to the top of this page or return to the overview of this repo.
Log voreball.qc
Date | Commit Message | Author | + | - |
---|---|---|---|---|
2024-06-15 | Major update, committing as-is, will have bugs | cev | +9 | -7 |
2024-04-12 | Moveable gibs, heads, some bugfixes | cev | +5 | -9 |
2024-04-08 | Registered monsters, projectile bugfixes | cev | +19 | -8 |
2024-04-05 | Player footsteps, shareware monsters, misc? | cev | +1 | |
2024-03-24 | 2nd pass refactor, rework QC class structure | cev | +93 | -45 |
2024-02-18 | Client/player, projectiles, entrypoints refactor | cev | +98 |
Return to the top of this page or return to the overview of this repo.