nuclide/Source/gs-entbase/server/func_recharge.cpp
Marco Hladik 5fa7002844 - Added everything needed for networked sprays
- Switched to custom pmove code (early, WIP) instead of the engine one, again
- Made nightvision compatible with splitscreen modes
- Player animation fixes
- Prediction fixes
- Fixed radius damage, so grenades and bombs should apply proper damage now
- Added func_wall_toggle
- Small entity fixes
2019-01-03 02:26:39 +01:00

36 lines
654 B
C++

/***
*
* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved.
*
* See the file LICENSE attached with the sources for usage details.
*
****/
class func_recharge:CBaseTrigger
{
float m_flDelay;
void() func_recharge;
virtual void() PlayerUse;
};
void func_recharge::PlayerUse(void)
{
eActivator.flags = (eActivator.flags - FL_USERELEASED);
if (m_flDelay > time) {
return;
}
eActivator.armor = bound(0, eActivator.armor += 15, 100);
m_flDelay = time + 1.0f;
}
void func_recharge::func_recharge(void)
{
solid = SOLID_BSP;
movetype = MOVETYPE_PUSH;
setorigin(this, origin);
setmodel(this, model);
gflags = GF_USABLE;
}