nuclide/Source/gs-entbase/server/func_recharge.cpp
Marco Hladik 4621358ffd Added custom GLSL with support for the new gl_fake16bit, gl_affinemodels
Added support for respawns of map entities
Started redoing hostages... they don't have any animations right now. Don't be surprised.
Moved most/if-not-all CS specific entities into their own class files
2019-01-05 02:02:12 +01:00

35 lines
616 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.gflags &= ~GF_USE_RELEASED;
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);
}