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

C++ BG_FindItemForWeapon函数代码示例

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

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



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

示例1: NPC_Mark1_Precache

/*
-------------------------
NPC_Mark1_Precache
-------------------------
*/
void NPC_Mark1_Precache(void)
{
	G_SoundIndex( "sound/chars/mark1/misc/mark1_wakeup");
	G_SoundIndex( "sound/chars/mark1/misc/shutdown");
	G_SoundIndex( "sound/chars/mark1/misc/walk");
	G_SoundIndex( "sound/chars/mark1/misc/run");
	G_SoundIndex( "sound/chars/mark1/misc/death1");
	G_SoundIndex( "sound/chars/mark1/misc/death2");
	G_SoundIndex( "sound/chars/mark1/misc/anger");
	G_SoundIndex( "sound/chars/mark1/misc/mark1_fire");
	G_SoundIndex( "sound/chars/mark1/misc/mark1_pain");
	G_SoundIndex( "sound/chars/mark1/misc/mark1_explo");

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

	RegisterItem( BG_FindItemForAmmo( 	AMMO_METAL_BOLTS));
	RegisterItem( BG_FindItemForAmmo( AMMO_BLASTER ));
	RegisterItem( BG_FindItemForWeapon( WP_BOWCASTER ));
	RegisterItem( BG_FindItemForWeapon( WP_BRYAR_PISTOL ));
}
开发者ID:Chedo,项目名称:OpenJK,代码行数:30,代码来源:NPC_AI_Mark1.c


示例2: ClearRegisteredItems

/*
==============
ClearRegisteredItems
==============
*/
void ClearRegisteredItems( void ) {
	memset( itemRegistered, 0, sizeof( itemRegistered ) );

	// players always start with the base weapon
	RegisterItem( BG_FindItemForWeapon( WP_PISTOL ) );
	RegisterItem( BG_FindItemForWeapon( WP_GAUNTLET ) );
	RegisterItem( BG_FindItem("Bag 'O Money" ) );
	RegisterItem( BG_FindItem("Hidden Stash" ) );
}
开发者ID:ballju,项目名称:SpaceTrader-GPL-1.1.14,代码行数:14,代码来源:g_items.c


示例3: ClearRegisteredItems

/*
==============
ClearRegisteredItems
==============
*/
void ClearRegisteredItems(void)
{
	memset(itemRegistered, 0, sizeof(itemRegistered));

	// players always start with the base weapon
	//Blaze: Changed WP_MACHINEGUN to WP_PISTOL and WP_GAUNTLET to WP_KNIFE
	RegisterItem(BG_FindItemForWeapon(WP_PISTOL));
	RegisterItem(BG_FindItemForWeapon(WP_KNIFE));
	//Elder: add unique items here
	RegisterItem(BG_FindItemForHoldable(HI_KEVLAR));
	RegisterItem(BG_FindItemForHoldable(HI_SLIPPERS));
	RegisterItem(BG_FindItemForHoldable(HI_SILENCER));
	RegisterItem(BG_FindItemForHoldable(HI_BANDOLIER));
	RegisterItem(BG_FindItemForHoldable(HI_LASER));
	// JBravo: adding the helmet
	if (g_RQ3_haveHelmet.integer)
		RegisterItem(BG_FindItemForHoldable(HI_HELMET));
	//Makro - all weapons should be loaded in teamplay
	//JBravo: and CTF
	if (g_gametype.integer == GT_TEAMPLAY || g_gametype.integer == GT_CTF || g_gametype.integer == GT_TEAM) {
		RegisterItem(BG_FindItemForWeapon(WP_M3));
		RegisterItem(BG_FindItemForWeapon(WP_MP5));
		RegisterItem(BG_FindItemForWeapon(WP_HANDCANNON));
		RegisterItem(BG_FindItemForWeapon(WP_SSG3000));
		RegisterItem(BG_FindItemForWeapon(WP_M4));
		RegisterItem(BG_FindItemForWeapon(WP_AKIMBO));
		RegisterItem(BG_FindItemForWeapon(WP_GRENADE));
	}
}
开发者ID:zturtleman,项目名称:reaction,代码行数:34,代码来源:g_items.c


示例4: ClearRegisteredItems

/*
==============
ClearRegisteredItems
==============
*/
void ClearRegisteredItems( void ) {
	memset( itemRegistered, 0, sizeof( itemRegistered ) );

	// !TODO: Have map determine the base weapons:
	// players always start with the base weapon
	RegisterItem( BG_FindItemForWeapon( WP_MACHINEGUN ) );
	RegisterItem( BG_FindItemForWeapon( WP_GAUNTLET ) );
	if( g_gametype.integer == GT_HARVESTER ) {
		RegisterItem( BG_FindItem( "Red Cube" ) );
		RegisterItem( BG_FindItem( "Blue Cube" ) );
	}
}
开发者ID:LavenderMoon,项目名称:mint-arena,代码行数:17,代码来源:g_items.c


示例5: ClearRegisteredItems

/*
==============
ClearRegisteredItems
==============
*/
void ClearRegisteredItems( void ) {
	memset( itemRegistered, 0, sizeof( itemRegistered ) );

	// players always start with the base weapon
	RegisterItem( BG_FindItemForWeapon( WP_NIPPER ) );
	RegisterItem( BG_FindItemForWeapon( WP_PUNCHY ) );

	RegisterItem( BG_FindItemForWeapon( WP_KILLERDUCKS ) );

	if ( IsSyc() ) {
		RegisterItem( BG_FindItemForWeapon( WP_SPRAYPISTOL ) );
	}
}
开发者ID:PadWorld-Entertainment,项目名称:wop-gamesource,代码行数:18,代码来源:g_items.c


示例6: ClearRegisteredItems

/*
==============
ClearRegisteredItems
==============
*/
void ClearRegisteredItems( void ) {
	memset( itemRegistered, 0, sizeof( itemRegistered ) );

	// players always start with the base weapon
	RegisterItem( BG_FindItemForWeapon( WP_MACHINEGUN ) );
	RegisterItem( BG_FindItemForWeapon( WP_GAUNTLET ) );
#ifdef MISSIONPACK
	if( g_gametype.integer == GT_HARVESTER ) {
		RegisterItem( BG_FindItem( "Red Cube" ) );
		RegisterItem( BG_FindItem( "Blue Cube" ) );
	}
#endif
}
开发者ID:Garey27,项目名称:quake3-brainworks,代码行数:18,代码来源:g_items.c


示例7: NPC_ATST_Precache

void NPC_ATST_Precache( void ) {
	G_SoundIndex( "sound/chars/atst/atst_damaged1" );
	G_SoundIndex( "sound/chars/atst/atst_damaged2" );

	//	RegisterItem( BG_FindItemForWeapon( WP_ATST_MAIN ));	//precache the weapon
	//rwwFIXMEFIXME: add this weapon
	RegisterItem( BG_FindItemForWeapon( WP_BOWCASTER ) );	//precache the weapon
	RegisterItem( BG_FindItemForWeapon( WP_ROCKET_LAUNCHER ) );	//precache the weapon

	G_EffectIndex( "env/med_explode2" );
	//	G_EffectIndex( "smaller_chunks" );
	G_EffectIndex( "blaster/smoke_bolton" );
	G_EffectIndex( "explosions/droidexplosion1" );
}
开发者ID:Arcadiaprime,项目名称:japp,代码行数:14,代码来源:NPC_AI_Atst.cpp


示例8: RegisterAssets

static void RegisterAssets( Vehicle_t *pVeh ) {
	//atst uses turret weapon
	RegisterItem( BG_FindItemForWeapon( WP_TURRET ) );

	//call the standard RegisterAssets now
	g_vehicleInfo[VEHICLE_BASE].RegisterAssets( pVeh );
}
开发者ID:Arcadiaprime,项目名称:japp,代码行数:7,代码来源:WalkerNPC.cpp


示例9: ClearRegisteredItems

void ClearRegisteredItems( void ) {
	memset( itemRegistered, 0, sizeof( itemRegistered ) );

	// players always start with the base weapon
	//RAZMARK: Adding new weapons
	RegisterItem( BG_FindItemForWeapon( WP_QUANTIZER ) );
}
开发者ID:Razish,项目名称:QtZ,代码行数:7,代码来源:g_items.c


示例10: TossClientItems

/*
=================
TossClientItems

Toss the weapon and powerups for the killed player
=================
*/
void TossClientItems( gentity_t *self ) {
	gitem_t		*item;
	int			weapon;
	float		angle;
	int			i;
	gentity_t	*drop;

	// drop the weapon if not a gauntlet or machinegun
	weapon = self->s.weapon;

	//Never drop in elimination or last man standing mode!
	if( g_gametype.integer == GT_ELIMINATION || g_gametype.integer == GT_LMS)
		return;

	// make a special check to see if they are changing to a new
	// weapon that isn't the mg or gauntlet.  Without this, a client
	// can pick up a weapon, be killed, and not drop the weapon because
	// their weapon change hasn't completed yet and they are still holding the MG.
	if ( weapon == WP_MACHINEGUN || weapon == WP_GRAPPLING_HOOK ) {
		if ( self->client->ps.weaponstate == WEAPON_DROPPING ) {
			weapon = self->client->pers.cmd.weapon;
		}
		if ( !( self->client->ps.stats[STAT_WEAPONS] & ( 1 << weapon ) ) ) {
			weapon = WP_NONE;
		}
	}

	if (g_instantgib.integer || g_rockets.integer || g_gametype.integer == GT_CTF_ELIMINATION || g_elimination_allgametypes.integer){
	//Nothing!	
	}
	else
	if ( weapon > WP_MACHINEGUN && weapon != WP_GRAPPLING_HOOK && 
		self->client->ps.ammo[ weapon ] ) {
		// find the item type for this weapon
		item = BG_FindItemForWeapon( weapon );

		// spawn the item
		Drop_Item( self, item, 0 );
	}

	// drop all the powerups if not in teamplay
	if ( g_gametype.integer != GT_TEAM ) {
		angle = 45;
		for ( i = 1 ; i < PW_NUM_POWERUPS ; i++ ) {
			if ( self->client->ps.powerups[ i ] > level.time ) {
				item = BG_FindItemForPowerup( i );
				if ( !item ) {
					continue;
				}
				drop = Drop_Item( self, item, angle );
				// decide how many seconds it has left
				drop->count = ( self->client->ps.powerups[ i ] - level.time ) / 1000;
				if ( drop->count < 1 ) {
					drop->count = 1;
				}
				angle += 45;
			}
		}
	}
}
开发者ID:d00man,项目名称:openarena-vm,代码行数:67,代码来源:g_combat.c


示例11: G_SiegeRegisterWeaponsAndHoldables

//go through all classes on a team and register their
//weapons and items for precaching.
void G_SiegeRegisterWeaponsAndHoldables( int team ) {
	siegeTeam_t *stm = BG_SiegeFindThemeForTeam( team );

	if ( stm ) {
		int i = 0;
		siegeClass_t *scl;
		while ( i < stm->numClasses ) {
			scl = stm->classes[i];

			if ( scl ) {
				int j = 0;
				while ( j < WP_NUM_WEAPONS ) {
					if ( scl->weapons & (1 << j) ) { //we use this weapon so register it.
						RegisterItem( BG_FindItemForWeapon( j ) );
					}
					j++;
				}
				j = 0;
				while ( j < HI_NUM_HOLDABLE ) {
					if ( scl->invenItems & (1 << j) ) { //we use this item so register it.
						RegisterItem( BG_FindItemForHoldable( j ) );
					}
					j++;
				}
			}
			i++;
		}
	}
}
开发者ID:boyisgood86,项目名称:japp,代码行数:31,代码来源:g_saga.c


示例12: RegisterAssets

static void RegisterAssets( Vehicle_t *pVeh )
{
	//atst uses turret weapon
#ifdef _JK2MP
	RegisterItem(BG_FindItemForWeapon(WP_TURRET));
#else
	// PUT SOMETHING HERE...
#endif

	//call the standard RegisterAssets now
	g_vehicleInfo[VEHICLE_BASE].RegisterAssets( pVeh );
}
开发者ID:PJayB,项目名称:jk3src,代码行数:12,代码来源:WalkerNPC.c


示例13: TossPlayerItems

/*
=================
TossPlayerItems

Toss the weapon and powerups for the killed player
=================
*/
void TossPlayerItems( gentity_t *self ) {
	gitem_t		*item;
	int			weapon;
	float		angle;
	int			i;
	gentity_t	*drop;

	// drop the weapon if not a gauntlet or machinegun
	weapon = self->s.weapon;

	// make a special check to see if they are changing to a new
	// weapon that isn't the mg or gauntlet.  Without this, a player
	// can pick up a weapon, be killed, and not drop the weapon because
	// their weapon change hasn't completed yet and they are still holding the MG.
	if ( weapon == WP_MACHINEGUN || weapon == WP_GRAPPLING_HOOK ) {
		if ( self->player->ps.weaponstate == WEAPON_DROPPING ) {
			BG_DecomposeUserCmdValue( self->player->pers.cmd.stateValue, &weapon );
		}
		if ( !( self->player->ps.stats[STAT_WEAPONS] & ( 1 << weapon ) ) ) {
			weapon = WP_NONE;
		}
	}

	if ( weapon > WP_MACHINEGUN && weapon != WP_GRAPPLING_HOOK && 
		self->player->ps.ammo[ weapon ] ) {
		// find the item type for this weapon
		item = BG_FindItemForWeapon( weapon );

		// spawn the item
		Drop_Item( self, item, 0 );
	}

	// drop all the powerups if not in teamplay
	if ( g_gametype.integer != GT_TEAM ) {
		angle = 45;
		for ( i = 1 ; i < PW_NUM_POWERUPS ; i++ ) {
			if ( self->player->ps.powerups[ i ] > level.time ) {
				item = BG_FindItemForPowerup( i );
				if ( !item ) {
					continue;
				}
				drop = Drop_Item( self, item, angle );
				// decide how many seconds it has left
				drop->count = ( self->player->ps.powerups[ i ] - level.time ) / 1000;
				if ( drop->count < 1 ) {
					drop->count = 1;
				}
				angle += 45;
			}
		}
	}
}
开发者ID:mecwerks,项目名称:revamp,代码行数:59,代码来源:g_combat.c


示例14: 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( "explosions/droidexplosion1" );
	G_EffectIndex( "env/med_explode2" );
	G_EffectIndex( "blaster/smoke_bolton" );
	G_EffectIndex( "bryar/muzzle_flash" );

	RegisterItem( BG_FindItemForWeapon( WP_BRYAR_PISTOL ) );
	RegisterItem( BG_FindItemForAmmo( AMMO_METAL_BOLTS ) );
	RegisterItem( BG_FindItemForAmmo( AMMO_POWERCELL ) );
	RegisterItem( BG_FindItemForAmmo( AMMO_BLASTER ) );
}
开发者ID:Arcadiaprime,项目名称:japp,代码行数:16,代码来源:NPC_AI_Mark2.cpp


示例15: G_Suck

void G_Suck( gentity_t *self ) {
	int wait = self->wait;

	// if in water disable burning
	if (!Q_stricmp(self->classname, "grenadeend")){
		gitem_t *item;

		item = BG_FindItemForWeapon( WP_DYNAMITE );

		self->s.apos.trDelta[0] = 0;

		self->s.modelindex = item- bg_itemlist;
		self->s.modelindex2 = 1;

		self->item = item;

		self->s.eType = ET_ITEM;
		self->r.contents = CONTENTS_TRIGGER2;
		self->wait = -1;
		self->flags |= FL_THROWN_ITEM;

		self->touch = Touch_Item;
		self->classname = "grenadesit";
		self->think	= G_KnifeThink;
		self->nextthink = level.time + 100;
		self->wait = level.time + 60000;

		self->r.currentAngles[1] = rand() % 360;
		self->r.currentAngles[PITCH] = 90;
		VectorCopy(self->r.currentAngles, self->s.apos.trBase);
		return;
	}

	if(self->s.pos.trType == TR_STATIONARY){
		// just to be sure KnifeThink doesn't delete the dynamite
		self->wait = level.time + 999999;
		// runs solid checks: is dynamite hovering in the air?
		G_KnifeThink(self);
	}

	self->nextthink = level.time + 100;
	self->think = G_Suck;
	self->wait = wait;

	if (level.time > self->wait && !Q_stricmp(self->classname, "grenade"))
		G_ExplodeMissile( self );
}
开发者ID:OADoctor,项目名称:SmokinGuns,代码行数:47,代码来源:g_missile.c


示例16: G_ThrowWeapon

void G_ThrowWeapon( int weapon, gentity_t *ent )
{
	playerState_t	*ps;
	gitem_t			*item;
	gentity_t		*drop;

	ps = &ent->client->ps;

	if(!(ps->stats[STAT_WEAPONS] & (1 << weapon)))
		return;

	if(weapon == WP_NONE)
		return;

	item = BG_FindItemForWeapon( weapon );

	drop = G_dropWeapon( ent, item, 0, FL_DROPPED_ITEM | FL_THROWN_ITEM );

	if(drop){
		trap_SendServerCommand( ent-g_entities, va("print \"%s dropped.\n\"", item->pickup_name));
	}

	// delete weapon from inventory
	if(bg_weaponlist[weapon].wp_sort == WPS_PISTOL &&
		(ps->stats[STAT_FLAGS] & SF_SEC_PISTOL)){

		if (ps->ammo[weapon] < ps->ammo[WP_AKIMBO]) {
			int ammo = ps->ammo[weapon];
			ps->ammo[weapon] = ps->ammo[WP_AKIMBO];
			ps->ammo[WP_AKIMBO] = ammo;
		}

		if(drop)
			drop->count= ps->ammo[ WP_AKIMBO ]+1;

		ps->ammo[ WP_AKIMBO] = 0;
		ps->stats[STAT_FLAGS] &= ~SF_SEC_PISTOL;
	} else {

		if(drop)
			drop->count= ps->ammo[ weapon ]+1;

		ps->ammo[ weapon ] = 0;
		ps->stats[STAT_WEAPONS] &= ~( 1 << weapon );
	}
}
开发者ID:Mixone-FinallyHere,项目名称:SmokinGuns,代码行数:46,代码来源:g_sg_utils.c


示例17: NPC_Probe_Precache

void NPC_Probe_Precache( void ) {
	int i;

	for ( 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( BG_FindItemForAmmo( AMMO_BLASTER ) );
	RegisterItem( BG_FindItemForWeapon( WP_BRYAR_PISTOL ) );
}
开发者ID:Arcadiaprime,项目名称:japp,代码行数:18,代码来源:NPC_AI_ImperialProbe.cpp


示例18: TossClientItems

/*
=================
TossClientItems

Toss the weapon and powerups for the killed player
=================
*/
void TossClientItems( gentity_t *self ) {
	gitem_t     *item;
	int weapon;
	gentity_t   *drop = 0;

	// drop the weapon if not a gauntlet or machinegun
	weapon = self->s.weapon;

	// make a special check to see if they are changing to a new
	// weapon that isn't the mg or gauntlet.  Without this, a client
	// can pick up a weapon, be killed, and not drop the weapon because
	// their weapon change hasn't completed yet and they are still holding the MG.

	// (SA) always drop what you were switching to
	if ( 1 ) {
		if ( self->client->ps.weaponstate == WEAPON_DROPPING ) {
			weapon = self->client->pers.cmd.weapon;
		}
		if ( !( COM_BitCheck( self->client->ps.weapons, weapon ) ) ) {
			weapon = WP_NONE;
		}
	}

	// JPW NERVE don't drop these weapon types
	if ( ( weapon == WP_FLAMETHROWER ) || ( weapon == WP_GARAND ) || ( weapon == WP_MAUSER ) || ( weapon == WP_VENOM ) ) {
		weapon = WP_NONE;
	}
	// jpw

	if ( weapon > WP_NONE && weapon < WP_MONSTER_ATTACK1 && self->client->ps.ammo[ BG_FindAmmoForWeapon( weapon_t (weapon) )] ) {
		// find the item type for this weapon
		item = BG_FindItemForWeapon( weapon_t (weapon) );
		// spawn the item

		// Rafael
		if ( !( self->client->ps.persistant[PERS_HWEAPON_USE] ) ) {
			drop = Drop_Item( self, item, 0, qfalse );
			// JPW NERVE -- fix ammo counts
			drop->count = self->client->ps.ammoclip[BG_FindClipForWeapon( weapon_t (weapon) )];
			drop->item->quantity = self->client->ps.ammoclip[BG_FindClipForWeapon( weapon_t (weapon) )];
			// jpw
		}
	}
}
开发者ID:bibendovsky,项目名称:rtcw,代码行数:51,代码来源:g_combat.cpp


示例19: InitShooter

void InitShooter( gentity_t *ent, int weapon ) {
	ent->use = Use_Shooter;
	ent->s.weapon = weapon;

	RegisterItem( BG_FindItemForWeapon( weapon ) );

	G_SetMovedir( &ent->s.angles, &ent->movedir );

	if ( !ent->random ) {
		ent->random = 1.0;
	}
	ent->random = sinf( M_PI * ent->random / 180 );
	// target might be a moving object, so we can't set movedir for it
	if ( ent->target ) {
		ent->think = InitShooter_Finish;
		ent->nextthink = level.time + 500;
	}
	trap->SV_LinkEntity( (sharedEntity_t *)ent );
}
开发者ID:AstralSerpent,项目名称:QtZ,代码行数:19,代码来源:g_misc.c


示例20: G_DropBinocs

void G_DropBinocs( gentity_t *ent )
{
	vec3_t		angles, velocity, org, offset, mins, maxs;
	gclient_t	*client = ent->client;
	gentity_t	*ent2;
	gitem_t		*item;
	trace_t		tr;

	item = BG_FindItemForWeapon( WP_BINOCULARS );
	VectorCopy( client->ps.viewangles, angles );

	// clamp pitch
	if ( angles[PITCH] < -30 )
		angles[PITCH] = -30;
	else if ( angles[PITCH] > 30 )
		angles[PITCH] = 30;

	AngleVectors( angles, velocity, NULL, NULL );
	VectorScale( velocity, 64, offset );
	offset[2] += client->ps.viewheight / 2.f;
	VectorScale( velocity, 75, velocity );
	velocity[2] += 50 + random() * 35;

	VectorAdd( client->ps.origin, offset, org );

	VectorSet( mins, -ITEM_RADIUS, -ITEM_RADIUS, 0 );
	VectorSet( maxs, ITEM_RADIUS, ITEM_RADIUS, 2*ITEM_RADIUS );

	trap_Trace( &tr, client->ps.origin, mins, maxs, org, ent->s.number, MASK_SOLID );
	VectorCopy( tr.endpos, org );

	ent2 = LaunchBinocs( item, org, velocity, client->ps.clientNum );
	COM_BitClear( client->ps.weapons, WP_BINOCULARS );

	// Clear out empty weapon, change to next best weapon
	G_AddEvent( ent, EV_WEAPONSWITCHED, 0 );

	if( WP_BINOCULARS == client->ps.weapon )
		client->ps.weapon = 0;

	client->ps.ammoclip[BG_FindClipForWeapon(WP_BINOCULARS)] = 0;
}
开发者ID:thewolfteam,项目名称:Reloaded,代码行数:42,代码来源:g_items.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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