2019-01-05 01:02:12 +00:00
|
|
|
/***
|
|
|
|
*
|
2019-01-16 16:43:50 +00:00
|
|
|
* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved.
|
|
|
|
*
|
|
|
|
* See the file LICENSE attached with the sources for usage details.
|
2019-01-05 01:02:12 +00:00
|
|
|
*
|
|
|
|
****/
|
|
|
|
|
2019-01-10 10:14:13 +00:00
|
|
|
class func_bomb_target:CBaseTrigger
|
2019-01-05 01:02:12 +00:00
|
|
|
{
|
|
|
|
void() func_bomb_target;
|
|
|
|
virtual void() touch;
|
2019-02-25 17:19:54 +00:00
|
|
|
virtual void() Respawn;
|
2019-01-05 01:02:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
void func_bomb_target::touch(void)
|
|
|
|
{
|
|
|
|
if (iBombPlanted == TRUE) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* This will be cleared every frame inside SV_RunClientCommand */
|
|
|
|
if ((other.classname == "player") && (other.team == TEAM_T)) {
|
|
|
|
other.fInBombZone = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-02-25 17:19:54 +00:00
|
|
|
void func_bomb_target::Respawn(void)
|
|
|
|
{
|
|
|
|
solid = SOLID_TRIGGER;
|
|
|
|
#ifdef GS_DEVELOPER
|
|
|
|
alpha = 0.5f;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2019-01-05 01:02:12 +00:00
|
|
|
void func_bomb_target::func_bomb_target(void)
|
|
|
|
{
|
2019-02-25 17:19:54 +00:00
|
|
|
func_bomb_target::Respawn();
|
2019-01-10 10:14:13 +00:00
|
|
|
CBaseTrigger::CBaseTrigger();
|
|
|
|
CBaseTrigger::InitBrushTrigger();
|
2019-01-05 01:02:12 +00:00
|
|
|
iBombZones++;
|
|
|
|
}
|