nuclide/Source/server/cstrike/func_vip_safetyzone.cpp
Marco Hladik d1f4e6b690 - Added team-killer punishment
- Added the really convoluted round loss bonus logic, thanks cstrike wiki
- Tweaked some existing money bonuses to reflect the real-world values of CS 1.5
- Implemented some Fire-In-The-Hole radio notices when throwing nades
- Added workaround for the shotgun reload glitch that comes from autoreloading. Proper fix soon
2019-03-21 20:14:51 +01:00

56 lines
1.1 KiB
C++

/***
*
* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved.
*
* See the file LICENSE attached with the sources for usage details.
*
****/
class func_vip_safetyzone
{
void() func_vip_safetyzone;
virtual void() touch;
};
/* Hack! Make this better? */
void VIP_Rescue(entity targ)
{
entity eOld = self;
self = other;
Spawn_MakeSpectator();
self.classname = "player";
self.team = TEAM_CT;
forceinfokey(self, "*dead", "0");
iAlivePlayers_CT--;
self = eOld;
}
void func_vip_safetyzone::touch(void)
{
if (other.classname == "player") {
if (other.team == TEAM_VIP) {
/* In Assassination, all Counter-Terrorists receive a $2500
* reward if they won by successfully guaranteeing
* the escape of the VIP. */
Rules_RoundOver(TEAM_CT, 2500, FALSE);
VIP_Rescue(other);
}
other.fInVIPZone = TRUE;
}
}
void func_vip_safetyzone::func_vip_safetyzone(void)
{
angles = '0 0 0';
movetype = MOVETYPE_NONE;
solid = SOLID_TRIGGER;
if (model) {
setmodel(this, model);
} else {
setsize(this, mins, maxs);
}
model = 0;
iVIPZones++;
}