本文整理汇总了C++中G_SoundOnEnt函数的典型用法代码示例。如果您正苦于以下问题:C++ G_SoundOnEnt函数的具体用法?C++ G_SoundOnEnt怎么用?C++ G_SoundOnEnt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了G_SoundOnEnt函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: MineMonster_TryDamage
//---------------------------------------------------------
void MineMonster_TryDamage( gentity_t *enemy, int damage )
{
vec3_t end, dir;
trace_t tr;
if ( !enemy )
{
return;
}
AngleVectors( NPC->client->ps.viewangles, dir, NULL, NULL );
VectorMA( NPC->currentOrigin, MIN_DISTANCE, dir, end );
// Should probably trace from the mouth, but, ah well.
gi.trace( &tr, NPC->currentOrigin, vec3_origin, vec3_origin, end, NPC->s.number, MASK_SHOT, (EG2_Collision)0, 0 );
if ( tr.entityNum >= 0 && tr.entityNum < ENTITYNUM_NONE )
{
G_Damage( &g_entities[tr.entityNum], NPC, NPC, dir, tr.endpos, damage, DAMAGE_NO_KNOCKBACK, MOD_MELEE );
G_SoundOnEnt( NPC, CHAN_VOICE_ATTEN, va("sound/chars/mine/misc/bite%i.wav", Q_irand(1,4)));
}
else
{
G_SoundOnEnt( NPC, CHAN_VOICE_ATTEN, va("sound/chars/mine/misc/miss%i.wav", Q_irand(1,4)));
}
}
开发者ID:Arbixal,项目名称:OpenJK,代码行数:27,代码来源:AI_MineMonster.cpp
示例2: G_DroidSounds
void G_DroidSounds( gentity_t *self )
{
if ( self->client )
{//make the noises
if ( TIMER_Done( self, "patrolNoise" ) && !Q_irand( 0, 20 ) )
{
switch( self->client->NPC_class )
{
case CLASS_R2D2: // droid
G_SoundOnEnt(self, CHAN_AUTO, va("sound/chars/r2d2/misc/r2d2talk0%d.wav",Q_irand(1, 3)) );
break;
case CLASS_R5D2: // droid
G_SoundOnEnt(self, CHAN_AUTO, va("sound/chars/r5d2/misc/r5talk%d.wav",Q_irand(1, 4)) );
break;
case CLASS_PROBE: // droid
G_SoundOnEnt(self, CHAN_AUTO, va("sound/chars/probe/misc/probetalk%d.wav",Q_irand(1, 3)) );
break;
case CLASS_MOUSE: // droid
G_SoundOnEnt(self, CHAN_AUTO, va("sound/chars/mouse/misc/mousego%d.wav",Q_irand(1, 3)) );
break;
case CLASS_GONK: // droid
G_SoundOnEnt(self, CHAN_AUTO, va("sound/chars/gonk/misc/gonktalk%d.wav",Q_irand(1, 2)) );
break;
default:
break;
}
TIMER_Set( self, "patrolNoise", Q_irand( 2000, 4000 ) );
}
}
}
开发者ID:Geptun,项目名称:japp,代码行数:30,代码来源:NPC.c
示例3: ImperialProbe_Patrol
void ImperialProbe_Patrol( void ) {
ImperialProbe_MaintainHeight();
if ( NPC_CheckPlayerTeamStealth() ) {
NPC_UpdateAngles( qtrue, qtrue );
return;
}
//If we have somewhere to go, then do that
if ( !NPC->enemy ) {
NPC_SetAnim( NPC, SETANIM_BOTH, BOTH_RUN1, SETANIM_FLAG_NORMAL );
if ( UpdateGoal() ) {
//start loop sound once we move
NPC->s.loopSound = G_SoundIndex( "sound/chars/probe/misc/probedroidloop" );
ucmd.buttons |= BUTTON_WALKING;
NPC_MoveToGoal( qtrue );
}
//randomly talk
if ( TIMER_Done( NPC, "patrolNoise" ) ) {
G_SoundOnEnt( NPC, CHAN_AUTO, va( "sound/chars/probe/misc/probetalk%d", Q_irand( 1, 3 ) ) );
TIMER_Set( NPC, "patrolNoise", Q_irand( 2000, 4000 ) );
}
}
else // He's got an enemy. Make him angry.
{
G_SoundOnEnt( NPC, CHAN_AUTO, "sound/chars/probe/misc/anger1" );
TIMER_Set( NPC, "angerNoise", Q_irand( 2000, 4000 ) );
//NPCInfo->behaviorState = BS_HUNT_AND_KILL;
}
NPC_UpdateAngles( qtrue, qtrue );
}
开发者ID:Arcadiaprime,项目名称:japp,代码行数:34,代码来源:NPC_AI_ImperialProbe.cpp
示例4: Droid_Patrol
void Droid_Patrol( void ) {
NPC->pos1.yaw = AngleNormalize360( NPC->pos1.yaw );
if ( NPC->client && NPC->client->NPC_class != CLASS_GONK ) {
if ( NPC->client->NPC_class != CLASS_R5D2 ) { //he doesn't have an eye.
R2D2_PartsMove(); // Get his eye moving.
}
R2D2_TurnAnims();
}
//If we have somewhere to go, then do that
if ( UpdateGoal() ) {
ucmd.buttons |= BUTTON_WALKING;
NPC_MoveToGoal( qtrue );
if ( NPC->client && NPC->client->NPC_class == CLASS_MOUSE ) {
NPCInfo->desiredYaw += sinf( level.time*.5f ) * 25; // Weaves side to side a little
if ( TIMER_Done( NPC, "patrolNoise" ) ) {
G_SoundOnEnt( NPC, CHAN_AUTO, va( "sound/chars/mouse/misc/mousego%d.wav", Q_irand( 1, 3 ) ) );
TIMER_Set( NPC, "patrolNoise", Q_irand( 2000, 4000 ) );
}
}
else if ( NPC->client && NPC->client->NPC_class == CLASS_R2D2 ) {
if ( TIMER_Done( NPC, "patrolNoise" ) ) {
G_SoundOnEnt( NPC, CHAN_AUTO, va( "sound/chars/r2d2/misc/r2d2talk0%d.wav", Q_irand( 1, 3 ) ) );
TIMER_Set( NPC, "patrolNoise", Q_irand( 2000, 4000 ) );
}
}
else if ( NPC->client && NPC->client->NPC_class == CLASS_R5D2 ) {
if ( TIMER_Done( NPC, "patrolNoise" ) ) {
G_SoundOnEnt( NPC, CHAN_AUTO, va( "sound/chars/r5d2/misc/r5talk%d.wav", Q_irand( 1, 4 ) ) );
TIMER_Set( NPC, "patrolNoise", Q_irand( 2000, 4000 ) );
}
}
if ( NPC->client && NPC->client->NPC_class == CLASS_GONK ) {
if ( TIMER_Done( NPC, "patrolNoise" ) ) {
G_SoundOnEnt( NPC, CHAN_AUTO, va( "sound/chars/gonk/misc/gonktalk%d.wav", Q_irand( 1, 2 ) ) );
TIMER_Set( NPC, "patrolNoise", Q_irand( 2000, 4000 ) );
}
}
// else
// {
// R5D2_LookAround();
// }
}
NPC_UpdateAngles( qtrue, qtrue );
}
开发者ID:Arcadiaprime,项目名称:japp,代码行数:55,代码来源:NPC_AI_Droid.cpp
示例5: G_ATSTCheckPain
void G_ATSTCheckPain( gentity_t *self, gentity_t *other, int damage )
{
//int newBolt;
//int hitLoc = gPainHitLoc;
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" );
}
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:14,代码来源:NPC_AI_Atst.c
示例6: G_ATSTCheckPain
void G_ATSTCheckPain( gentity_t *self, gentity_t *other, int damage )
{
//int newBolt;
//int hitLoc = gPainHitLoc;
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 = trap_G2API_AddBolt( self->ghoul2, 0, "*flash3" );
if ( newBolt != -1 )
{
// G_PlayEffect( "small_chunks", self->playerModel, self->genericBolt1, self->s.number);
ATST_PlayEffect( self, trap_G2API_AddBolt(self->ghoul2, 0, "*flash3"), "env/med_explode2" );
//G_PlayEffectID( G_EffectIndex("blaster/smoke_bolton"), self->playerModel, newBolt, self->s.number);
//Maybe bother with this some other time.
}
NPC_SetSurfaceOnOff( self, "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 = trap_G2API_AddBolt( self->ghoul2, 0, "*flash4" );
if ( newBolt != -1 )
{
// G_PlayEffect( "small_chunks", self->playerModel, self->genericBolt2, self->s.number);
ATST_PlayEffect( self, trap_G2API_AddBolt(self->ghoul2, 0, "*flash4"), "env/med_explode2" );
//G_PlayEffect( "blaster/smoke_bolton", self->playerModel, newBolt, self->s.number);
}
NPC_SetSurfaceOnOff( self, "head_concussion_charger", TURN_OFF );
}
}
*/
}
开发者ID:jwginge,项目名称:ojpa,代码行数:48,代码来源:NPC_AI_Atst.c
示例7: RT_FlyStop
void RT_FlyStop( gentity_t *self )
{
self->client->ps.gravity = g_gravity->value;
self->svFlags &= ~SVF_CUSTOM_GRAVITY;
self->client->moveType = MT_RUNJUMP;
//Stop the effect
self->client->jetPackTime = 0;
if ( self->genericBolt1 != -1 )
{
G_StopEffect("rockettrooper/flameNEW", self->playerModel, self->genericBolt1, self->s.number );
}
if ( self->genericBolt2 != -1 )
{
G_StopEffect("rockettrooper/flameNEW", self->playerModel, self->genericBolt2, self->s.number );
}
//stop jet loop sound
self->s.loopSound = 0;
G_SoundOnEnt( self, CHAN_ITEM, "sound/chars/boba/bf_land.wav" );
if ( self->NPC )
{
self->count = 0; // SEEKER shot ammo count
TIMER_Set( self, "jetRecharge", Q_irand( 1000, 5000 ) );
TIMER_Set( self, "jumpChaseDebounce", Q_irand( 500, 2000 ) );
}
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:26,代码来源:AI_RocketTrooper.cpp
示例8: NPC_Sentry_Patrol
/*
-------------------------
NPC_Sentry_Patrol
-------------------------
*/
void NPC_Sentry_Patrol( void ) {
Sentry_MaintainHeight();
//If we have somewhere to go, then do that
if ( !NPC->enemy ) {
if ( NPC_CheckPlayerTeamStealth() ) {
//NPC_AngerSound();
NPC_UpdateAngles( qtrue, qtrue );
return;
}
if ( UpdateGoal() ) {
//start loop sound once we move
ucmd.buttons |= BUTTON_WALKING;
NPC_MoveToGoal( qtrue );
}
//randomly talk
if ( TIMER_Done( NPC, "patrolNoise" ) ) {
G_SoundOnEnt( NPC, CHAN_AUTO, va( "sound/chars/sentry/misc/talk%d", Q_irand( 1, 3 ) ) );
TIMER_Set( NPC, "patrolNoise", Q_irand( 2000, 4000 ) );
}
}
NPC_UpdateAngles( qtrue, qtrue );
}
开发者ID:redsaurus,项目名称:japp,代码行数:32,代码来源:NPC_AI_Sentry.c
示例9: Boba_FlyStart
void Boba_FlyStart( gentity_t *self )
{//switch to seeker AI for a while
if ( TIMER_Done( self, "jetRecharge" )
&& !Boba_Flying( self ) )
{
self->client->ps.gravity = 0;
self->svFlags |= SVF_CUSTOM_GRAVITY;
self->client->moveType = MT_FLYSWIM;
//start jet effect
self->client->jetPackTime = level.time + Q_irand( 3000, 10000 );
if ( self->genericBolt1 != -1 )
{
G_PlayEffect( G_EffectIndex( "boba/jetSP" ), self->playerModel, self->genericBolt1, self->s.number, self->currentOrigin, qtrue, qtrue );
}
if ( self->genericBolt2 != -1 )
{
G_PlayEffect( G_EffectIndex( "boba/jetSP" ), self->playerModel, self->genericBolt2, self->s.number, self->currentOrigin, qtrue, qtrue );
}
//take-off sound
G_SoundOnEnt( self, CHAN_ITEM, "sound/chars/boba/bf_blast-off.wav" );
//jet loop sound
self->s.loopSound = G_SoundIndex( "sound/chars/boba/bf_jetpack_lp.wav" );
if ( self->NPC )
{
self->count = Q3_INFINITE; // SEEKER shot ammo count
}
}
}
开发者ID:Christian-Barrett,项目名称:OpenJK,代码行数:29,代码来源:AI_BobaFett.cpp
示例10: RT_FlyStart
void RT_FlyStart( gentity_t *self )
{//switch to seeker AI for a while
if ( TIMER_Done( self, "jetRecharge" )
&& !RT_Flying( self ) )
{
self->client->ps.gravity = 0;
self->svFlags |= SVF_CUSTOM_GRAVITY;
self->client->moveType = MT_FLYSWIM;
//Inform NPC_HandleAIFlags we want to fly
self->NPC->aiFlags |= NPCAI_FLY;
self->lastInAirTime = level.time;
//start jet effect
self->client->jetPackTime = Q3_INFINITE;
if ( self->genericBolt1 != -1 )
{
G_PlayEffect( G_EffectIndex( "rockettrooper/flameNEW" ), self->playerModel, self->genericBolt1, self->s.number, self->currentOrigin, qtrue, qtrue );
}
if ( self->genericBolt2 != -1 )
{
G_PlayEffect( G_EffectIndex( "rockettrooper/flameNEW" ), self->playerModel, self->genericBolt2, self->s.number, self->currentOrigin, qtrue, qtrue );
}
//take-off sound
G_SoundOnEnt( self, CHAN_ITEM, "sound/chars/boba/bf_blast-off.wav" );
//jet loop sound
self->s.loopSound = G_SoundIndex( "sound/chars/boba/bf_jetpack_lp.wav" );
if ( self->NPC )
{
self->count = Q3_INFINITE; // SEEKER shot ammo count
}
}
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:33,代码来源:AI_RocketTrooper.cpp
示例11: Boba_DoFlameThrower
void Boba_DoFlameThrower( gentity_t *self )
{
if ( self->s.number < MAX_CLIENTS )
{
if ( self->client )
{
if ( !self->client->ps.forcePowerDuration[FP_LIGHTNING] )
{
NPC_SetAnim( self, SETANIM_TORSO, BOTH_FORCELIGHTNING_HOLD, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD );
self->client->ps.torsoAnimTimer = BOBA_FLAMEDURATION;
G_SoundOnEnt( self, CHAN_WEAPON, "sound/weapons/boba/bf_flame.mp3" );
G_PlayEffect( G_EffectIndex("boba/fthrw"), self->playerModel, self->genericBolt3, self->s.number, self->s.origin, 1 );
self->client->ps.forcePowerDuration[FP_LIGHTNING] = 1;
}
Boba_FireFlameThrower( self );
}
return;
}
if (!(NPCInfo->aiFlags&NPCAI_FLAMETHROW) && TIMER_Done(self, "nextAttackDelay"))
{
Boba_StartFlameThrower( self );
}
if ( (NPCInfo->aiFlags&NPCAI_FLAMETHROW))
{
Boba_FireFlameThrower( self );
}
}
开发者ID:Christian-Barrett,项目名称:OpenJK,代码行数:28,代码来源:AI_BobaFett.cpp
示例12: Sentry_RangedAttack
/*
-------------------------
Sentry_RangedAttack
-------------------------
*/
void Sentry_RangedAttack( qboolean visible, qboolean advance ) {
if ( TIMER_Done( NPC, "attackDelay" ) && NPC->attackDebounceTime < level.time && visible ) // Attack?
{
if ( NPCInfo->burstCount > 6 ) {
if ( !NPC->fly_sound_debounce_time ) {//delay closing down to give the player an opening
NPC->fly_sound_debounce_time = level.time + Q_irand( 500, 2000 );
}
else if ( NPC->fly_sound_debounce_time < level.time ) {
NPCInfo->localState = LSTATE_ACTIVE;
NPC->fly_sound_debounce_time = NPCInfo->burstCount = 0;
TIMER_Set( NPC, "attackDelay", Q_irand( 2000, 3500 ) );
NPC->flags |= FL_SHIELDED;
NPC_SetAnim( NPC, SETANIM_BOTH, BOTH_FLY_SHIELDED, SETANIM_FLAG_OVERRIDE | SETANIM_FLAG_HOLD );
G_SoundOnEnt( NPC, CHAN_AUTO, "sound/chars/sentry/misc/sentry_shield_close" );
}
}
else {
Sentry_Fire();
}
}
if ( NPCInfo->scriptFlags & SCF_CHASE_ENEMIES ) {
Sentry_Hunt( visible, advance );
}
}
开发者ID:redsaurus,项目名称:japp,代码行数:30,代码来源:NPC_AI_Sentry.c
示例13: NPC_Sentry_Pain
/*
-------------------------
NPC_Sentry_Pain
-------------------------
*/
void NPC_Sentry_Pain( gentity_t *self, gentity_t *inflictor, gentity_t *other, vec3_t point, int damage, int mod,int hitLoc )
{
NPC_Pain( self, inflictor, other, point, damage, mod );
if ( mod == MOD_DEMP2 || mod == MOD_DEMP2_ALT )
{
self->NPC->burstCount = 0;
TIMER_Set( self, "attackDelay", Q_irand( 9000, 12000) );
self->flags |= FL_SHIELDED;
NPC_SetAnim( self, SETANIM_BOTH, BOTH_FLY_SHIELDED, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD );
G_SoundOnEnt( self, CHAN_AUTO, "sound/chars/sentry/misc/sentry_pain" );
self->NPC->localState = LSTATE_ACTIVE;
}
// You got hit, go after the enemy
// if (self->NPC->localState == LSTATE_ASLEEP)
// {
// G_Sound( self, G_SoundIndex("sound/chars/sentry/misc/shieldsopen.wav"));
//
// self->flags &= ~FL_SHIELDED;
// NPC_SetAnim( self, SETANIM_BOTH, BOTH_POWERUP1, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD );
// self->NPC->localState = LSTATE_WAKEUP;
// }
}
开发者ID:Avygeil,项目名称:NewJK,代码行数:30,代码来源:AI_Sentry.cpp
示例14: 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
示例15: Sentry_AttackDecision
/*
-------------------------
Sentry_AttackDecision
-------------------------
*/
void Sentry_AttackDecision( void )
{
float distance;
qboolean visible;
qboolean advance;
// Always keep a good height off the ground
Sentry_MaintainHeight();
NPC->s.loopSound = G_SoundIndex( "sound/chars/sentry/misc/sentry_hover_2_lp" );
//randomly talk
if ( TIMER_Done(NPC,"patrolNoise") )
{
if (TIMER_Done(NPC,"angerNoise"))
{
G_SoundOnEnt( NPC, CHAN_AUTO, va("sound/chars/sentry/misc/talk%d", Q_irand(1, 3)) );
TIMER_Set( NPC, "patrolNoise", Q_irand( 4000, 10000 ) );
}
}
// He's dead.
if (NPC->enemy->health<1)
{
NPC->enemy = NULL;
Sentry_Idle();
return;
}
// If we don't have an enemy, just idle
if ( NPC_CheckEnemyExt(qfalse) == qfalse )
{
Sentry_Idle();
return;
}
// Rate our distance to the target and visibilty
distance = (int) DistanceHorizontalSquared( NPC->r.currentOrigin, NPC->enemy->r.currentOrigin );
visible = NPC_ClearLOS4( NPC->enemy );
advance = (qboolean)(distance > MIN_DISTANCE_SQR);
// If we cannot see our target, move to see it
if ( visible == qfalse )
{
if ( NPCInfo->scriptFlags & SCF_CHASE_ENEMIES )
{
Sentry_Hunt( visible, advance );
return;
}
}
NPC_FaceEnemy( qtrue );
Sentry_RangedAttack( visible, advance );
}
开发者ID:DarthFutuza,项目名称:JediKnightGalaxies,代码行数:61,代码来源:NPC_AI_Sentry.cpp
示例16: G_Victory
void G_Victory( gentity_t *ent )
{
if ( ent->health > 0 )
{//say something and put away saber
G_SoundOnEnt( ent, CHAN_VOICE, "sound/chars/kyle/misc/taunt1.wav" );
if ( ent->client )
{
ent->client->ps.saberActive = qfalse;
}
}
}
开发者ID:PJayB,项目名称:jk2src,代码行数:11,代码来源:g_cmds.cpp
示例17: Interrogator_Idle
void Interrogator_Idle( void ) {
if ( NPC_CheckPlayerTeamStealth() ) {
G_SoundOnEnt( NPC, CHAN_AUTO, "sound/chars/mark1/misc/anger.wav" );
NPC_UpdateAngles( qtrue, qtrue );
return;
}
Interrogator_MaintainHeight();
NPC_BSIdle();
}
开发者ID:Arcadiaprime,项目名称:japp,代码行数:11,代码来源:NPC_AI_Interrogator.cpp
示例18: Hirogen_Speak
static qboolean Hirogen_Speak( void )
{
//Make sure we haven't already tried to say the line
if ( NPCInfo->squadState )
return qfalse;
switch ( NPCInfo->localState )
{
case 0:
G_SoundOnEnt( NPC, CHAN_VOICE, alphaSpeech[0] );
TIMER_Set( NPC, "speech", 2500 );
break;
case 1:
G_SoundOnEnt( NPC, CHAN_VOICE, alphaSpeech[1] );
TIMER_Set( NPC, "speech", 2500 );
break;
case 3:
G_SoundOnEnt( NPC, CHAN_VOICE, alphaSpeech[2] );
TIMER_Set( NPC, "speech", 2500 );
break;
case 5:
G_SoundOnEnt( NPC, CHAN_VOICE, alphaSpeech[3] );
TIMER_Set( NPC, "speech", 2500 );
break;
case 7:
G_SoundOnEnt( NPC, CHAN_VOICE, alphaSpeech[4] );
TIMER_Set( NPC, "speech", 2500 );
break;
default:
return qfalse;
break;
}
NPCInfo->squadState = 1;
return qtrue;
}
开发者ID:UberGames,项目名称:SP-Mod-Source-Code,代码行数:41,代码来源:AI_HirogenAlpha.cpp
示例19: 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
示例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
NPC_SetAnim( NPC, SETANIM_TORSO, TORSO_RAISEWEAP2, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD );
TIMER_Set( NPC, "beamDelay", NPC->client->ps.torsoAnimTimer );
TIMER_Set( NPC, "attackDelay", NPC->client->ps.torsoAnimTimer+3000 );
NPC->lockCount = 1;
//turn on warmup effect
G_PlayEffect( "galak/beam_warmup", NPC->s.number );
G_SoundOnEnt( NPC, CHAN_AUTO, "sound/weapons/galak/lasercharge.wav" );
}
}
开发者ID:PJayB,项目名称:jk2src,代码行数:14,代码来源:AI_GalakMech.cpp
注:本文中的G_SoundOnEnt函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论