nuclide/Source/Server/func_escapezone.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

70 lines
1.2 KiB
C++

/***
*
* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved.
*
* See the file LICENSE attached with the sources for usage details.
*
****/
/*
TODO: This gamemode is odd about balancing, right now the last surviving terrorist
will decide the match. Still have to think about what rules to set up.
*/
class func_escapezone
{
void() func_escapezone;
virtual void() touch;
};
void Escape_Touch(entity targ)
{
entity eOld = self;
self = targ;
Spawn_MakeSpectator();
self.classname = "player";
forceinfokey( self, "*dead", "0" );
self.health = 0;
Rules_CountPlayers();
self = eOld;
}
/*
=================
func_escapezone_touch
=================
*/
void func_escapezone::touch(void)
{
if ((other.classname == "player") && (other.team == TEAM_T)) {
Escape_Touch(other);
if (iAlivePlayers_T == 0) {
Rules_RoundOver(TEAM_T, 2500, FALSE);
}
}
}
/*
=================
SPAWN: func_escapezone
Entry function for the terrorist escape zone
=================
*/
void func_escapezone::func_escapezone(void)
{
angles = [0,0,0];
movetype = MOVETYPE_NONE;
solid = SOLID_TRIGGER;
if ( model ) {
setmodel( self, model );
} else {
setsize( self, mins, maxs );
}
model = 0;
iEscapeZones++;
}