Git Repos / fte_dogmode / qc / triggers / void.qc
Last update to this file was on 2024-06-15 at 19:50.
Show void.qc
//==============================================================================
// trigger_void
//==============================================================================
//======================================================================
// This is necros' trigger_void from Lost Chapters pack, modified
// by dumptruck_ds, modified again by CEV
//======================================================================
//======================================================================
// constants
//======================================================================
#ifdef SSQC
const float TRIGGER_VOID_MONSTER_SAFE = 1;
const float TRIGGER_VOID_PLAYER_SAFE = 2;
#endif
//======================================================================
// forward declarations
//======================================================================
#ifdef SSQC
// trigger_void
void() trigger_void_touch;
void(entity e) trigger_void_init;
void() trigger_void;
#endif
//------------------------------------------------------------------------------
#ifdef SSQC
/*
QUAKED trigger_void (.5 .5 .5) ? 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
Use this for a 'void' area.
Removes monsters, gibs, ammo, etc... also kills player.
*/
//----------------------------------------------------------------------
// class trigger_void: base_trigger
// {
//--------------------------------------------------------------
void() trigger_void_touch =
{
if (self.estate != STATE_ACTIVE)
return;
// from Copper -- dumptruck_ds
if (other.movetype == MOVETYPE_NOCLIP)
return FALSE;
if (self.spawnflags & TRIGGER_VOID_MONSTER_SAFE &&
other.flags & FL_MONSTER)
{
// ignore monsters
return;
}
if (self.spawnflags & TRIGGER_VOID_PLAYER_SAFE &&
other.flags & FL_CLIENT)
{
// ignore players
return;
}
if (other.takedamage)
{
// kills even with Pentagram, this took forever to
// figure out!! -- dumptruck_ds
other.invincible_finished = 0;
t_damage2 (other, self, self, other.health + 1000);
if (other.flags & FL_MONSTER)
remove (other);
}
if (other.classname == "gib" ||
other.classtype == CT_PROJECTILE_GRENADE ||
other.classtype == CT_PROJECTILE_SPIKE ||
other.classtype == CT_PROJECTILE_ROCKET)
{
remove (other);
}
if (other.flags & FL_ITEM)
remove (other);
force_retouch = 2;
};
//--------------------------------------------------------------
void(entity e) trigger_void_init =
{
e.classname = "trigger_void";
e.classtype = CT_TRIGGER_VOID;
e.touch = trigger_void_touch;
base_trigger_init (e);
sub_checkwaiting (e);
};
//--------------------------------------------------------------
void() trigger_void =
{
// new spawnflags for all entities -- iw
if (SUB_Inhibit())
return;
trigger_void_init (self);
};
// };
#endif
Return to the top of this page or return to the overview of this repo.
Log void.qc
Date | Commit Message | Author | + | - |
---|---|---|---|---|
2024-06-15 | Major update, committing as-is, will have bugs | cev | +7 | |
2024-03-24 | 2nd pass refactor, rework QC class structure | cev | +47 | -27 |
2024-02-18 | Client/player, projectiles, entrypoints refactor | cev | +2 | -1 |
2024-01-31 | Class based monster refactor & start projectiles | cev | +1 | -1 |
2024-01-09 | Continue OO / Class-based refactor | cev | +23 | -24 |
2023-12-09 | Start OO / class-based refactor, work on items | cev | +67 | -46 |
2023-12-02 | More refactoring & moving, begin adding mdls & snd | cev | +6 | -2 |
2023-11-20 | changes to movement, build environment, file reorg | cev | +60 |
Return to the top of this page or return to the overview of this repo.