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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? trigger.cpp

?? this keik game source
?? CPP
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
			if ( !num )
				{
				break;
				}

			ent = G_GetEntity( num );
		
	      if ( !ent->deadflag && !( ent->flags & FL_GODMODE ) )
		      {
	         ent->Damage( this, attacker, dmg, ent->worldorigin, vec_zero, vec_zero, 0, 0, MOD_CRUSH, -1, -1, 1.0f );
		      }
			}
		while ( 1 );
		}
	}
//
//==============================
// DamageTargets
//==============================
//

void TriggerDamageTargets::DamageTargets
	(
	Event *ev
	)

	{
	Entity	*other;
	Entity	*ent;
	const char		*name;
	int		num;

	other = ev->GetEntity( 1 );

	if ( triggerActivated )
		{
		//
		// Entity triggered itself.  Prevent an infinite loop
		//
		ev->Error( "Entity targeting itself--Targetname '%s'", TargetName() );
		return;
		}

	triggerActivated = true;
	activator = other;
	
   //
   // print the message
   //
	if ( message.length() && other && other->isClient() )
		{
		gi.centerprintf( other->edict, "jcx jcy string \"%s\"", message.c_str() );
		if ( Noise().length() )
			{
			other->sound( Noise(), 1, CHAN_VOICE, ATTN_NORM );
			}
		}
		
   //
   // damage the targets
   //
	name = Target();
	if ( name && strcmp( name, "" ) )
		{
		num = 0;
		do
			{
			num = G_FindTarget( num, name );
			if ( !num )
				{
				break;
				}

			ent = G_GetEntity( num );
		
	      if ( !ent->deadflag && !( ent->flags & FL_GODMODE ) )
		      {
            if (damage)
		         ent->Damage( this, other, damage, ent->worldorigin, vec_zero, vec_zero, 0, 0, MOD_CRUSH, -1, -1, 1.0f );
            else
               ent->Damage( this, other, ent->health+1, ent->worldorigin, vec_zero, vec_zero, 0, 0, MOD_CRUSH, -1, -1, 1.0f );
		      }
			}
		while ( 1 );
		}

	triggerActivated = false;
	}


/*****************************************************************************/
/*SINED trigger_damagetargetsfixed (0.5 0.5 0.5) (-8 -8 -8) (8 8 8) 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_damagetargetsfixed 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( TriggerDamageTargets, TriggerFixedDamageTargets, "trigger_damagetargetsfixed" );

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

/*****************************************************************************/
/*SINED trigger_particles (0.3 0.1 0.6) (-8 -8 -8) (8 8 8)  x NOSOUND NOT_PLAYERS MONSTERS PROJECTILES RANDSTYLE BRIGHT 

spawn some particles when triggered

"count" number of particles to spawn ( default 10 )
"noise" sound to play when triggered ( defaults to random spark sounds )
"angles" specifies direction to spawn particles
"key"   The item needed to activate this. (default nothing)
"particlestyle" style of particles ( default 122 (sparks) )
sample styles (121 blood, 120 gunsmoke, 123 orangeglow, 124 blueyellow, 125 debris trail, 128 oil, 129 waterspray)

If NOSOUND is set, no sound will be played
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.)
If RANDSTYLE is set, the particles will be set to random colors in the particlestyle
if BRIGHT is set, particles will be drawn extra bright
/*****************************************************************************/

CLASS_DECLARATION( Trigger, TriggerParticles, "trigger_particles" );

Event EV_TriggerParticles_SetDirection( "setdirection" );

ResponseDef TriggerParticles::Responses[] =
	{
	   { &EV_Trigger_Effect,						( Response )TriggerParticles::SpawnParticles },
	   { &EV_TriggerParticles_SetDirection,	( Response )TriggerParticles::SetDirection },
		{ &EV_Touch,	NULL },
		{ NULL, NULL }
	};

void TriggerParticles::SpawnParticles
	(
	Event *ev
	)

	{
   if ( !(spawnflags & 2) )
      {
      if (Noise().length())
         sound( Noise() );
      else
         RandomGlobalSound( str("sparks") );
      }

   if ( particlestyle == 122 )
      SpawnTempDlight( worldorigin, 1, 1, 0, 100, 0.9, 1 );

   Particles( worldorigin, dir, count, particlestyle, flags );
	}

void TriggerParticles::SetDirection
   (
   Event *ev
   )

   {
   const char  *target;
   int         num;
   Entity      *end;

   // Set the end position if there is a target set.
   target = Target();
   if ( target && strlen( target ) )
      {
      if ( num = G_FindTarget( 0, target ) )
         {
         end = G_GetEntity( num );
         assert( end );
         dir = end->worldorigin - worldorigin;
         dir.normalize();
         }
      }
   else 
      dir = Vector( 0, 0, 0 );
   }

TriggerParticles::TriggerParticles
   (
   )
	
   {
   const char *target;
   target = Target();

   if ( target && strlen( target ) )
      PostEvent( EV_TriggerParticles_SetDirection, 0 );
   else
      dir = G_GetMovedir();

	SetNoise( G_GetSpawnArg( "noise", "" ) );
	count     	= G_GetIntArg( "count", 10 );
	particlestyle	= G_GetIntArg( "particlestyle", 122 );
   
   if ( spawnflags & 32 )
      flags |= PARTICLE_RANDOM;
   if ( spawnflags & 64 )
      flags |= PARTICLE_OVERBRIGHT;
	}

/*****************************************************************************/
/*SINED trigger_randomparticles (0.3 0.1 0.6) (-8 -8 -8) (8 8 8) START_ON NOSOUND NOT_PLAYERS MONSTERS PROJECTILES RANDSTYLE BRIGHT 

START_ON start the effect on

spawn some particles randomly
triggering the object 

"count" number of particles to spawn ( default 10 )
"noise" sound to play when triggered ( default none )
"mindelay" minimum delay between particle triggers (default 3)
"maxdelay" maximum delay between particle triggers (default 10)
"key"      The item needed to activate this. (default nothing)
"particlestyle" style of particles ( default 122 (sparks) )
sample styles (121 blood, 120 gunsmoke, 123 orangeglow, 124 blueyellow, 125 debris trail )

If NOSOUND is set, no sound will be played
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.)
If RANDSTYLE is set, the particles will be set to random colors in the particlestyle
if BRIGHT is set, particles will be drawn extra bright
/*****************************************************************************/

Event EV_RandomTriggerParticles_SpawnParticles( "spawnparticles" );

CLASS_DECLARATION( TriggerParticles, RandomTriggerParticles, "trigger_randomparticles" );

ResponseDef RandomTriggerParticles::Responses[] =
	{
	   { &EV_RandomTriggerParticles_SpawnParticles, ( Response )RandomTriggerParticles::RandomParticles },
	   { &EV_Trigger_Effect,						      ( Response )RandomTriggerParticles::ToggleParticles },
		{ &EV_Touch,	NULL },
		{ NULL, NULL }
	};

void RandomTriggerParticles::RandomParticles
	(
	Event *ev
	)

	{
   SpawnParticles( NULL );
   if (state)
      ScheduleParticles();
	}

void RandomTriggerParticles::ToggleParticles
	(
	Event *ev
	)

	{
   state ^= 1;
   if (state)
      ScheduleParticles();
   else
     	CancelEventsOfType( EV_RandomTriggerParticles_SpawnParticles );
	}

void RandomTriggerParticles::ScheduleParticles
	(
   void
	)

	{
   if (state)
      PostEvent( EV_RandomTriggerParticles_SpawnParticles, mindelay + G_Random( maxdelay-mindelay ) );
	}


RandomTriggerParticles::RandomTriggerParticles()
	{
   state = 0;
   if (spawnflags & 1)
      state = 1;
   ScheduleParticles();
	mindelay  	= G_GetFloatArg( "mindelay", 3 );
	maxdelay    = G_GetFloatArg( "maxdelay", 10 );
   }


/*****************************************************************************/
/*SINED trigger_thread (.5 .5 .5) ? notouch x NOT_PLAYERS MONSTERS PROJECTILES

Variable sized trigger. After firing cnt times, removes itself.  

"thread" name of thread to trigger.  This can be in a different script file as well\
by using the '::' notation.

You must set the key "target" to the name of another object in the 
level that has a matching name

"cnt" how many times it can be triggered ( default 1 )
"targetname".  If "health" is set, the trigger must be killed to activate.

if "killtarget" is set, any objects that have a matching "target" will be
removed when the trigger is fired.

if "angle" is set, the trigger will only fire when someone is facing the 
direction of the angle.  Use "360" for an angle of 0.

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

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.)

set "message" to text string

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

CLASS_DECLARATION( Trigger, TriggerThread, "trigger_thread" );

ResponseDef TriggerThread::Responses[] =
	{
		{ NULL, NULL }
	};

TriggerThread::TriggerThread()
	{
   if ( count == -1 )
      count = 1;
   if ( !thread.length() )
      {
      warning( "TriggerThread", "thread string not defined.\n" );
      }
	}

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

Activates 'targeted' camera when 'used'
If activated, toggles through cameras
"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, TriggerCameraUse, "trigger_camerause" );

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

void TriggerCameraUse::TriggerCamera
	(
	Event *ev
	)
	{
   str    camthread;
	Entity *other;

	other = ev->GetEntity( 1 );
   if ( other->isClient() )
      {
      int num;
      Player * client;
      Entity * ent;
      Camera * cam;

      client = ( Player * )other;
      if ( client->ViewMode() == CAMERA_VIEW )
         {
         str nextcam;
         cam = client->CurrentCamera();

         // It's possible to get out of the camera
         if ( !cam )
            return;

         nextcam = cam->NextCamera();
         if ( nextcam.length() )
            {
            num = G_FindTarget( 0, nextcam.c_str() );

            if ( num )
               {
               ent = (Entity *) G_GetEntity( num );
               if ( ent && ent->isSubclassOf( Camera ) )
                  {
                  cam = (Camera *)ent;
                  camthread = cam->Thread();
                  client->SetCamera( cam );
                  }
               }
            }
         }
      else
         {
         num = G_FindTarget( 0, Target() );
         if ( num )
            {
            ent = (Entity *) G_GetEntity( num );
            if ( ent && ent->isSubclassOf( Camera ) )
               {
               cam = (Camera *)ent;
               camthread = cam->Thread();
               client->SetCamera( cam );
               }
            else
               {
               warning( "TriggerCamera", "%s is not a camera", Target() );
               }
            }

         }
      if ( camthread.length() > 1 )
         {
         if ( !ExecuteThread( camthread ) )
            {
            warning( "TriggerCamera", "Null game script" );
            }
         }
      }
	}

/*****************************************************************************/
/*SINED trigger_mutate (0.5 0.5 0.5) ? x x NOT_PLAYERS NOT_MONSTERS
mutates whatever triggers it.

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

If NOT_PLAYERS is set, the trigger does not activate on players
If NOT_MONSTERS is set, the trigger does not activate on monsters

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

CLASS_DECLARATION( TriggerUse, TriggerMutate, "trigger_mutate" );

ResponseDef TriggerMutate::Responses[] =
	{
		{ &EV_Trigger_Effect,		   ( Response )TriggerMutate::Mutate },
	   { &EV_Touch,						( Response )Trigger::TriggerStuff },
		{ NULL, NULL }
	};

TriggerMutate::TriggerMutate()
	{
	respondto = spawnflags ^ ( TRIGGER_PLAYERS | TRIGGER_MONSTERS );
	}

void TriggerMutate::Mutate
	(
	Event *ev
	)

	{
   Event *event;
	Entity

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91激情在线视频| 卡一卡二国产精品| 五月婷婷综合激情| 日韩va亚洲va欧美va久久| 国产一区视频导航| 91麻豆免费观看| 91精品国产综合久久久蜜臀粉嫩 | 国产精品黄色在线观看| 一区二区三区久久久| 久久精品99国产国产精| 成人国产精品免费观看视频| 欧美日韩激情一区| 国产日韩欧美高清| 亚洲成va人在线观看| 国产馆精品极品| 欧美视频一区二区在线观看| 精品免费日韩av| 亚洲人成7777| 欧美色精品天天在线观看视频| 久久只精品国产| 亚洲精品免费电影| 狠狠色丁香婷婷综合| 99久久精品国产一区二区三区| 欧美美女一区二区在线观看| 国产午夜精品理论片a级大结局| 一区二区免费在线| 国产剧情av麻豆香蕉精品| 欧美视频一区二区三区| 国产欧美一区视频| 奇米777欧美一区二区| 色噜噜久久综合| 国产日韩欧美精品一区| 美女视频网站黄色亚洲| 91福利在线播放| 国产精品乱人伦| 免费久久精品视频| 在线观看一区二区视频| 欧美—级在线免费片| 免费人成在线不卡| 在线看日本不卡| 中文字幕亚洲不卡| 岛国av在线一区| 久久综合久久综合亚洲| 首页国产丝袜综合| 在线观看不卡一区| 亚洲三级电影网站| 欧美美女一区二区三区| 亚洲三级在线观看| 99综合电影在线视频| 久久这里只有精品首页| 捆绑调教一区二区三区| 555夜色666亚洲国产免| 亚洲国产日韩精品| 91偷拍与自偷拍精品| 中文字幕精品三区| 成人一级视频在线观看| 久久精品在这里| 精品一区二区影视| 日韩精品在线一区| 免费一级欧美片在线观看| 91 com成人网| 日韩激情视频网站| 欧美日韩成人激情| 午夜精品久久久久久久99樱桃| 日本韩国欧美一区| 亚洲乱码国产乱码精品精小说 | 国产精品盗摄一区二区三区| 国产麻豆精品在线| 国产亚洲短视频| 国产盗摄女厕一区二区三区| 久久综合久色欧美综合狠狠| 国产麻豆视频一区| 久久久久久久久久电影| 国产麻豆9l精品三级站| 久久久精品日韩欧美| 国产精品一区在线观看乱码| 国产亚洲制服色| 国产精品香蕉一区二区三区| 国产午夜亚洲精品羞羞网站| 国产精品123区| 国产精品毛片久久久久久| 成人app在线观看| 中文字幕一区二区三区乱码在线| 99久久精品一区二区| 亚洲欧美日韩一区二区 | 亚洲妇熟xx妇色黄| 欧美精品1区2区| 麻豆精品一区二区综合av| 精品99一区二区| 国产黄色精品网站| 国产精品久久久一本精品| 91丝袜美腿高跟国产极品老师| 亚洲在线观看免费| 91精品午夜视频| 国产在线视频不卡二| 亚洲国产精品国自产拍av| 91玉足脚交白嫩脚丫在线播放| 亚洲与欧洲av电影| 日韩一区二区精品在线观看| 国产在线不卡一区| 国产精品高清亚洲| 欧美日韩亚洲高清一区二区| 麻豆精品一二三| 国产精品国产自产拍在线| 色呦呦国产精品| 日本视频中文字幕一区二区三区| 2021国产精品久久精品| 一本到不卡免费一区二区| 日韩高清不卡一区二区三区| 久久你懂得1024| 色综合一区二区| 日韩av在线播放中文字幕| 国产欧美一区二区三区网站| 在线观看国产日韩| 国产一区二区导航在线播放| 日韩美女久久久| 日韩精品一区二| 日本韩国一区二区| 国产综合成人久久大片91| 亚洲毛片av在线| 久久婷婷成人综合色| 一本色道久久加勒比精品| 蜜臀精品久久久久久蜜臀| 中文字幕一区二区在线观看| 日韩三级电影网址| 成人黄色国产精品网站大全在线免费观看 | 天堂久久一区二区三区| 国产欧美1区2区3区| 欧美日韩国产综合一区二区三区 | 国产欧美日韩久久| 欧美日韩在线一区二区| 国产+成+人+亚洲欧洲自线| 亚洲综合色成人| 国产午夜精品久久久久久久 | 久久国产精品露脸对白| 国产精品毛片久久久久久久| 91精品国产综合久久蜜臀| 91捆绑美女网站| 国产在线精品一区二区| 亚洲成人一区二区| 一区二区中文视频| 亚洲精品在线免费播放| 欧美日韩国产美女| 99精品一区二区| 国产精品白丝jk白祙喷水网站 | 久久综合色婷婷| 欧美精品久久天天躁| 99re热视频这里只精品| 国产精品亚洲专一区二区三区| 天天综合日日夜夜精品| 亚洲少妇30p| 国产欧美精品一区二区三区四区| 宅男噜噜噜66一区二区66| 99riav一区二区三区| 国产成人av一区二区三区在线观看| 婷婷中文字幕综合| 亚洲一区二区精品久久av| 国产精品乱码久久久久久| 精品国产免费一区二区三区香蕉 | 久久精品99国产国产精| 婷婷国产在线综合| 亚洲一二三四久久| 亚洲欧美视频在线观看| 国产精品福利av| 欧美国产1区2区| 国产欧美一区二区精品婷婷| 精品福利一区二区三区| 日韩精品中文字幕一区二区三区| 在线电影院国产精品| 欧美私模裸体表演在线观看| 色噜噜夜夜夜综合网| 色综合久久综合网欧美综合网| 91视频在线看| 色综合久久久久| 91美女片黄在线| 91色在线porny| 一本一本大道香蕉久在线精品| 91啪九色porn原创视频在线观看| av在线这里只有精品| 不卡高清视频专区| 不卡av在线免费观看| 成人av小说网| 色婷婷综合久久久中文一区二区 | 亚洲午夜免费电影| 五月综合激情婷婷六月色窝| 午夜精品123| 日韩高清在线一区| 美女www一区二区| 久久精品72免费观看| 国产一区二区三区四区五区入口| 国产麻豆成人精品| 成人av在线网站| 色哟哟国产精品免费观看| 在线一区二区三区四区| 欧美午夜精品一区二区三区| 欧美美女一区二区在线观看| 欧美一级片在线| 国产亚洲女人久久久久毛片| 国产精品色眯眯| 亚洲综合一二区|