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

C++ setmodel函数代码示例

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

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



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

示例1: RegenFlags

// show/hide flag
void RegenFlags( qbool yes )
{
	gedict_t *flag;

	flag = find( world, FOFCLSN, "item_flag_team1" );

	if ( flag ) {
		if ( !yes ) {
			flag->s.v.touch = (func_t) SUB_Null;
			setmodel( flag, "" );
		}
		else
			RegenFlag( flag );
	}

	flag = find( world, FOFCLSN, "item_flag_team2" );

	if ( flag ) {
		if ( !yes ) {
			flag->s.v.touch = (func_t) SUB_Null;
			setmodel( flag, "" );
		}
		else
			RegenFlag( flag );
	}
}
开发者ID:JosephPecoraro,项目名称:ktx,代码行数:27,代码来源:ctf.c


示例2: spawn_item_flag

void spawn_item_flag()
{
	if ( k_ctf_custom_models )
		setmodel( self, "progs/flag.mdl" );

	self->s.v.noise = "misc/flagtk.wav";
	self->s.v.noise1 = "doors/runetry.wav";
	setsize( self, -16, -16, 0, 16, 16, 74);
	self->mdl = self->s.v.model;
	self->s.v.flags = FL_ITEM;
	self->s.v.solid = SOLID_TRIGGER;
	self->s.v.movetype = MOVETYPE_TOSS;
	SetVector( self->s.v.velocity, 0, 0, 0 );
	self->s.v.origin[2] += 6;
	self->s.v.think = (func_t) FlagThink;
	self->s.v.touch = (func_t) FlagTouch;
	self->s.v.nextthink = g_globalvars.time + 0.1;
	self->cnt = FLAG_AT_BASE;
	self->cnt2 = 0.0;
	VectorCopy( self->s.v.angles, self->mangle );
	self->s.v.effects = (int) self->s.v.effects | EF_DIMLIGHT;

	if ( !droptofloor( self ) )
		ent_remove( self );
	else
		VectorCopy( self->s.v.origin, self->s.v.oldorigin );

	if ( !isCTF() )
	{
		setmodel( self, "" );
		self->s.v.touch = (func_t) SUB_Null;
	}
}
开发者ID:JosephPecoraro,项目名称:ktx,代码行数:33,代码来源:ctf.c


示例3: while

// create a flame of a given type, maintaining the count for each type
gedict_t *FlameSpawn( int type, gedict_t * p_owner )
{
	if ( tf_data.cb_prematch_time > g_globalvars.time )
		return world;

/*	if ( type != 1 && !tf_data.lan_mode )
		return world;*/

	num_world_flames = num_world_flames + 1;
	while ( num_world_flames > FLAME_MAXWORLDNUM )
	{
		if ( !RemoveFlameFromQueue( type ) )
			return world;
	}
	newmis = spawn(  );
	// to keep track of the number of each type of flames
	switch ( type )
	{
	case 1:
		newmis->s.v.movetype = MOVETYPE_FLYMISSILE;
		newmis->s.v.solid = SOLID_BBOX;
		newmis->s.v.effects = 8;
		newmis->flame_id = "1";
		setmodel( newmis, "progs/flame2.mdl" );
		setsize( newmis, 0, 0, 0, 0, 0, 0 );
		break;
	case 2:
		newmis->s.v.movetype = MOVETYPE_BOUNCE;
		newmis->s.v.solid = SOLID_BBOX;
		newmis->flame_id = "2";
		setmodel( newmis, "progs/flame2.mdl" );
		newmis->s.v.frame = 1;
		setsize( newmis, 0, 0, 0, 0, 0, 0 );
		break;
	case 3:
		newmis->s.v.movetype = MOVETYPE_FLYMISSILE;
		newmis->s.v.solid = SOLID_BBOX;
		newmis->flame_id = "3";
		setmodel( newmis, "progs/flame2.mdl" );
		setsize( newmis, 0, 0, 0, 0, 0, 0 );
		break;
	case 4:
		newmis->s.v.movetype = MOVETYPE_FLYMISSILE;
		newmis->flame_id = "4";
		newmis->s.v.frame = 1;
		newmis->s.v.solid = SOLID_BBOX;
		setmodel( newmis, "progs/flame2.mdl" );
		setsize( newmis, 0, 0, 0, 0, 0, 0 );
		break;
	}
	newmis->s.v.owner = EDICT_TO_PROG( p_owner );
	return newmis;
}
开发者ID:MrPnut,项目名称:QHome,代码行数:54,代码来源:pyro.c


示例4: SG_Static

void SG_Static(  )
{
    if ( self->s.v.health == 0 )
    {
        setmodel( self, "progs/turrgun.mdl" );
        self->s.v.health = -1;
    } else
    {
        setmodel( self, "" );
        self->s.v.health = 0;
    }
    self->s.v.nextthink = g_globalvars.time + 0.5;
}
开发者ID:angeld29,项目名称:TF2003-qvm,代码行数:13,代码来源:sentry.c


示例5: viewthing

void viewthing()
{
	self->s.v.movetype = MOVETYPE_NONE;
	self->s.v.solid = SOLID_NOT;
	trap_precache_model( "progs/player.mdl" );
	setmodel( self, "progs/player.mdl" );
}
开发者ID:deurk,项目名称:ktx,代码行数:7,代码来源:misc.c


示例6: fire_fly

void fire_fly()
{
	gedict_t       *fireball;

	fireball = spawn();
	fireball->s.v.solid = SOLID_TRIGGER;
	fireball->s.v.movetype = MOVETYPE_TOSS;
	fireball->isMissile = true; // well, you can really treat fireball as missilie, nothing bad gonna heppen.
	SetVector( fireball->s.v.velocity,
		   ( g_random() * 100 ) - 50,
		   ( g_random() * 100 ) - 50, self->speed + ( g_random() * 200 ) );

	fireball->classname = "fireball";

	setmodel( fireball, "progs/lavaball.mdl" );
	setsize( fireball, 0, 0, 0, 0, 0, 0 );
	setorigin( fireball, PASSVEC3( self->s.v.origin ) );

	fireball->s.v.nextthink = g_globalvars.time + 5;
	fireball->think = ( func_t ) SUB_Remove;
	fireball->touch = ( func_t ) fire_touch;

	self->s.v.nextthink = g_globalvars.time + ( g_random() * 5 ) + 3;
	self->think = ( func_t ) fire_fly;
}
开发者ID:deurk,项目名称:ktx,代码行数:25,代码来源:misc.c


示例7: SP_light_flame_small_white

/*QUAKED light_flame_small_white (0 1 0) (-10 -10 -40) (10 10 40) START_OFF
Small white flame ball
*/
void SP_light_flame_small_white()
{
	trap_precache_model( "progs/flame2.mdl" );
	setmodel( self, "progs/flame2.mdl" );
	FireAmbient( self );
	makestatic( self );
}
开发者ID:deurk,项目名称:ktx,代码行数:10,代码来源:misc.c


示例8: SP_light_torch_small_walltorch

/*QUAKED light_torch_small_walltorch (0 .5 0) (-10 -10 -20) (10 10 20)
Short wall torch
Default light value is 200
Default style is 0
*/
void SP_light_torch_small_walltorch()
{
	trap_precache_model( "progs/flame.mdl" );
	setmodel( self, "progs/flame.mdl" );
	FireAmbient( self );
	makestatic( self );
}
开发者ID:deurk,项目名称:ktx,代码行数:12,代码来源:misc.c


示例9: LaunchLaser

void LaunchLaser( vec3_t org, vec3_t vec )
{

	if ( !strcmp( self->s.v.classname, "monster_enforcer" ) )
		sound( self, CHAN_WEAPON, "enforcer/enfire.wav", 1, ATTN_NORM );

	normalize( vec, vec );

	newmis = spawn(  );
	g_globalvars.newmis = EDICT_TO_PROG( newmis );
	newmis->s.v.owner = EDICT_TO_PROG( self );
	newmis->s.v.movetype = MOVETYPE_FLY;
	newmis->s.v.solid = SOLID_BBOX;
	newmis->s.v.effects = EF_DIMLIGHT;

	setmodel( newmis, "progs/laser.mdl" );
	setsize( newmis, 0, 0, 0, 0, 0, 0 );

	setorigin( newmis, PASSVEC3( org ) );

	//newmis->s.v.velocity = vec * 600;
	VectorScale( vec, 600, newmis->s.v.velocity );

	vectoangles( newmis->s.v.velocity, newmis->s.v.angles );

	newmis->s.v.nextthink = g_globalvars.time + 5;
	newmis->s.v.think = ( func_t ) SUB_Remove;
	newmis->s.v.touch = ( func_t ) Laser_Touch;
}
开发者ID:angeld29,项目名称:TF2003-qvm,代码行数:29,代码来源:misc.c


示例10: DeathBubblesSpawn

void DeathBubblesSpawn()
{
	gedict_t       *bubble;

	if ( PROG_TO_EDICT( self->s.v.owner )->s.v.waterlevel != 3 )
		return;
	bubble = spawn();
	setmodel( bubble, "progs/s_bubble.spr" );
	setorigin( bubble, PROG_TO_EDICT( self->s.v.owner )->s.v.origin[0],
			PROG_TO_EDICT( self->s.v.owner )->s.v.origin[1],
			PROG_TO_EDICT( self->s.v.owner )->s.v.origin[2] + 24 );

	bubble->s.v.movetype = MOVETYPE_NOCLIP;
	bubble->s.v.solid = SOLID_NOT;

	SetVector( bubble->s.v.velocity, 0, 0, 15 );

	bubble->s.v.nextthink = g_globalvars.time + 0.5;
	bubble->think = ( func_t ) bubble_bob;
	bubble->classname = "bubble";
	bubble->s.v.frame = 0;
	bubble->cnt = 0;
	
	setsize( bubble, -8, -8, -8, 8, 8, 8 );

	self->s.v.nextthink = g_globalvars.time + 0.1;
	self->think = ( func_t ) DeathBubblesSpawn;
	self->air_finished = self->air_finished + 1;

	if ( self->air_finished >= self->bubble_count )
		ent_remove( self );
}
开发者ID:deurk,项目名称:ktx,代码行数:32,代码来源:player.c


示例11: show_specs_wizards

void show_specs_wizards ()
{
	gedict_t *p;

	for( p = world; (p = find( p, FOFCLSN, "spectator_wizard" )); )
		setmodel (p, "progs/wizard.mdl");
}
开发者ID:devrac,项目名称:ktx,代码行数:7,代码来源:spectate.c


示例12: SP_func_ctf_wall

// would love to know what a ctf wall is :O!
void SP_func_ctf_wall()
{
	SetVector( self->s.v.angles, 0, 0, 0 );
	self->s.v.movetype = MOVETYPE_PUSH;
	self->s.v.solid = SOLID_BSP;
	setmodel( self, self->s.v.model ); 
}
开发者ID:JosephPecoraro,项目名称:ktx,代码行数:8,代码来源:ctf.c


示例13: fire_fly

void fire_fly(  )
{
	gedict_t *fireball;

	fireball = spawn(  );
	newmis = fireball;
	g_globalvars.newmis = EDICT_TO_PROG( newmis );
	fireball->s.v.solid = SOLID_TRIGGER;
	fireball->s.v.movetype = MOVETYPE_TOSS;
	SetVector( fireball->s.v.velocity,
		   ( g_random(  ) * 100 ) - 50, ( g_random(  ) * 100 ) - 50, self->speed + ( g_random(  ) * 200 ) );

	fireball->s.v.classname = "fireball";

	setmodel( fireball, "progs/lavaball.mdl" );
	setsize( fireball, 0, 0, 0, 0, 0, 0 );
	setorigin( fireball, PASSVEC3( self->s.v.origin ) );

	fireball->s.v.nextthink = g_globalvars.time + 5;
	fireball->s.v.think = ( func_t ) SUB_Remove;
	fireball->s.v.touch = ( func_t ) fire_touch;

	self->s.v.nextthink = g_globalvars.time + ( g_random(  ) * 5 ) + 3;
	self->s.v.think = ( func_t ) fire_fly;
}
开发者ID:angeld29,项目名称:TF2003-qvm,代码行数:25,代码来源:misc.c


示例14: DropRing

void DropRing( float timeleft )
{
	gedict_t       *item;

	item = spawn();
	VectorCopy( self->s.v.origin, item->s.v.origin );
	//item.origin = self.origin;

	item->s.v.velocity[2] = 300;
	item->s.v.velocity[0] = -100 + ( g_random() * 200 );
	item->s.v.velocity[1] = -100 + ( g_random() * 200 );

	item->s.v.flags = FL_ITEM;
	item->s.v.solid = SOLID_TRIGGER;
	item->s.v.movetype = MOVETYPE_TOSS;
	item->s.v.noise = "items/inv1.wav";

	setmodel( item, "progs/invisibl.mdl" );
	setsize( item, -16, -16, -24, 16, 16, 32 );

	item->cnt = g_globalvars.time + timeleft;
	item->s.v.touch = ( func_t ) r_touch;
	item->s.v.nextthink = g_globalvars.time + timeleft;	// remove after 30 seconds
	item->s.v.think = ( func_t ) SUB_Remove;
}
开发者ID:angeld29,项目名称:qwprogs-qvm,代码行数:25,代码来源:items.c


示例15: SpawnMeatSpray

/*
================
SpawnMeatSpray
================
*/
void SpawnMeatSpray( vec3_t org, vec3_t vel )
{
	gedict_t       *missile;

	//vec3_t  org;

	missile = spawn();
	missile->s.v.owner = EDICT_TO_PROG( self );
	missile->s.v.movetype = MOVETYPE_BOUNCE;
	missile->s.v.solid = SOLID_NOT;

	makevectors( self->s.v.angles );

	VectorCopy( vel, missile->s.v.velocity );
// missile->s.v.velocity = vel;
	missile->s.v.velocity[2] = missile->s.v.velocity[2] + 250 + 50 * g_random();

	SetVector( missile->s.v.avelocity, 3000, 1000, 2000 );
// missile.avelocity = '3000 1000 2000';

// set missile duration
	missile->s.v.nextthink = g_globalvars.time + 1;
	missile->s.v.think = ( func_t ) SUB_Remove;

	setmodel( missile, "progs/zom_gib.mdl" );
	setsize( missile, 0, 0, 0, 0, 0, 0 );
	setorigin( missile, PASSVEC3( org ) );
}
开发者ID:stayoutEE,项目名称:qwprogs-qvm,代码行数:33,代码来源:weapons.c


示例16: bubble_split

void bubble_split(  )
{
	gedict_t *bubble;

	bubble = spawn(  );
	setmodel( bubble, "progs/s_bubble.spr" );
	setorigin( bubble, PASSVEC3( self->s.v.origin ) );

	bubble->s.v.movetype = MOVETYPE_NOCLIP;
	bubble->s.v.solid = SOLID_NOT;

	VectorCopy( self->s.v.velocity, bubble->s.v.velocity );

	bubble->s.v.nextthink = g_globalvars.time + 0.5;
	bubble->s.v.think = ( func_t ) bubble_bob;
	bubble->s.v.touch = ( func_t ) bubble_remove;
	bubble->s.v.classname = "bubble";
	bubble->s.v.frame = 1;
	bubble->cnt = 10;

	setsize( bubble, -8, -8, -8, 8, 8, 8 );

	self->s.v.frame = 1;
	self->cnt = 10;

	if ( self->s.v.waterlevel != 3 )
		ent_remove( self );
}
开发者ID:angeld29,项目名称:TF2003-qvm,代码行数:28,代码来源:misc.c


示例17: SP_misc_explobox2

void SP_misc_explobox2(  )
{
	float   oldz;

	if ( !CheckExistence(  ) )
	{
		dremove( self );
		return;
	}

	self->s.v.solid = SOLID_BBOX;
	self->s.v.movetype = MOVETYPE_NONE;

	trap_precache_model( "maps/b_exbox2.bsp" );
	setmodel( self, "maps/b_exbox2.bsp" );
	setsize( self, 0, 0, 0, 32, 32, 32 );
	trap_precache_sound( "weapons/r_exp3.wav" );

	self->s.v.health = 20;
	self->th_die = barrel_explode;
	self->s.v.takedamage = DAMAGE_AIM;

	self->s.v.origin[2] += 2;
	oldz = self->s.v.origin[2];

	droptofloor( self );

	if ( oldz - self->s.v.origin[2] > 250 )
	{
		G_dprintf( "item fell out of level at '%f %f %f'\n", PASSVEC3( self->s.v.origin ) );
		ent_remove( self );
	}
}
开发者ID:angeld29,项目名称:TF2003-qvm,代码行数:33,代码来源:misc.c


示例18: SP_func_illusionary

/*QUAKED func_illusionary (0 .5 .8) ?
A simple entity that looks solid but lets you walk through it.
*/
void SP_func_illusionary()
{
	SetVector( self->s.v.angles, 0, 0, 0 );
	self->s.v.movetype = MOVETYPE_NONE;
	self->s.v.solid = SOLID_NOT;
	setmodel( self, self->model );
	makestatic( self );
}
开发者ID:deurk,项目名称:ktx,代码行数:11,代码来源:misc.c


示例19: SP_light_flame_large_yellow

/*QUAKED light_flame_large_yellow (0 1 0) (-10 -10 -12) (12 12 18)
Large yellow flame ball
*/
void SP_light_flame_large_yellow()
{
	trap_precache_model( "progs/flame2.mdl" );
	setmodel( self, "progs/flame2.mdl" );
	self->s.v.frame = 1;
	FireAmbient( self );
	makestatic( self );
}
开发者ID:deurk,项目名称:ktx,代码行数:11,代码来源:misc.c


示例20: SP_func_wall

/*QUAKED func_wall (0 .5 .8) ?
This is just a solid wall if not inhibitted
*/
void SP_func_wall()
{
	SetVector( self->s.v.angles, 0, 0, 0 );
	self->s.v.movetype = MOVETYPE_PUSH;	// so it doesn't get pushed by anything
	self->s.v.solid = SOLID_BSP;
	self->use = ( func_t ) func_wall_use;
	setmodel( self, self->model );
}
开发者ID:deurk,项目名称:ktx,代码行数:11,代码来源:misc.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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