mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-13 23:28:04 +03:00
func_bomb_target: new feature "strict touch" (#636)
This commit is contained in:
parent
ab846f86f4
commit
49b2412e9c
@ -1825,6 +1825,21 @@ void CBuyZone::BuyTouch(CBaseEntity *pOther)
|
||||
|
||||
LINK_ENTITY_TO_CLASS(func_bomb_target, CBombTarget, CCSBombTarget)
|
||||
|
||||
void CBombTarget::KeyValue(KeyValueData *pkvd)
|
||||
{
|
||||
#ifdef REGAMEDLL_ADD
|
||||
if (FStrEq(pkvd->szKeyName, "strict_touch") && Q_atoi(pkvd->szValue) > 0)
|
||||
{
|
||||
m_bStrictTouch = true;
|
||||
pkvd->fHandled = TRUE;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
CBaseTrigger::KeyValue(pkvd);
|
||||
}
|
||||
}
|
||||
|
||||
void CBombTarget::Spawn()
|
||||
{
|
||||
InitTrigger();
|
||||
@ -1861,7 +1876,7 @@ void CBombTarget::BombTargetTouch(CBaseEntity *pOther)
|
||||
if (pPlayer->m_bHasC4)
|
||||
{
|
||||
#ifdef REGAMEDLL_ADD
|
||||
if (!legacy_bombtarget_touch.value)
|
||||
if (!legacy_bombtarget_touch.value || m_bStrictTouch)
|
||||
#endif
|
||||
{
|
||||
|
||||
|
@ -409,8 +409,15 @@ private:
|
||||
bool IsPlayerInBombSite(CBasePlayer *pPlayer);
|
||||
public:
|
||||
virtual void Spawn();
|
||||
virtual void KeyValue(KeyValueData *pkvd);
|
||||
|
||||
void EXPORT BombTargetTouch(CBaseEntity *pOther);
|
||||
void EXPORT BombTargetUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||
|
||||
#ifdef REGAMEDLL_ADD
|
||||
public:
|
||||
bool m_bStrictTouch;
|
||||
#endif
|
||||
};
|
||||
|
||||
class CHostageRescue: public CBaseTrigger
|
||||
|
@ -2268,6 +2268,11 @@
|
||||
@SolidClass = func_bomb_target : "Bomb target zone"
|
||||
[
|
||||
target(target_destination) : "Target (when bomb blows)"
|
||||
strict_touch(choices) : "Touch mode" : 0 =
|
||||
[
|
||||
0: "Legacy"
|
||||
1: "New one (is more strict)"
|
||||
]
|
||||
]
|
||||
|
||||
@SolidClass base(Targetname) = trigger_cdaudio : "Trigger CD Audio"
|
||||
|
Loading…
x
Reference in New Issue
Block a user