亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? trigger.cpp

?? this keik game source
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
   // this cannot be done
	volume = ev->GetFloat( 1 );
	}

void TriggerPlaySound::SetAttenuation
	(
	Event *ev
	)

	{
	attenuation = ev->GetFloat( 1 );
	}

void TriggerPlaySound::SetChannel
	(
	Event *ev
	)

	{
	channel = ev->GetInteger( 1 );
	}

TriggerPlaySound::TriggerPlaySound()
	{
   //
   // this is here so that a baseline is created for this
   //      
   edict->s.effects = EF_FORCEBASELINE;
   //
   // this is here so that it gets sent over at least once
   //
	showModel();
   ambient = false;
   pitch = 1.0f;
   timeofs = 0;
   fadetime = 0;
	volume		= G_GetFloatArg( "volume", 1.0 );
	channel		= G_GetIntArg( "channel", CHAN_VOICE );
	state			= 0;
	respondto	= spawnflags ^ TRIGGER_PLAYERS;
   if (spawnflags & 2)
      channel |= CHAN_RELIABLE;
   if (spawnflags & 33)
      {
      ambient = true;
   	attenuation = G_GetFloatArg( "attenuation", ATTN_IDLE );
      if (spawnflags & 1)
         {
         ToggleSound( NULL );
         }
      }
   else
      {
   	attenuation = G_GetFloatArg( "attenuation", ATTN_NORM );
      }
	}

/*****************************************************************************/
/*SINED trigger_speaker (0.3 0.1 0.6) (-8 -8 -8) (8 8 8) AMBIENT-ON RELIABLE NOT_PLAYERS MONSTERS PROJECTILES AMBIENT-OFF x TOGGLE

play a sound when it is used

AMBIENT-ON specifies an ambient sound that starts on
RELIABLE should only be set for crucial voice-overs or sounds
AMBIENT-OFF specifies an ambient sound that starts off

if (AMBIENT-?) is not set, then the sound is sent over explicitly this creates more net traffic

"volume" how loud 0-4 (1 default full volume, ambients do not respond to volume)
"noise" sound to play
"channel" channel on which to play sound (0 auto, 1 weapon, 2 voice, 3 item, 4 body, 8 don't use PHS) (voice is default)
"pitch" the pitch of the sample ( default 1, no pitch-shift )
"fadetime" fade the sound in over a time period in seconds ( default 0, no fade )
"timeofs" start time offset in milli-seconds into this sound ( default 0, no timeofs )
"attenuation" attenuation factor (0 becomes 1 for non-ambients, 2 for ambients)
   -1 - none, send to whole level
    0 - default (normal or ambient)
    1 - normal fighting sounds
    2 - idle monster sounds
    3 - ambient sounds
"key"          The item needed to activate this. (default nothing)
"thread" name of thread to trigger.  This can be in a different script file as well\
by using the '::' notation.

Normal sounds play each time the target is used.

Ambient Looped sounds have an attenuation of 2 by default, volume 1, and the use function toggles it on/off.
Multiple identical ambient looping sounds will just increase volume without any speed cost.
The attenuation factor can be over-ridden by specifying an attenuation factor.

If NOT_PLAYERS is set, the trigger does not respond to players
If MONSTERS is set, the trigger will respond to monsters
If PROJECTILES is set, the trigger will respond to projectiles (rockets, grenades, etc.)

/*****************************************************************************/
CLASS_DECLARATION( TriggerPlaySound, TriggerSpeaker, "trigger_speaker" );

ResponseDef TriggerSpeaker::Responses[] =
	{
		{ &EV_Touch,	NULL },
		{ NULL, NULL }
	};

TriggerSpeaker::TriggerSpeaker()
	{
   if (attenuation == -1)
      attenuation = 0;
	pitch    	= G_GetFloatArg( "pitch", 1.0 );
	fadetime    = G_GetFloatArg( "fadetime", 0 );
   timeofs     = G_GetFloatArg( "timeofs", 0 );
	}

/*****************************************************************************/
/*SINED trigger_randomspeaker (0.3 0.1 0.6) (-8 -8 -8) (8 8 8) x RELIABLE NOT_PLAYERS MONSTERS PROJECTILES x x

play a sound at random times

RELIABLE should only be set for crucial voice-overs or sounds

"mindelay" minimum delay between sound triggers (default 3)
"maxdelay" maximum delay between sound triggers (default 10)
"volume" how loud 0-4 (1 default full volume)
"noise" sound to play
"channel" channel on which to play sound (0 auto, 1 weapon, 2 voice, 3 item, 4 body, 8 don't use PHS) (voice is default)
"pitch" the pitch of the sample ( default 1, no pitch-shift )
"fadetime" fade the sound in over a time period in seconds ( default 0, no fade )
"timeofs" start time offset in milli-seconds into this sound ( default 0, no timeofs )
"attenuation" attenuation factor
   -1 - none, send to whole level
    0 - default (normal)
    1 - normal fighting sounds
    2 - idle monster sounds
    3 - ambient sounds
"key"          The item needed to activate this. (default nothing)

Normal sounds play each time the target is used.

If NOT_PLAYERS is set, the trigger does not respond to players
If MONSTERS is set, the trigger will respond to monsters
If PROJECTILES is set, the trigger will respond to projectiles (rockets, grenades, etc.)

/*****************************************************************************/

CLASS_DECLARATION( TriggerSpeaker, RandomSpeaker, "trigger_randomspeaker" );

Event EV_TriggerRandomSpeaker_TriggerSound( "triggersound" );

ResponseDef RandomSpeaker::Responses[] =
	{
	   { &EV_Trigger_Effect,						( Response )RandomSpeaker::TriggerSound },
		{ &EV_Touch,	NULL },
		{ NULL, NULL }
	};

void RandomSpeaker::TriggerSound
	(
	Event *ev
	)

	{
   ScheduleSound();
   TriggerPlaySound::ToggleSound( ev );
	}

void RandomSpeaker::ScheduleSound
	(
   void
	)

	{
	CancelEventsOfType( EV_Trigger_Effect );
   PostEvent( EV_Trigger_Effect, mindelay + G_Random( maxdelay-mindelay ) );
	}

RandomSpeaker::RandomSpeaker()
	{
	mindelay  	= G_GetFloatArg( "mindelay", 3 );
	maxdelay    = G_GetFloatArg( "maxdelay", 10 );
   ScheduleSound();
	}

/*****************************************************************************/
/*SINED trigger_changelevel (0.5 0.5 0.5) ? NO_INTERMISSION x NOT_PLAYERS MONSTERS PROJECTILES

When the player touches this, he gets sent to the map listed in the "map" variable.
Unless the NO_INTERMISSION flag is set, the view will go to the info_intermission
spot and display stats.

"spawnspot"  name of the spawn location to start at in next map.
"key"          The item needed to activate this. (default nothing)
"thread" This defaults to "LevelComplete" and should point to a thread that is called just
before the level ends.

If NOT_PLAYERS is set, the trigger does not respond to players
If MONSTERS is set, the trigger will respond to monsters
If PROJECTILES is set, the trigger will respond to projectiles (rockets, grenades, etc.)

/*****************************************************************************/

CLASS_DECLARATION( Trigger, TriggerChangeLevel, "trigger_changelevel" );

ResponseDef TriggerChangeLevel::Responses[] =
	{
		{ &EV_Trigger_Effect,		( Response )TriggerChangeLevel::ChangeLevel },
		{ NULL, NULL }
	};

TriggerChangeLevel::TriggerChangeLevel()
	{
	map = G_GetStringArg( "map" );
	if ( !map.length() && !LoadingSavegame )
		{
		error( "Init", "changelevel trigger doesn't have map" );
		}

   // We have to handle calling the thread ourselves, so clear out Trigger's tread variable
   thread = "";
   changethread = G_GetStringArg( "thread", "LevelComplete" );

	spawnspot = G_GetStringArg( "spawnspot" );
	respondto = spawnflags ^ TRIGGER_PLAYERS;
	}

void TriggerChangeLevel::ChangeLevel
	(
	Event *ev
	)

	{
	Entity *other;

	other = ev->GetEntity( 1 );

	if ( level.intermissiontime )
		{
		// already activated
		return;
		}

	// if noexit, do a ton of damage to other
	if ( deathmatch->value && DM_FLAG( DF_SAME_LEVEL ) && other != world )
		{
		other->Damage( this, other, 10 * other->max_health, other->worldorigin, vec_zero, vec_zero, 1000, 0, MOD_CRUSH, -1, -1, 1.0f );
		return;
		}

	// if multiplayer, let everyone know who hit the exit
	if ( deathmatch->value )
		{
		if ( other && other->edict->client )
			{
			gi.bprintf( PRINT_HIGH, "%s exited the level.\n", other->edict->client->pers.netname );
			}
		}

   // tell the script that the player's not ready so that if we return to this map,
   // we can do something about it.
   Director.PlayerNotReady();

   //
   // make sure we execute the thread before changing
   //
   if ( changethread.length() )
      {
      ExecuteThread( changethread );
      }

	G_BeginIntermission( map.c_str() );
	}

const char *TriggerChangeLevel::Map
	(
	void
	)

	{
	return map.c_str();
	}

const char *TriggerChangeLevel::SpawnSpot
	(
	void
	)

	{
	return spawnspot.c_str();
	}

/*****************************************************************************/
/*SINED trigger_use (0.5 0.5 0.5) ? VISIBLE x NOT_PLAYERS MONSTERS

Activates targets when 'used' by an entity
"key"          The item needed to activate this. (default nothing)
"thread" name of thread to trigger.  This can be in a different script file as well\
by using the '::' notation.

If NOT_PLAYERS is set, the trigger does not respond to players
If MONSTERS is set, the trigger will respond to monsters

/*****************************************************************************/

CLASS_DECLARATION( Trigger, TriggerUse, "trigger_use" );

ResponseDef TriggerUse::Responses[] =
	{
	   { &EV_Use,		( Response )TriggerUse::TriggerStuff },
		{ &EV_Touch,	NULL },
		{ NULL, NULL }
	};

TriggerUse::TriggerUse()
	{
	if ( spawnflags & VISIBLE )
		{
		showModel();
		setMoveType( MOVETYPE_PUSH );
		setSolidType( SOLID_BSP );
		}

	respondto = ( spawnflags ^ TRIGGER_PLAYERS ) & ~TRIGGER_PROJECTILES;
	}

/*****************************************************************************/
/*SINED trigger_useonce (0.5 0.5 0.5) ? VISIBLE x NOT_PLAYERS MONSTERS

Activates targets when 'used' by an entity, but only once
"key"          The item needed to activate this. (default nothing)
"thread" name of thread to trigger.  This can be in a different script file as well\
by using the '::' notation.

If NOT_PLAYERS is set, the trigger does not respond to players
If MONSTERS is set, the trigger will respond to monsters

/*****************************************************************************/

CLASS_DECLARATION( TriggerUse, TriggerUseOnce, "trigger_useonce" );

ResponseDef TriggerUseOnce::Responses[] =
	{
		{ &EV_Touch,	NULL },
		{ NULL, NULL }
	};

TriggerUseOnce::TriggerUseOnce()
	{
	// Only allow 1 use.
	count = 1;

	respondto = ( spawnflags ^ TRIGGER_PLAYERS ) & ~TRIGGER_PROJECTILES;
	}

/*****************************************************************************/
/*SINED trigger_hurt (0.5 0.5 0.5) ? x x NOT_PLAYERS NOT_MONSTERS PROJECTILES

"damage" amount of damage to cause. (default 10)
"key"          The item needed to activate this. (default nothing)

If NOT_PLAYERS is set, the trigger does not hurt players
If NOT_MONSTERS is set, the trigger does not hurt monsters
If PROJECTILES is set, the trigger will hurt projectiles (rockets, grenades, etc.)

/*****************************************************************************/

Event EV_TriggerHurt_SetDamage( "setdamage" );

CLASS_DECLARATION( TriggerUse, TriggerHurt, "trigger_hurt" );

ResponseDef TriggerHurt::Responses[] =
	{
		{ &EV_Trigger_Effect,		   ( Response )TriggerHurt::Hurt },
		{ &EV_TriggerHurt_SetDamage,  ( Response )TriggerHurt::SetDamage },
	   { &EV_Touch,						( Response )Trigger::TriggerStuff },
		{ NULL, NULL }
	};

TriggerHurt::TriggerHurt()
	{
	damage = G_GetFloatArg( "damage", 10 );
	respondto = spawnflags ^ ( TRIGGER_PLAYERS | TRIGGER_MONSTERS );
	}

void TriggerHurt::SetDamage
	(
	Event *ev
	)

	{
	damage = ev->GetInteger( 1 );
	}

void TriggerHurt::Hurt
	(
	Event *ev
	)

	{
	Entity *other;

	other = ev->GetEntity( 1 );

	if ( ( damage != 0 ) && !other->deadflag && !( other->flags & FL_GODMODE ) )
		{
		other->Damage( this, other, damage, other->worldorigin, vec_zero, vec_zero, 0, DAMAGE_NO_ARMOR|DAMAGE_NO_SKILL, MOD_CRUSH, -1, -1, 1.0f );
		}
	}

/*****************************************************************************/
/*SINED trigger_damagetargets (0.5 0.5 0.5) ? SOLID x NOT_PLAYERS NOT_MONSTERS PROJECTILES

"damage" amount of damage to cause. If no damage is specified, objects\
are damaged by the current health+1

"key"          The item needed to activate this. (default nothing)

if a trigger_damagetargets is shot at and the SOLID flag is set,\
the damage is passed on to the targets

If NOT_PLAYERS is set, the trigger does not hurt players
If NOT_MONSTERS is set, the trigger does not hurt monsters
If PROJECTILES is set, the trigger will hurt projectiles (rockets, grenades, etc.)

/*****************************************************************************/

CLASS_DECLARATION( Trigger, TriggerDamageTargets, "trigger_damagetargets" );

ResponseDef TriggerDamageTargets::Responses[] =
	{
      { &EV_Trigger_ActivateTargets,	( Response )TriggerDamageTargets::DamageTargets },
      { &EV_Damage,						   ( Response )TriggerDamageTargets::PassDamage },
		{ &EV_Touch,                     NULL },
		{ NULL, NULL }
	};

TriggerDamageTargets::TriggerDamageTargets()
	{
	damage = G_GetFloatArg( "damage", 0 );
	respondto = spawnflags ^ ( TRIGGER_PLAYERS | TRIGGER_MONSTERS );

   if (spawnflags & 1)
      {
	   health = 60;
	   max_health = health;
	   takedamage = DAMAGE_YES;
	   setSolidType( SOLID_BBOX );
      }
   else
      {
	   takedamage = DAMAGE_NO;
	   setSolidType( SOLID_NOT );
      }
	}

void TriggerDamageTargets::PassDamage
	(
	Event *ev
	)

	{
	Entity		*attacker;
	int			dmg;
	Entity	   *ent;
	const char	*name;
	int		   num;

	dmg		   = ev->GetInteger( 1 );
	attacker		= ev->GetEntity( 3 );

   //
   // damage the targets
   //
	name = Target();
	if ( name && strcmp( name, "" ) )
		{
		num = 0;
		do
			{
			num = G_FindTarget( num, name );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一卡2卡3卡4卡| 懂色一区二区三区免费观看| 国产福利一区二区三区| 欧洲生活片亚洲生活在线观看| 亚洲日本在线a| 美女视频黄免费的久久 | 免费在线视频一区| 99久久99久久免费精品蜜臀| 欧美成人精品福利| 亚洲高清在线精品| 国产精品 欧美精品| 日韩一区二区高清| 亚洲电影一级黄| 99久久综合狠狠综合久久| 精品国产91乱码一区二区三区 | 久久久国产精品午夜一区ai换脸| 亚洲午夜精品网| 99国产一区二区三精品乱码| 久久久久久久久99精品| 免费看欧美女人艹b| 欧美三级日韩三级| 中文字幕一区三区| 国产a级毛片一区| 久久人人97超碰com| 久久国产免费看| 3751色影院一区二区三区| 亚洲一区二区三区四区在线观看| a4yy欧美一区二区三区| 国产欧美日韩不卡免费| 黄一区二区三区| 欧美mv和日韩mv的网站| 奇米888四色在线精品| 欧美日韩久久不卡| 亚洲成人一区在线| 在线观看亚洲成人| 亚洲最色的网站| 色94色欧美sute亚洲线路一ni| 国产精品国产三级国产普通话99 | 裸体健美xxxx欧美裸体表演| 777久久久精品| 手机精品视频在线观看| 欧美巨大另类极品videosbest| 亚洲国产成人精品视频| 欧美在线一区二区| 亚洲国产精品久久人人爱| 欧美四级电影在线观看| 亚洲五月六月丁香激情| 欧美日韩一区二区三区视频| 亚洲mv在线观看| 91精品综合久久久久久| 蜜臀av性久久久久蜜臀av麻豆| 日韩三级中文字幕| 精品在线一区二区三区| 久久久久国产精品厨房| 国产成人av网站| 国产精品久久99| 色哟哟日韩精品| 亚洲曰韩产成在线| 91精品国产综合久久国产大片 | 国产精品色一区二区三区| 成人国产一区二区三区精品| 日韩毛片一二三区| 91国产成人在线| 日韩高清欧美激情| 亚洲精品在线免费播放| 国产成人综合网站| 综合婷婷亚洲小说| 欧美少妇xxx| 毛片av一区二区| 国产午夜精品理论片a级大结局| 成人av网在线| 亚洲在线成人精品| 欧美成人激情免费网| 国产福利一区二区三区视频在线 | 亚洲欧美偷拍卡通变态| 欧美少妇xxx| 国模大尺度一区二区三区| 国产精品久久久久久久裸模 | 成人性视频免费网站| 综合中文字幕亚洲| 欧美人成免费网站| 国产精品一区二区久久不卡 | 国产亚洲精品资源在线26u| 懂色av中文一区二区三区| 亚洲精品五月天| 日韩色视频在线观看| 成人中文字幕电影| 亚洲综合一区二区| 精品久久久久99| 91一区在线观看| 人人超碰91尤物精品国产| 日本一区二区三区高清不卡| 欧美色视频在线| 国产专区综合网| 亚洲一区在线观看免费| 久久综合久久综合九色| 99精品1区2区| 奇米精品一区二区三区在线观看 | 国产精品麻豆99久久久久久| 欧美日韩一区二区三区不卡| 国产激情91久久精品导航| 亚洲国产日产av| 国产亚洲一二三区| 欧美日韩的一区二区| 国产99久久精品| 日本一道高清亚洲日美韩| 国产精品久久久久久久久晋中 | 91精品国产福利| av一区二区久久| 午夜精品久久久久久久99水蜜桃 | 欧美一区二区啪啪| 不卡电影一区二区三区| 青青国产91久久久久久| 综合av第一页| 精品国产一区二区精华| 欧美性视频一区二区三区| 高清国产一区二区三区| 五月激情六月综合| 亚洲天堂精品视频| 久久免费电影网| 91精品国产91久久久久久一区二区 | 91精品国产欧美日韩| 91丝袜呻吟高潮美腿白嫩在线观看| 老司机免费视频一区二区| 18成人在线视频| 久久久久久99久久久精品网站| 欧美日韩精品免费观看视频| 成人av在线电影| 国内精品国产成人国产三级粉色| 性久久久久久久| 亚洲激情图片qvod| 国产精品国产三级国产a| 久久久精品免费观看| 777色狠狠一区二区三区| 在线精品视频一区二区| 99久久免费国产| 国产成人av网站| 国产精品综合av一区二区国产馆| 日本一道高清亚洲日美韩| 亚洲午夜免费电影| 亚洲人成精品久久久久| 国产精品视频观看| 久久精品无码一区二区三区| 欧美va亚洲va在线观看蝴蝶网| 7878成人国产在线观看| 欧美日韩国产a| 欧美日韩三级一区二区| 欧美视频中文字幕| 色乱码一区二区三区88| 91美女视频网站| 99re8在线精品视频免费播放| 成人免费高清视频在线观看| 国产精品1024| 国产成a人亚洲精品| 成人夜色视频网站在线观看| 国产一区二区电影| 狠狠色丁香久久婷婷综合_中 | 亚洲一二三四区不卡| 亚洲欧美偷拍卡通变态| 亚洲精品中文字幕在线观看| 亚洲欧美一区二区三区国产精品 | 久久久久久免费| 久久久久久亚洲综合影院红桃 | 欧美色图12p| 欧美日韩精品电影| 在线不卡一区二区| 日韩一区二区麻豆国产| 亚洲精品一区二区三区在线观看| 精品国产青草久久久久福利| 久久影音资源网| 中文字幕欧美激情| 国产精品国产三级国产专播品爱网 | 一本一道综合狠狠老| 91蝌蚪porny九色| 欧美午夜影院一区| 欧美福利一区二区| 欧美大片一区二区| 久久久亚洲精品石原莉奈| 国产日韩精品一区二区浪潮av| 欧美国产一区视频在线观看| 中文字幕一区二区不卡| 亚洲一区二区黄色| 日韩精品欧美精品| 狠狠色丁香久久婷婷综| 国产成人免费视频网站高清观看视频| 高清av一区二区| 在线一区二区三区做爰视频网站| 欧美日韩国产精品成人| 欧美日韩在线三级| 日韩欧美一级精品久久| 国产午夜精品理论片a级大结局| 自拍偷拍欧美激情| 午夜精品一区二区三区三上悠亚| 捆绑调教一区二区三区| 国产91精品一区二区麻豆亚洲| 99久久99久久久精品齐齐| 欧美日韩国产一级二级| 2023国产精品| 亚洲柠檬福利资源导航| 亚洲gay无套男同|