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

C++ G_FindConfigstringIndex函数代码示例

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

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



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

示例1: G_StringIndex

int G_StringIndex( const char* string ) {
	return G_FindConfigstringIndex( string, CS_STRINGS, MAX_CSSTRINGS, qtrue );
}
开发者ID:acqu,项目名称:wet-sdk-plus,代码行数:3,代码来源:g_utils.c


示例2: FinishSpawningItem

/*
================
FinishSpawningItem

Traces down to find where an item should rest, instead of letting them
free fall from their spawn points
================
*/
void FinishSpawningItem( gentity_t *ent ) {
	trace_t tr;
	vec3_t dest;
	vec3_t maxs;

	if ( ent->spawnflags & 1 ) { // suspended
		VectorSet( ent->r.mins, -ITEM_RADIUS, -ITEM_RADIUS, -ITEM_RADIUS );
		VectorSet( ent->r.maxs, ITEM_RADIUS, ITEM_RADIUS, ITEM_RADIUS );
		VectorCopy( ent->r.maxs, maxs );
	} else
	{
		// Rafael
		// had to modify this so that items would spawn in shelves
		VectorSet( ent->r.mins, -ITEM_RADIUS, -ITEM_RADIUS, 0 );
		VectorSet( ent->r.maxs, ITEM_RADIUS, ITEM_RADIUS, ITEM_RADIUS );
		VectorCopy( ent->r.maxs, maxs );
		maxs[2] /= 2;
	}

	ent->r.contents = CONTENTS_TRIGGER | CONTENTS_ITEM;
	ent->touch = Touch_Item_Auto;
	ent->s.eType = ET_ITEM;
	ent->s.modelindex = ent->item - bg_itemlist;        // store item number in modelindex

	ent->s.otherEntityNum2 = 0;     // DHM - Nerve :: takes modelindex2's place in signaling a dropped item
//----(SA)	we don't use this (yet, anyway) so I'm taking it so you can specify a model for treasure items and clipboards
//	ent->s.modelindex2 = 0; // zero indicates this isn't a dropped item
	if ( ent->model ) {
		ent->s.modelindex2 = G_ModelIndex( ent->model );
	}


	// if clipboard, add the menu name string to the client's configstrings
	if ( ent->item->giType == IT_CLIPBOARD ) {
		if ( !ent->message ) {
			ent->s.density = G_FindConfigstringIndex( "clip_test", CS_CLIPBOARDS, MAX_CLIPBOARD_CONFIGSTRINGS, qtrue );
		} else {
			ent->s.density = G_FindConfigstringIndex( ent->message, CS_CLIPBOARDS, MAX_CLIPBOARD_CONFIGSTRINGS, qtrue );
		}

		ent->touch = Touch_Item;    // no auto-pickup, only activate
	} else if ( ent->item->giType == IT_HOLDABLE )      {
		if ( ent->item->giTag >= HI_BOOK1 && ent->item->giTag <= HI_BOOK3 ) {
			G_FindConfigstringIndex( va( "hbook%d", ent->item->giTag - HI_BOOK1 ), CS_CLIPBOARDS, MAX_CLIPBOARD_CONFIGSTRINGS, qtrue );
		}
		ent->touch = Touch_Item;    // no auto-pickup, only activate
	}


//----(SA)	added
	if ( ent->item->giType == IT_TREASURE ) {
		ent->touch = Touch_Item;    // no auto-pickup, only activate
	}
//----(SA)	end

	// using an item causes it to respawn
	ent->use = Use_Item;

//----(SA) moved this up so it happens for suspended items too (and made it a function)
	G_SetAngle( ent, ent->s.angles );

	if ( ent->spawnflags & 1 ) {    // suspended
		G_SetOrigin( ent, ent->s.origin );
	} else {

		VectorSet( dest, ent->s.origin[0], ent->s.origin[1], ent->s.origin[2] - 4096 );
		trap_Trace( &tr, ent->s.origin, ent->r.mins, maxs, dest, ent->s.number, MASK_SOLID );

		if ( tr.startsolid ) {
			vec3_t temp;

			VectorCopy( ent->s.origin, temp );
			temp[2] -= ITEM_RADIUS;

			VectorSet( dest, ent->s.origin[0], ent->s.origin[1], ent->s.origin[2] - 4096 );
			trap_Trace( &tr, temp, ent->r.mins, maxs, dest, ent->s.number, MASK_SOLID );
		}

#if 0
		// drop to floor
		VectorSet( dest, ent->s.origin[0], ent->s.origin[1], ent->s.origin[2] - 4096 );
		trap_Trace( &tr, ent->s.origin, ent->r.mins, maxs, dest, ent->s.number, MASK_SOLID );
#endif
		if ( tr.startsolid ) {
			G_Printf( "FinishSpawningItem: %s startsolid at %s\n", ent->classname, vtos( ent->s.origin ) );
			G_FreeEntity( ent );
			return;
		}

		// allow to ride movers
		ent->s.groundEntityNum = tr.entityNum;

//.........这里部分代码省略.........
开发者ID:Justasic,项目名称:RTCW-MP,代码行数:101,代码来源:g_items.c


示例3: G_CharacterIndex

int G_CharacterIndex( const char *name ) {
	return G_FindConfigstringIndex (name, CS_CHARACTERS, MAX_CHARACTERS, qtrue);
}
开发者ID:acqu,项目名称:wet-sdk-plus,代码行数:3,代码来源:g_utils.c


示例4: G_ParticleSystemIndex

//TA: added ParticleSystemIndex
int G_ParticleSystemIndex( char *name )
{
  return G_FindConfigstringIndex( name, CS_PARTICLE_SYSTEMS, MAX_GAME_PARTICLE_SYSTEMS, qtrue );
}
开发者ID:AlienHoboken,项目名称:Tremulous-X-Server-Gold,代码行数:5,代码来源:g_utils.c


示例5: G_SkinIndex

int G_SkinIndex( const char *name ) {
	return G_FindConfigstringIndex (name, CS_SKINS, MAX_CS_SKINS, qtrue);
}
开发者ID:acqu,项目名称:wet-sdk-plus,代码行数:3,代码来源:g_utils.c


示例6: G_BSPIndex

int G_BSPIndex( char *name )
{
	return G_FindConfigstringIndex (name, CS_BSP_MODELS, MAX_SUB_BSP, qtrue);
}
开发者ID:kikili,项目名称:OpenJK,代码行数:4,代码来源:g_utils.cpp


示例7: G_SoundIndex

int G_SoundIndex( const char *name ) {
	char stripped[MAX_QPATH];
	COM_StripExtension(name, stripped);
	
	return G_FindConfigstringIndex (stripped, CS_SOUNDS, MAX_SOUNDS, qtrue);
}
开发者ID:blaenk,项目名称:jedioutcast,代码行数:6,代码来源:g_utils.cpp


示例8: G_LocationIndex

int G_LocationIndex( const char *name )
{
	return G_FindConfigstringIndex( name, CS_LOCATIONS, MAX_LOCATIONS, qtrue );
}
开发者ID:Foe-of-Eternity,项目名称:Unvanquished,代码行数:4,代码来源:g_utils.cpp


示例9: G_ReverbEffectIndex

int G_ReverbEffectIndex( const char *name )
{
	return G_FindConfigstringIndex( name, CS_REVERB_EFFECTS+1, MAX_REVERB_EFFECTS-1, qtrue );
}
开发者ID:Foe-of-Eternity,项目名称:Unvanquished,代码行数:4,代码来源:g_utils.cpp


示例10: G_GradingTextureIndex

/**
 * searches for a the grading texture with the given name among the configstrings and returns the index
 * if it wasn't found it will add the texture to the configstrings, send these to the client and return the new index
 *
 * the first one at CS_GRADING_TEXTURES is always the global one, so we start searching from CS_GRADING_TEXTURES+1
 */
int G_GradingTextureIndex( const char *name )
{
	return G_FindConfigstringIndex( name, CS_GRADING_TEXTURES+1, MAX_GRADING_TEXTURES-1, qtrue );
}
开发者ID:Foe-of-Eternity,项目名称:Unvanquished,代码行数:10,代码来源:g_utils.cpp


示例11: G_ModelIndex

int G_ModelIndex( char *name ) {
	return G_FindConfigstringIndex (name, CS_MODELS, MAX_MODELS, qtrue);
}
开发者ID:leakcim1324,项目名称:ETrun,代码行数:3,代码来源:g_utils.c


示例12: G_ShaderIndex

int G_ShaderIndex( char *name ) {
	return G_FindConfigstringIndex (name, CS_SHADERS, MAX_CS_SHADERS, qtrue);
}
开发者ID:acqu,项目名称:wet-sdk-plus,代码行数:3,代码来源:g_utils.c


示例13: G_SoundIndex

int G_SoundIndex( const char *name ) {
	return G_FindConfigstringIndex (name, CS_SOUNDS, MAX_SOUNDS, qtrue);
}
开发者ID:leakcim1324,项目名称:ETrun,代码行数:3,代码来源:g_utils.c


示例14: SP_CreateRain

void SP_CreateRain( gentity_t *ent )
{ 
	// Different Types Of Rain
	//-------------------------
	if (ent->spawnflags & 1)
	{
		G_FindConfigstringIndex("lightrain", CS_WORLD_FX, MAX_WORLD_FX, qtrue);
	}
	else if (ent->spawnflags & 2)
	{
		G_FindConfigstringIndex("rain", CS_WORLD_FX, MAX_WORLD_FX, qtrue);
	}
	else if (ent->spawnflags & 4)
	{
		G_FindConfigstringIndex("heavyrain", CS_WORLD_FX, MAX_WORLD_FX, qtrue);

		// Automatically Get Heavy Fog
		//-----------------------------
		G_FindConfigstringIndex("heavyrainfog", CS_WORLD_FX, MAX_WORLD_FX, qtrue );

		// Automatically Get Lightning & Thunder
		//---------------------------------------
		ent->spawnflags |= 64;
	}
	else if (ent->spawnflags & 8)
	{
		G_EffectIndex( "world/acid_fizz" );
		G_FindConfigstringIndex("acidrain", CS_WORLD_FX, MAX_WORLD_FX, qtrue);
	}


	// OUTSIDE SHAKE
	//===============
	if (ent->spawnflags & 16)
	{
		G_FindConfigstringIndex("outsideShake", CS_WORLD_FX, MAX_WORLD_FX, qtrue);
	}

	// MISTY FOG
	//===========
	if (ent->spawnflags & 32)
	{
		G_FindConfigstringIndex("fog", CS_WORLD_FX, MAX_WORLD_FX, qtrue );
	}

	// LIGHTNING
	//===========
	if (ent->spawnflags & 64)
	{
		G_SoundIndex("sound/ambience/thunder1");
		G_SoundIndex("sound/ambience/thunder2");
		G_SoundIndex("sound/ambience/thunder3");
		G_SoundIndex("sound/ambience/thunder4");
		G_SoundIndex("sound/ambience/thunder_close1");
		G_SoundIndex("sound/ambience/thunder_close2");
		G_EffectIndex( "env/huge_lightning" );
		ent->e_ThinkFunc = thinkF_fx_rain_think;
		ent->nextthink = level.time + Q_irand(4000, 8000);
		
		if (!G_SpawnVector( "flashcolor", "200 200 200", ent->pos3))
		{
			VectorSet(ent->pos3, 200, 200, 200);
		}
		VectorClear(ent->pos2);		// the "off" color

		G_SpawnInt("flashdelay",    "12000",	&ent->delay);
		G_SpawnInt("chanceflicker", "2",		&ent->attackDebounceTime);
		G_SpawnInt("chancesound",   "3",		&ent->pushDebounceTime);
		G_SpawnInt("chanceeffect",  "4",		&ent->aimDebounceTime);
	}
}
开发者ID:Hasimir,项目名称:jedi-academy-1,代码行数:71,代码来源:g_fx.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ G_FreeEdict函数代码示例发布时间:2022-05-30
下一篇:
C++ G_Find函数代码示例发布时间: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