2020-04-07 03:41:47 -07:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, and distribute this software for any
|
|
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
|
|
* copyright notice and this permission notice appear in all copies.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
|
|
|
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*QUAKED func_bomb_target (0 .5 .8) ?
|
|
|
|
"targetname" Name
|
|
|
|
"target" Target when bomb blows up.
|
|
|
|
"killtarget" Target to kill when triggered.
|
|
|
|
|
|
|
|
COUNTER-STRIKE (1999) ENTITY
|
|
|
|
|
|
|
|
Bomb target zone.
|
|
|
|
|
|
|
|
Used in the bomb defusal mode (de_* maps).
|
|
|
|
Once the bomb explodes inside this volume, it'll trigger its targets.
|
|
|
|
*/
|
|
|
|
|
|
|
|
class func_bomb_target:CBaseTrigger
|
|
|
|
{
|
2020-04-20 10:25:15 -07:00
|
|
|
void(void) func_bomb_target;
|
|
|
|
|
2020-04-12 06:50:42 -07:00
|
|
|
virtual void(void) Respawn;
|
2020-04-20 10:25:15 -07:00
|
|
|
virtual void(void) touch;
|
2020-04-07 03:41:47 -07:00
|
|
|
};
|
2020-04-12 06:50:42 -07:00
|
|
|
|
2020-04-20 10:25:15 -07:00
|
|
|
void
|
|
|
|
func_bomb_target::touch(void)
|
|
|
|
{
|
|
|
|
player pl = (player)other;
|
|
|
|
if (!(other.flags & FL_CLIENT)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (pl.team != TEAM_T) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2020-10-22 07:30:37 -07:00
|
|
|
pl.gflags |= GF_BOMBZONE;
|
2020-04-20 10:25:15 -07:00
|
|
|
}
|
|
|
|
|
2020-04-12 06:50:42 -07:00
|
|
|
void
|
|
|
|
func_bomb_target::Respawn(void)
|
|
|
|
{
|
|
|
|
InitBrushTrigger();
|
|
|
|
}
|
2020-04-14 16:18:19 -07:00
|
|
|
|
|
|
|
void
|
|
|
|
func_bomb_target::func_bomb_target(void)
|
|
|
|
{
|
|
|
|
g_cs_bombzones++;
|
|
|
|
}
|