• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ G_EffectIndex函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中G_EffectIndex函数的典型用法代码示例。如果您正苦于以下问题:C++ G_EffectIndex函数的具体用法?C++ G_EffectIndex怎么用?C++ G_EffectIndex使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了G_EffectIndex函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: NPC_Mark2_Precache

void NPC_Mark2_Precache( void )
{
	G_SoundIndex( "sound/chars/mark2/misc/mark2_explo" );// blows up on death
	G_SoundIndex( "sound/chars/mark2/misc/mark2_pain" );
	G_SoundIndex( "sound/chars/mark2/misc/mark2_fire" );
	G_SoundIndex( "sound/chars/mark2/misc/mark2_move_lp" );

	G_EffectIndex( "droidexplosion1" );
	G_EffectIndex( "env/med_explode2" );
	G_EffectIndex( "blaster/smoke_bolton" );
	G_EffectIndex( "bryar/muzzle_flash" );

	RegisterItem( FindItemForWeapon( WP_BRYAR_PISTOL ));
	RegisterItem( FindItemForAmmo( 	AMMO_METAL_BOLTS));
	RegisterItem( FindItemForAmmo( AMMO_POWERCELL ));
	RegisterItem( FindItemForAmmo( AMMO_BLASTER ));
}
开发者ID:Agustinlv,项目名称:BlueHarvest,代码行数:17,代码来源:AI_Mark2.cpp


示例2: auto_turret_die

//------------------------------------------------------------------------------------------------------------
void auto_turret_die ( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int meansOfDeath )
//------------------------------------------------------------------------------------------------------------
{
	vec3_t	forward = { 0,0, 1 }, pos;

	// Turn off the thinking of the base & use it's targets
	g_entities[self->r.ownerNum].think = NULL;
	g_entities[self->r.ownerNum].use = NULL;

	// clear my data
	self->die = NULL;
	self->takedamage = qfalse;
	self->s.health = self->health = 0;
	self->s.loopSound = 0;
	self->s.shouldtarget = qfalse;

	VectorCopy( self->r.currentOrigin, pos );
	pos[2] += self->r.maxs[2]*0.5f;
	G_PlayEffect( EFFECT_EXPLOSION_TURRET, pos, forward );
	G_PlayEffectID( G_EffectIndex( "turret/explode" ), pos, forward );
	
	if ( self->splashDamage > 0 && self->splashRadius > 0 )
	{
		G_RadiusDamage( self->r.currentOrigin, 
						attacker, 
						self->splashDamage, 
						self->splashRadius, 
						attacker,
						NULL,
						MOD_UNKNOWN );
	}

	self->s.weapon = 0; // crosshair code uses this to mark crosshair red


	if ( self->s.modelindex2 )
	{
		// switch to damage model if we should
		self->s.modelindex = self->s.modelindex2;

		if (self->target_ent && self->target_ent->s.modelindex2)
		{
			self->target_ent->s.modelindex = self->target_ent->s.modelindex2;
		}

		VectorCopy( self->r.currentAngles, self->s.apos.trBase );
		VectorClear( self->s.apos.trDelta );
		
		if ( self->target )
		{
			G_UseTargets( self, attacker );
		}
	}
	else
	{
		ObjectDie( self, inflictor, attacker, damage, meansOfDeath );
	}
}
开发者ID:dpadgett,项目名称:base_enhanced,代码行数:59,代码来源:g_turret.c


示例3: ImperialProbe_FireBlaster

/*
-------------------------
ImperialProbe_FireBlaster
-------------------------
*/
void ImperialProbe_FireBlaster(void)
{
	vec3_t	muzzle1,enemy_org1,delta1,angleToEnemy1;
	static	vec3_t	forward, vright, up;
//	static	vec3_t	muzzle;
	int genBolt1;
	gentity_t	*missile;
	mdxaBone_t	boltMatrix;

	genBolt1 = trap_G2API_AddBolt(NPC->ghoul2, 0, "*flash");

	//FIXME: use {0, NPC->client->ps.legsYaw, 0}
	trap_G2API_GetBoltMatrix( NPC->ghoul2, 0, 
				genBolt1,
				&boltMatrix, NPC->r.currentAngles, NPC->r.currentOrigin, level.time,
				NULL, NPC->modelScale );

	BG_GiveMeVectorFromMatrix( &boltMatrix, ORIGIN, muzzle1 );

	G_PlayEffectID( G_EffectIndex("bryar/muzzle_flash"), muzzle1, vec3_origin );

	G_Sound( NPC, CHAN_AUTO, G_SoundIndex( "sound/chars/probe/misc/fire" ));

	if (NPC->health)
	{
		CalcEntitySpot( NPC->enemy, SPOT_CHEST, enemy_org1 );
		enemy_org1[0]+= Q_irand(0,10);
		enemy_org1[1]+= Q_irand(0,10);
		VectorSubtract (enemy_org1, muzzle1, delta1);
		vectoangles ( delta1, angleToEnemy1 );
		AngleVectors (angleToEnemy1, forward, vright, up);
	}
	else
	{
		AngleVectors (NPC->r.currentAngles, forward, vright, up);
	}

	missile = CreateMissile( muzzle1, forward, 1600, 10000, NPC, qfalse );

	missile->classname = "bryar_proj";
	missile->s.weapon = WP_BRYAR_PISTOL;

	if ( g_spskill.integer <= 1 )
	{
		missile->damage = 5;
	}
	else 
	{
		missile->damage = 10;
	}


	missile->dflags = DAMAGE_DEATH_KNOCKBACK;
	missile->methodOfDeath = MOD_UNKNOWN;
	missile->clipmask = MASK_SHOT | CONTENTS_LIGHTSABER;

}
开发者ID:ForcePush,项目名称:OJPRPFZ,代码行数:62,代码来源:NPC_AI_ImperialProbe.c


示例4: NPC_Interrogator_Precache

/*
-------------------------
NPC_Interrogator_Precache
-------------------------
*/
void NPC_Interrogator_Precache(gentity_t *self)
{
	G_SoundIndex( "sound/chars/interrogator/misc/torture_droid_lp" );
	G_SoundIndex("sound/chars/mark1/misc/anger.wav");
	G_SoundIndex( "sound/chars/probe/misc/talk");
	G_SoundIndex( "sound/chars/interrogator/misc/torture_droid_inject" );
	G_SoundIndex( "sound/chars/interrogator/misc/int_droid_explo" );
	G_EffectIndex( "explosions/droidexplosion1" );
}
开发者ID:AlexCSilva,项目名称:jediacademy,代码行数:14,代码来源:NPC_AI_Interrogator.c


示例5: NPC_Probe_Precache

void NPC_Probe_Precache(void)
{
	for ( int i = 1; i < 4; i++)
	{
		G_SoundIndex( va( "sound/chars/probe/misc/probetalk%d", i ) );
	}
	G_SoundIndex( "sound/chars/probe/misc/probedroidloop" );
	G_SoundIndex("sound/chars/probe/misc/anger1");
	G_SoundIndex("sound/chars/probe/misc/fire");

	G_EffectIndex( "chunks/probehead" );
	G_EffectIndex( "env/med_explode2" );
	G_EffectIndex( "explosions/probeexplosion1");
	G_EffectIndex( "bryar/muzzle_flash" );

	RegisterItem( FindItemForAmmo( AMMO_BLASTER ));
	RegisterItem( FindItemForWeapon( WP_BRYAR_PISTOL ) );
}
开发者ID:Christian-Barrett,项目名称:OpenJK,代码行数:18,代码来源:AI_ImperialProbe.cpp


示例6: G_ATSTCheckPain

void G_ATSTCheckPain( gentity_t *self, gentity_t *other, const vec3_t point, int damage, int mod,int hitLoc )
{
    int newBolt;

    if ( rand() & 1 )
    {
        G_SoundOnEnt( self, CHAN_LESS_ATTEN, "sound/chars/atst/atst_damaged1" );
    }
    else
    {
        G_SoundOnEnt( self, CHAN_LESS_ATTEN, "sound/chars/atst/atst_damaged2" );
    }

    if ((hitLoc==HL_ARM_LT) && (self->locationDamage[HL_ARM_LT] > LEFT_ARM_HEALTH))
    {
        if (self->locationDamage[hitLoc] >= LEFT_ARM_HEALTH)	// Blow it up?
        {
            newBolt = gi.G2API_AddBolt( &self->ghoul2[self->playerModel], "*flash3" );
            if ( newBolt != -1 )
            {
//				G_PlayEffect( "small_chunks", self->playerModel, self->genericBolt1, self->s.number);
                ATST_PlayEffect( self, self->genericBolt1, "env/med_explode2" );
                G_PlayEffect( G_EffectIndex("blaster/smoke_bolton"), self->playerModel, newBolt, self->s.number, point);
            }

            gi.G2API_SetSurfaceOnOff( &self->ghoul2[self->playerModel], "head_light_blaster_cann", TURN_OFF );
        }
    }
    else if ((hitLoc==HL_ARM_RT) && (self->locationDamage[HL_ARM_RT] > RIGHT_ARM_HEALTH))	// Blow it up?
    {
        if (self->locationDamage[hitLoc] >= RIGHT_ARM_HEALTH)
        {
            newBolt = gi.G2API_AddBolt( &self->ghoul2[self->playerModel], "*flash4" );
            if ( newBolt != -1 )
            {
//				G_PlayEffect( "small_chunks", self->playerModel, self->genericBolt2, self->s.number);
                ATST_PlayEffect( self, self->genericBolt2, "env/med_explode2" );
                G_PlayEffect( G_EffectIndex("blaster/smoke_bolton"), self->playerModel, newBolt, self->s.number, point);
            }

            gi.G2API_SetSurfaceOnOff( &self->ghoul2[self->playerModel], "head_concussion_charger", TURN_OFF );
        }
    }
}
开发者ID:MrSquirrely,项目名称:Jedi-Academy,代码行数:44,代码来源:AI_Atst.cpp


示例7: NPC_Gonk_Precache

void NPC_Gonk_Precache( void ) {
	G_SoundIndex( "sound/chars/gonk/misc/gonktalk1.wav" );
	G_SoundIndex( "sound/chars/gonk/misc/gonktalk2.wav" );

	G_SoundIndex( "sound/chars/gonk/misc/death1.wav" );
	G_SoundIndex( "sound/chars/gonk/misc/death2.wav" );
	G_SoundIndex( "sound/chars/gonk/misc/death3.wav" );

	G_EffectIndex( "env/med_explode" );
}
开发者ID:Arcadiaprime,项目名称:japp,代码行数:10,代码来源:NPC_AI_Droid.cpp


示例8: NPC_R2D2_Precache

/*
-------------------------
NPC_R2D2_Precache
-------------------------
*/
void NPC_R2D2_Precache(void)
{
	for ( int i = 1; i < 4; i++)
	{
		G_SoundIndex( va( "sound/chars/r2d2/misc/r2d2talk0%d.wav", i ) );
	}
	G_SoundIndex( "sound/chars/mark2/misc/mark2_explo" ); // ??
	G_SoundIndex( "sound/chars/r2d2/misc/r2_move_lp.wav" );
	G_EffectIndex( "env/med_explode");
}
开发者ID:Agustinlv,项目名称:BlueHarvest,代码行数:15,代码来源:AI_Droid.cpp


示例9: NPC_Sentry_Precache

/*
-------------------------
NPC_Sentry_Precache
-------------------------
*/
void NPC_Sentry_Precache( void ) {
    int i;

    G_SoundIndex( "sound/chars/sentry/misc/sentry_explo" );
    G_SoundIndex( "sound/chars/sentry/misc/sentry_pain" );
    G_SoundIndex( "sound/chars/sentry/misc/sentry_shield_open" );
    G_SoundIndex( "sound/chars/sentry/misc/sentry_shield_close" );
    G_SoundIndex( "sound/chars/sentry/misc/sentry_hover_1_lp" );
    G_SoundIndex( "sound/chars/sentry/misc/sentry_hover_2_lp" );

    for ( i = 1; i < 4; i++ ) {
        G_SoundIndex( va( "sound/chars/sentry/misc/talk%d", i ) );
    }

    G_EffectIndex( "bryar/muzzle_flash" );
    G_EffectIndex( "env/med_explode" );

    RegisterItem( BG_FindItemForAmmo( AMMO_BLASTER ) );
}
开发者ID:redsaurus,项目名称:japp,代码行数:24,代码来源:NPC_AI_Sentry.c


示例10: G_PlayEffect

// Play an effect bolted onto the muzzle of the specified client
//----------------------------
void G_PlayEffect( const char *name, int clientNum )
{
	gentity_t	*tent;

	tent = G_TempEntity( g_entities[clientNum].currentOrigin, EV_PLAY_MUZZLE_EFFECT );
	tent->s.eventParm = G_EffectIndex( name );
	tent->s.otherEntityNum = clientNum;
	VectorSet( tent->maxs, FX_ENT_RADIUS, FX_ENT_RADIUS, FX_ENT_RADIUS );
	VectorScale( tent->maxs, -1, tent->mins );
}
开发者ID:kikili,项目名称:OpenJK,代码行数:12,代码来源:g_utils.cpp


示例11: NPC_Howler_Pain

/*
-------------------------
NPC_Howler_Pain
-------------------------
*/
void NPC_Howler_Pain( gentity_t *self, gentity_t *inflictor, gentity_t *other, const vec3_t point, int damage, int mod,int hitLoc ) 
{
	if ( !self || !self->NPC )
	{
		return;
	}

	if ( self->NPC->localState != LSTATE_BERZERK )//damage >= 10 )
	{
		self->NPC->stats.aggression += damage;
		self->NPC->localState = LSTATE_WAITING;

		TIMER_Remove( self, "attacking" );

		VectorCopy( self->NPC->lastPathAngles, self->s.angles );

		//if ( self->client->ps.legsAnim == BOTH_GESTURE1 )
		{
			G_StopEffect( G_EffectIndex( "howler/sonic" ), self->playerModel, self->genericBolt1, self->s.number );
		}

		NPC_SetAnim( self, SETANIM_BOTH, BOTH_PAIN1, SETANIM_FLAG_OVERRIDE | SETANIM_FLAG_HOLD );
		TIMER_Set( self, "takingPain", self->client->ps.legsAnimTimer );//2900 );

		if ( self->health > HOWLER_PANIC_HEALTH )
		{//still have some health left
			if ( Q_irand( 0, self->max_health ) > self->health )//FIXME: or check damage?
			{//back off!
				TIMER_Set( self, "standing", -level.time );
				TIMER_Set( self, "running", -level.time );
				TIMER_Set( self, "walking", -level.time );
				TIMER_Set( self, "retreating", Q_irand( 1000, 5000 ) );
			}
			else
			{//go after him!
				TIMER_Set( self, "standing", -level.time );
				TIMER_Set( self, "running", self->client->ps.legsAnimTimer+Q_irand(3000,6000) );
				TIMER_Set( self, "walking", -level.time );
				TIMER_Set( self, "retreating", -level.time );
			}
		}
		else if ( self->NPC )
		{//panic!
			if ( Q_irand( 0, 1 ) )
			{//berzerk
				self->NPC->localState = LSTATE_BERZERK;
			}
			else
			{//flee
				self->NPC->localState = LSTATE_FLEE;
				TIMER_Set( self, "flee", Q_irand( 10000, 30000 ) );
			}
		}
	}
}
开发者ID:Arbixal,项目名称:OpenJK,代码行数:60,代码来源:AI_Howler.cpp


示例12: NPC_Mouse_Precache

void NPC_Mouse_Precache( void ) {
	int	i;

	for ( i = 1; i < 4; i++ ) {
		G_SoundIndex( va( "sound/chars/mouse/misc/mousego%d.wav", i ) );
	}

	G_EffectIndex( "env/small_explode" );
	G_SoundIndex( "sound/chars/mouse/misc/death1" );
	G_SoundIndex( "sound/chars/mouse/misc/mouse_lp" );
}
开发者ID:Arcadiaprime,项目名称:japp,代码行数:11,代码来源:NPC_AI_Droid.cpp


示例13: SP_fx_explosion_trail

//----------------------------------------------------------
void SP_fx_explosion_trail( gentity_t *ent )
{
	// We have to be useable, otherwise we won't spawn in
	if ( !ent->targetname )
	{
		gi.Printf( S_COLOR_RED"ERROR: fx_explosion_trail at %s has no targetname specified\n", vtos( ent->s.origin ));
		G_FreeEntity( ent );
		return;
	}

	// Get our defaults
	G_SpawnString( "fxFile", "env/exp_trail_comp", &ent->fxFile );
	G_SpawnInt( "damage", "128", &ent->damage );
	G_SpawnFloat( "radius", "128", &ent->radius );
	G_SpawnFloat( "speed", "350", &ent->speed );

	// Try and associate an effect file, unfortunately we won't know if this worked or not until the CGAME trys to register it...
	ent->fxID = G_EffectIndex( ent->fxFile );

	if ( ent->fullName )
	{
		G_EffectIndex( ent->fullName );
	}

	if ( ent->model )
	{
		ent->s.modelindex2 = G_ModelIndex( ent->model );
	}

	// Give us a bit of time to spawn in the other entities, since we may have to target one of 'em
	ent->e_ThinkFunc = thinkF_fx_explosion_trail_link; 
	ent->nextthink = level.time + 500;

	// Save our position and link us up!
	G_SetOrigin( ent, ent->s.origin );

	VectorSet( ent->maxs, FX_ENT_RADIUS, FX_ENT_RADIUS, FX_ENT_RADIUS );
	VectorScale( ent->maxs, -1, ent->mins );

	gi.linkentity( ent );
}
开发者ID:LTolosa,项目名称:Jedi-Outcast,代码行数:42,代码来源:g_fx.cpp


示例14: NPC_Mark2_Part_Explode

void NPC_Mark2_Part_Explode( gentity_t *self, int bolt ) {
	if ( bolt >= 0 ) {
		mdxaBone_t	boltMatrix;
		vector3		org, dir;

		trap->G2API_GetBoltMatrix( self->ghoul2, 0,
			bolt,
			&boltMatrix, &self->r.currentAngles, &self->r.currentOrigin, level.time,
			NULL, &self->modelScale );

		BG_GiveMeVectorFromMatrix( &boltMatrix, ORIGIN, &org );
		BG_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_Y, &dir );

		G_PlayEffectID( G_EffectIndex( "env/med_explode2" ), &org, &dir );
		G_PlayEffectID( G_EffectIndex( "blaster/smoke_bolton" ), &org, &dir );
	}

	//G_PlayEffectID( G_EffectIndex("blaster/smoke_bolton"), self->playerModel, bolt, self->s.number);

	self->count++;	// Count of pods blown off
}
开发者ID:Arcadiaprime,项目名称:japp,代码行数:21,代码来源:NPC_AI_Mark2.cpp


示例15: Boba_Precache

void Boba_Precache( void )
{
	G_SoundIndex( "sound/chars/boba/bf_blast-off.wav" );
	G_SoundIndex( "sound/chars/boba/bf_jetpack_lp.wav" );
	G_SoundIndex( "sound/chars/boba/bf_land.wav" );
	G_SoundIndex( "sound/weapons/boba/bf_flame.mp3" );
	G_SoundIndex( "sound/player/footsteps/boot1" );
	G_SoundIndex( "sound/player/footsteps/boot2" );
	G_SoundIndex( "sound/player/footsteps/boot3" );
	G_SoundIndex( "sound/player/footsteps/boot4" );
	G_EffectIndex( "boba/jetSP" );
	G_EffectIndex( "boba/fthrw" );
	G_EffectIndex( "volumetric/black_smoke" );
	G_EffectIndex( "chunks/dustFall" );

	AverageEnemyDirectionSamples = 0;
	VectorClear(AverageEnemyDirection);
	BobaHadDeathScript			= false;
	BobaActive					= true;
	BobaFootStepCount			= 0;
}
开发者ID:Christian-Barrett,项目名称:OpenJK,代码行数:21,代码来源:AI_BobaFett.cpp


示例16: NPC_Mark1_Part_Explode

/*
-------------------------
NPC_Mark1_Part_Explode
-------------------------
*/
void NPC_Mark1_Part_Explode( gentity_t *self, int bolt )
{
	if ( bolt >=0 )
	{
		mdxaBone_t	boltMatrix;
		vec3_t		org, dir;

		trap_G2API_GetBoltMatrix( self->ghoul2, 0, 
					bolt,
					&boltMatrix, self->r.currentAngles, self->r.currentOrigin, level.time,
					NULL, self->modelScale );

		BG_GiveMeVectorFromMatrix( &boltMatrix, ORIGIN, org );
		BG_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_Y, dir );

		G_PlayEffectID( G_EffectIndex("env/med_explode2"), org, dir );

		G_PlayEffectID( G_EffectIndex("blaster/smoke_bolton"), org, dir );
	}

}
开发者ID:NoahBennet,项目名称:base_enhanced,代码行数:26,代码来源:NPC_AI_Mark1.c


示例17: TieBomberThink

void TieBomberThink( gentity_t *self )
{
	// NOTE: Lerp2Angles will think this thinkfunc if the model is a misc_model_breakable. Watchout
	// for that in a script (try to just use ROFF's?).

	// Stop thinking, you're dead.
	if ( self->health <= 0 )
	{
		return;
	}

	// Needed every think...
	self->nextthink = level.time + FRAMETIME;

	gentity_t *player = &g_entities[0];
	vec3_t	playerDir;
	float	playerDist;
	
	//use player eyepoint
	VectorSubtract( player->currentOrigin, self->currentOrigin, playerDir );
	playerDist = VectorNormalize( playerDir );

	// Time to attack?
	if ( player->health > 0 && playerDist < MIN_PLAYER_DIST && self->attackDebounceTime < level.time )  
	{
		// Doesn't matter what model gets loaded here, as long as it exists.
		// It's only used as a point on to which the falling effect for the bomb
		// can be attached to (kinda inefficient, I know).
		char name1[200] = "models/players/gonk/model.glm";
		gentity_t *bomb = G_CreateObject( self, self->s.pos.trBase, self->s.apos.trBase, 0, 0, TR_GRAVITY, 0 );
		bomb->s.modelindex = G_ModelIndex( name1 );
		gi.G2API_InitGhoul2Model( bomb->ghoul2, name1, bomb->s.modelindex, NULL_HANDLE, NULL_HANDLE, 0, 0);
		bomb->s.radius = 50;
		bomb->s.eFlags |= EF_NODRAW;

		// Make the bombs go forward in the bombers direction a little.
		vec3_t	fwd, rt;
		AngleVectors( self->currentAngles, fwd, rt, NULL );
		rt[2] -= 0.5f;
		VectorMA( bomb->s.pos.trBase, -30.0, rt, bomb->s.pos.trBase );
		VectorScale( fwd, 300, bomb->s.pos.trDelta );
		SnapVector( bomb->s.pos.trDelta );		// save net bandwidth

		// Start the effect.
		G_PlayEffect( G_EffectIndex( "ships/tiebomber_bomb_falling" ), bomb->playerModel, gi.G2API_AddBolt( &bomb->ghoul2[0], "model_root" ), bomb->s.number, bomb->currentOrigin, 1000, qtrue );

		// Set the tie bomb to have a touch function, so when it hits the ground (or whatever), there's a nice 'boom'.
		bomb->e_TouchFunc = touchF_TouchTieBomb;

		self->attackDebounceTime = level.time + 1000;
	}
}
开发者ID:Almightygir,项目名称:OpenJK,代码行数:52,代码来源:g_breakable.cpp


示例18: SP_fx_target_beam

//------------------------------------------
void SP_fx_target_beam( gentity_t *ent )
{
	G_SetOrigin( ent, ent->s.origin );

	ent->speed	*= 1000;
	ent->wait	*= 1000;
	ent->random *= 1000;

	if ( ent->speed < FRAMETIME )
	{
		ent->speed = FRAMETIME;
	}

	G_SpawnInt( "damage", "0", &ent->damage );
	G_SpawnString( "fxFile", "env/targ_beam", &ent->fxFile );

	if ( ent->spawnflags & 16 ) // NO_IMPACT FX
	{
		ent->delay = 0;
	}
	else
	{
		G_SpawnString( "fxFile2", "env/targ_beam_impact", &ent->fullName );
		ent->delay = G_EffectIndex( ent->fullName );
	}

	ent->fxID = G_EffectIndex( ent->fxFile );

	ent->activator = ent;
	ent->owner	= NULL;

	ent->e_ThinkFunc = thinkF_fx_target_beam_link;
	ent->nextthink	= level.time + START_TIME_LINK_ENTS;

	VectorSet( ent->maxs, FX_ENT_RADIUS, FX_ENT_RADIUS, FX_ENT_RADIUS );
	VectorScale( ent->maxs, -1, ent->mins );

	gi.linkentity( ent );
}
开发者ID:LTolosa,项目名称:Jedi-Outcast,代码行数:40,代码来源:g_fx.cpp


示例19: G_MissileBounceEffect

void G_MissileBounceEffect( gentity_t *ent, vector3 *org, vector3 *dir ) {
	//FIXME: have an EV_BOUNCE_MISSILE event that checks the s.weapon and does the appropriate effect
	switch ( ent->s.weapon ) {
	case WP_BOWCASTER:
		G_PlayEffectID( G_EffectIndex( "bowcaster/deflect" ), &ent->r.currentOrigin, dir );
		break;
	case WP_BLASTER:
	case WP_BRYAR_PISTOL:
		G_PlayEffectID( G_EffectIndex( "blaster/deflect" ), &ent->r.currentOrigin, dir );
		break;
	default:
	{
		gentity_t *te = G_TempEntity( org, EV_SABER_BLOCK );
		VectorCopy( org, &te->s.origin );
		VectorCopy( dir, &te->s.angles );
		te->s.eventParm = 0;
		te->s.weapon = 0;//saberNum
		te->s.legsAnim = 0;//bladeNum
	}
		break;
	}
}
开发者ID:Arcadiaprime,项目名称:japp,代码行数:22,代码来源:g_missile.cpp


示例20: NPC_GM_StartLaser

void NPC_GM_StartLaser( void )
{
	if ( !NPC->lockCount )
	{//haven't already started a laser attack
		//warm up for the beam attack
		TIMER_Set( NPC, "beamDelay", NPC->client->ps.torsoTimer );
		TIMER_Set( NPC, "attackDelay", NPC->client->ps.torsoTimer+3000 );
		NPC->lockCount = 1;
		//turn on warmup effect
		G_PlayEffectID( G_EffectIndex("galak/beam_warmup"), NPC->r.currentOrigin, vec3_origin );
		G_SoundOnEnt( NPC, CHAN_AUTO, "sound/weapons/galak/lasercharge.wav" );
	}
}
开发者ID:mehmehsomeone,项目名称:OpenRP,代码行数:13,代码来源:NPC_AI_GalakMech.cpp



注:本文中的G_EffectIndex函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ G_Error函数代码示例发布时间:2022-05-30
下一篇:
C++ G_ENUM_CLASS函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap