2018-12-31 01:00:38 +00:00
|
|
|
/***
|
|
|
|
*
|
|
|
|
* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved.
|
|
|
|
*
|
|
|
|
* See the file LICENSE attached with the sources for usage details.
|
|
|
|
*
|
|
|
|
****/
|
|
|
|
|
2019-01-03 01:26:39 +00:00
|
|
|
class trigger_teleport : CBaseTrigger
|
2018-12-31 01:00:38 +00:00
|
|
|
{
|
2019-01-03 01:26:39 +00:00
|
|
|
void() trigger_teleport;
|
2018-12-31 01:00:38 +00:00
|
|
|
virtual void() touch;
|
|
|
|
};
|
|
|
|
|
2019-01-03 01:26:39 +00:00
|
|
|
void trigger_teleport :: touch ( void )
|
2018-12-31 01:00:38 +00:00
|
|
|
{
|
|
|
|
if ( other.health > 0 || other.solid == SOLID_SLIDEBOX ) {
|
|
|
|
entity eTarget = find( world, ::targetname, target );
|
|
|
|
setorigin( other, eTarget.origin );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-03 01:26:39 +00:00
|
|
|
void trigger_teleport :: trigger_teleport ( void )
|
2018-12-31 01:00:38 +00:00
|
|
|
{
|
|
|
|
CBaseTrigger::CBaseTrigger();
|
|
|
|
CBaseTrigger::InitBrushTrigger();
|
|
|
|
}
|
|
|
|
|
2019-01-03 01:26:39 +00:00
|
|
|
CLASSEXPORT( info_teleport_destination, info_notnull )
|