func Idle() { ClearEffects(); ox=GetX(); oy=GetY(); AddEffect("Idle", this, 1, 1, this); }
/* ============== idPlayerView::idPlayerView ============== */ idPlayerView::idPlayerView() : //HDR start #ifdef _DENTONMOD m_postProcessManager() // Invoke the postprocess Manager Constructor - J.C.Denton #endif //HDR end { memset( screenBlobs, 0, sizeof( screenBlobs ) ); memset( &view, 0, sizeof( view ) ); player = NULL; dvMaterial = declManager->FindMaterial( "_scratch" ); tunnelMaterial = declManager->FindMaterial( "textures/decals/tunnel" ); armorMaterial = declManager->FindMaterial( "armorViewEffect" ); berserkMaterial = declManager->FindMaterial( "textures/decals/berserk" ); irGogglesMaterial = declManager->FindMaterial( "textures/decals/irblend" ); bloodSprayMaterial = declManager->FindMaterial( "textures/decals/bloodspray" ); bfgMaterial = declManager->FindMaterial( "textures/decals/bfgvision" ); lagoMaterial = declManager->FindMaterial( LAGO_MATERIAL, false ); bfgVision = false; dvFinishTime = 0; kickFinishTime = 0; kickAngles.Zero(); lastDamageTime = 0.0f; fadeTime = 0; fadeRate = 0.0; fadeFromColor.Zero(); fadeToColor.Zero(); fadeColor.Zero(); shakeAng.Zero(); ClearEffects(); }
void C4SoundSystem::Clear() { ClearEffects(); Modifiers.Clear(); // Close sound file SoundFile.Close(); }
/* ============== idPlayerView::idPlayerView ============== */ idPlayerView::idPlayerView() { memset( screenBlobs, 0, sizeof( screenBlobs ) ); memset( &view, 0, sizeof( view ) ); player = NULL; dvMaterial = NULL; dvMaterialBlend = NULL; tunnelMaterial = NULL; armorMaterial = NULL; bloodSprayMaterial = NULL; bfgVision = false; dvFinishTime = 0; tvFinishTime = 0; tvStartTime = 0; kickFinishTime = 0; kickAngles.Zero(); lastDamageTime = 0.0f; fadeTime = 0; fadeRate = 0.0; fadeFromColor.Zero(); fadeToColor.Zero(); fadeColor.Zero(); ClearEffects(); dvScale = 1.0f; shakeScale = 1.0f; tvScale = 1.0f; }
/* ============== idPlayerView::idPlayerView ============== */ idPlayerView::idPlayerView() { memset( screenBlobs, 0, sizeof( screenBlobs ) ); memset( &view, 0, sizeof( view ) ); player = NULL; tunnelMaterial = declManager->FindMaterial( "textures/decals/tunnel" ); armorMaterial = declManager->FindMaterial( "armorViewEffect" ); berserkMaterial = declManager->FindMaterial( "textures/decals/berserk" ); irGogglesMaterial = declManager->FindMaterial( "textures/decals/irblend" ); bloodSprayMaterial = declManager->FindMaterial( "textures/decals/bloodspray" ); bfgMaterial = declManager->FindMaterial( "textures/decals/bfgvision" ); bfgVision = false; dvFinishTime = 0; kickFinishTime = 0; kickAngles.Zero(); lastDamageTime = 0.0f; fadeTime = 0; fadeRate = 0.0; fadeFromColor.Zero(); fadeToColor.Zero(); fadeColor.Zero(); shakeAng.Zero(); fxManager = NULL; if ( fxManager == NULL ) { fxManager = new (TAG_ENTITY) FullscreenFXManager; fxManager->Initialize( this ); } ClearEffects(); }
void FGameplayCueHandler::GameplayCueRemoved(const FGameplayTagContainer& GameplayCueTags, float NormalizedMagnitude, const FGameplayEffectContextHandle& EffectContext) { check(Owner); bool InstigatorLocal = EffectContext.IsLocallyControlled(); bool TargetLocal = OwnerIsLocallyControlled(); for (auto TagIt = GameplayCueTags.CreateConstIterator(); TagIt; ++TagIt) { TArray<TSharedPtr<FGameplayCueViewEffects> > *Effects = SpawnedViewEffects.Find(*TagIt); if (Effects) { ClearEffects(*Effects); SpawnedViewEffects.Remove(*TagIt); } // Remove old effects if (FGameplayCueViewInfo * View = GetBestMatchingView(EGameplayCueEvent::Removed, *TagIt, InstigatorLocal, TargetLocal)) { View->SpawnViewEffects(Owner, NULL, EffectContext); } FName MatchedTag; UFunction *Func = UAbilitySystemGlobals::Get().GetGameplayCueFunction(*TagIt, Owner->GetClass(), MatchedTag); if (Func) { FGameplayCueParameters Params; Params.NormalizedMagnitude = NormalizedMagnitude; Params.EffectContext = EffectContext; IGameplayCueInterface::DispatchBlueprintCustomHandler(Owner, Func, EGameplayCueEvent::Removed, Params); } } }
//========================================================= // Spawn //========================================================= void CNPC_HAssassin::Spawn() { Precache( ); SetModel( "models/hassassin.mdl"); SetHullType(HULL_HUMAN); SetHullSizeNormal(); SetNavType ( NAV_GROUND ); SetSolid( SOLID_BBOX ); AddSolidFlags( FSOLID_NOT_STANDABLE ); SetMoveType( MOVETYPE_STEP ); m_bloodColor = BLOOD_COLOR_RED; ClearEffects(); m_iHealth = sk_hassassin_health.GetFloat(); m_flFieldOfView = VIEW_FIELD_WIDE; // indicates the width of this monster's forward view cone ( as a dotproduct result ) m_NPCState = NPC_STATE_NONE; m_HackedGunPos = Vector( 0, 24, 48 ); m_iTargetRanderamt = 20; SetRenderColor( 255, 255, 255, 20 ); m_nRenderMode = kRenderTransTexture; CapabilitiesClear(); CapabilitiesAdd( bits_CAP_MOVE_GROUND ); CapabilitiesAdd( bits_CAP_INNATE_RANGE_ATTACK1 | bits_CAP_INNATE_RANGE_ATTACK2 | bits_CAP_INNATE_MELEE_ATTACK1 ); NPCInit(); }
/* ============== idPlayerView::idPlayerView ============== */ idPlayerView::idPlayerView() { memset( screenBlobs, 0, sizeof( screenBlobs ) ); memset( &view, 0, sizeof( view ) ); player = NULL; dvMaterial = declManager->FindMaterial( "_scratch" ); tunnelMaterial = declManager->FindMaterial( "textures/decals/tunnel" ); armorMaterial = declManager->FindMaterial( "armorViewEffect" ); berserkMaterial = declManager->FindMaterial( "textures/decals/berserk" ); irGogglesMaterial = declManager->FindMaterial( "textures/decals/irblend" ); bloodSprayMaterial = declManager->FindMaterial( "textures/decals/bloodspray" ); bfgMaterial = declManager->FindMaterial( "textures/decals/bfgvision" ); lagoMaterial = declManager->FindMaterial( LAGO_MATERIAL, false ); bfgVision = false; dvFinishTime = 0; kickFinishTime = 0; kickAngles.Zero(); lastDamageTime = 0.0f; fadeTime = 0; fadeRate = 0.0; fadeFromColor.Zero(); fadeToColor.Zero(); fadeColor.Zero(); shakeAng.Zero(); ClearEffects(); }
void CNPC_Hydra::Spawn() { Precache(); BaseClass::Spawn(); SetModel( "models/Hydra.mdl" ); SetHullType(HULL_HUMAN); SetHullSizeNormal(); SetSolid( SOLID_BBOX ); AddSolidFlags( FSOLID_NOT_STANDABLE ); SetMoveType( MOVETYPE_STEP ); SetBloodColor( BLOOD_COLOR_RED ); ClearEffects(); m_iHealth = 20; m_flFieldOfView = -1.0;// indicates the width of this NPC's forward view cone ( as a dotproduct result ) m_NPCState = NPC_STATE_NONE; GetVectors( NULL, NULL, &m_vecOutward ); SetAbsAngles( QAngle( 0, 0, 0 ) ); m_vecChain.Set( 0, GetAbsOrigin( ) - m_vecOutward * 32 ); m_vecChain.Set( 1, GetAbsOrigin( ) + m_vecOutward * 16 ); m_vecHeadGoal = m_vecChain[1] + m_vecOutward * HYDRA_OUTWARD_BIAS; m_vecHeadDir = Vector( 0, 0, 1 ); // init bones HydraBone bone; bone.flActualLength = 0.0f; bone.vecGoalPos = Vector(0.0f, 0.0f, 0.0f); bone.vecPos = GetAbsOrigin( ) - m_vecOutward * HYDRA_INWARD_BIAS; m_body.AddToTail( bone ); bone.vecPos = m_vecChain[1]; m_body.AddToTail( bone ); bone.vecPos = m_vecHeadGoal; m_body.AddToTail( bone ); bone.vecPos = m_vecHeadGoal + m_vecHeadDir; m_body.AddToTail( bone ); m_idealSegmentLength = sv_hydraSegmentLength.GetFloat(); for (int i = 2; i < CHAIN_LINKS; i++) { m_vecChain.Set( i, m_vecChain[i-1] ); } m_seed = random->RandomFloat( 0.0, 2000.0 ); NPCInit(); m_takedamage = DAMAGE_NO; }
// // Tentacle Spawn // void CNPC_Tentacle::Spawn( ) { Precache( ); SetSolid( SOLID_BBOX ); //Necessary for TestCollision to be called for hitbox ray hits AddSolidFlags( FSOLID_CUSTOMRAYTEST ); SetMoveType( MOVETYPE_NONE ); ClearEffects(); m_iHealth = 75; SetSequence( 0 ); SetModel( "models/tentacle2.mdl" ); UTIL_SetSize( this, Vector( -32, -32, 0 ), Vector( 32, 32, 64 ) ); // Use our hitboxes to determine our render bounds CollisionProp()->SetSurroundingBoundsType( USE_HITBOXES ); m_takedamage = DAMAGE_AIM; AddFlag( FL_NPC ); m_bloodColor = BLOOD_COLOR_GREEN; ResetSequenceInfo( ); m_iDir = 1; SetThink( &CNPC_Tentacle::Start ); SetNextThink( gpGlobals->curtime + 0.2 ); SetTouch( &CNPC_Tentacle::HitTouch ); m_flInitialYaw = GetAbsAngles().y; GetMotor()->SetIdealYawAndUpdate( m_flInitialYaw ); g_fFlySound = FALSE; g_fSquirmSound = FALSE; m_iHitDmg = 200; if (m_flMaxYaw <= 0) m_flMaxYaw = 65; m_NPCState = NPC_STATE_IDLE; UTIL_SetOrigin( this, GetAbsOrigin() ); CreateVPhysics(); AddEffects( EF_NOSHADOW ); }
func AttackOrder(x, y) { ClearEffects(); Sound("Ball::ball_order", false, 20); var eff = AddEffect("MoveTo", this, 1, 1, this); eff.x = master->GetX() + x; eff.y = master->GetY() + y; var angle = Angle(GetX(), GetY(), eff.x, eff.y, 10); SetVelocity(angle, Speed, 10); }
func Discharge() { ClearEffects(); SetXDir(0); SetYDir(0); ox=GetX(); oy=GetY(); AddEffect("Discharge", this, 1, 1 ,this); Sound("Ball::ball_start_discharge", false, 20); }
func HomeCall() { ClearEffects(); Sound("Ball::ball_call", false, 20); var eff = AddEffect("HomeCall", this, 1, 1, this); eff.x = master->GetX(); eff.y = master->GetY(); var angle = Angle(GetX(), GetY(), eff.x, eff.y, 10); SetVelocity(angle, Speed, 10); }
BOOL C4SoundSystem::Init() { if (!Application.MusicSystem.MODInitialized && !Application.MusicSystem.InitializeMOD()) return false; // Might be reinitialisation ClearEffects(); // Open sound file if (!SoundFile.IsOpen()) if (!SoundFile.Open(Config.AtExePath(C4CFN_Sound))) return false; #ifdef HAVE_LIBSDL_MIXER Mix_AllocateChannels(C4MaxSoundInstances); #endif return true; }
void CNPC_AlienGrunt::Spawn() { Precache(); SetModel( "models/agrunt.mdl"); UTIL_SetSize( this, Vector( -32, -32, 0 ), Vector( 32, 32, 64 ) ); SetSolid( SOLID_BBOX ); AddSolidFlags( FSOLID_NOT_STANDABLE ); Vector vecSurroundingMins( -32, -32, 0 ); Vector vecSurroundingMaxs( 32, 32, 85 ); CollisionProp()->SetSurroundingBoundsType( USE_SPECIFIED_BOUNDS, &vecSurroundingMins, &vecSurroundingMaxs ); SetMoveType( MOVETYPE_STEP ); m_bloodColor = BLOOD_COLOR_GREEN; ClearEffects(); m_iHealth = sk_agrunt_health.GetFloat(); m_flFieldOfView = 0.2;// indicates the width of this monster's forward view cone ( as a dotproduct result ) m_NPCState = NPC_STATE_NONE; CapabilitiesClear(); CapabilitiesAdd ( bits_CAP_SQUAD | bits_CAP_MOVE_GROUND ); CapabilitiesAdd(bits_CAP_INNATE_RANGE_ATTACK1 ); // Innate range attack for kicking CapabilitiesAdd(bits_CAP_INNATE_MELEE_ATTACK1 ); m_HackedGunPos = Vector( 24, 64, 48 ); m_flNextSpeakTime = m_flNextWordTime = gpGlobals->curtime + 10 + random->RandomInt( 0, 10 ); SetHullType(HULL_WIDE_HUMAN); SetHullSizeNormal(); SetRenderColor( 255, 255, 255, 255 ); NPCInit(); BaseClass::Spawn(); }
bool C4SoundSystem::Init() { if (!Application.MusicSystem.MODInitialized && !Application.MusicSystem.InitializeMOD()) return false; // Might be reinitialisation ClearEffects(); // (re)init EFX Modifiers.Init(); // Open sound file if (!SoundFile.IsOpen()) if (!Reloc.Open(SoundFile, C4CFN_Sound)) return false; // Load static sound from Sound.ocg LoadEffects(SoundFile, NULL, false); #if AUDIO_TK == AUDIO_TK_SDL_MIXER Mix_AllocateChannels(C4MaxSoundInstances); #endif return true; }
//========================================================= // ********** DeadBarney SPAWN ********** //========================================================= void CNPC_DeadBarney::Spawn( void ) { PrecacheModel("models/barneyhl1.mdl"); SetModel( "models/barneyhl1.mdl"); ClearEffects(); SetSequence( 0 ); m_bloodColor = BLOOD_COLOR_RED; SetRenderColor( 255, 255, 255, 255 ); SetSequence( m_iDesiredSequence = LookupSequence( m_szPoses[m_iPose] ) ); if ( GetSequence() == -1 ) { Msg ( "Dead barney with bad pose\n" ); } // Corpses have less health m_iHealth = 0.0;//gSkillData.barneyHealth; NPCInitDead(); }
void FGameplayCueHandler::GameplayCueAdded(const FGameplayTagContainer& GameplayCueTags, float NormalizedMagnitude, const FGameplayEffectContextHandle& EffectContext) { check(Owner); bool InstigatorLocal = EffectContext.IsLocallyControlled(); bool TargetLocal = OwnerIsLocallyControlled(); for (auto TagIt = GameplayCueTags.CreateConstIterator(); TagIt; ++TagIt) { TArray<TSharedPtr<FGameplayCueViewEffects> > &Effects = SpawnedViewEffects.FindOrAdd(*TagIt); // Clear old effects if they existed? This will vary case to case. Removing old effects is the easiest approach ClearEffects(Effects); check(Effects.Num() == 0); if (FGameplayCueViewInfo * View = GetBestMatchingView(EGameplayCueEvent::WhileActive, *TagIt, InstigatorLocal, TargetLocal)) { TSharedPtr<FGameplayCueViewEffects> SpawnedEffects = View->SpawnViewEffects(Owner, &SpawnedObjects, EffectContext); Effects.Add(SpawnedEffects); } } }
BitmapScreen::BitmapScreen(BitmapRef const& bitmap) : bitmap(bitmap), bitmap_effects_valid(false), bitmap_scale_valid(false) { ClearEffects(); bitmap_changed = true; current_tone = tone_effect; current_zoom_x = zoom_x_effect; current_zoom_y = zoom_y_effect; current_flip_x = flipx_effect; current_flip_y = flipy_effect; current_flash = flash_effect; bitmap_effects_src_rect = Rect(); bitmap_scale_src_rect = Rect(); if (bitmap != NULL) { src_rect_effect = bitmap->GetRect(); bitmap->AttachBitmapScreen(this); } }
/* ============== idPlayerView::idPlayerView ============== */ idPlayerView::idPlayerView() : m_postProcessManager() // Invoke the postprocess Manager Constructor - J.C.Denton { memset( screenBlobs, 0, sizeof( screenBlobs ) ); memset( &view, 0, sizeof( view ) ); player = NULL; dvMaterial = declManager->FindMaterial( "_scratch" ); tunnelMaterial = declManager->FindMaterial( "textures/darkmod/decals/tunnel" ); // damage overlay bloodSprayMaterial = declManager->FindMaterial( "textures/decals/bloodspray" ); lagoMaterial = declManager->FindMaterial( LAGO_MATERIAL, false ); dvFinishTime = 0; kickFinishTime = 0; kickAngles.Zero(); lastDamageTime = 0.0f; fadeTime = 0; fadeRate = 0.0; fadeFromColor.Zero(); fadeToColor.Zero(); fadeColor.Zero(); shakeAng.Zero(); /* fxManager = NULL; if ( !fxManager ) { fxManager = new FullscreenFXManager; fxManager->Initialize( this ); } */ ClearEffects(); // JC: Just set the flag so that we know that the update is needed. cv_ambient_method.SetModified(); cv_interaction_vfp_type.SetModified(); // Always update interaction shader the first time. J.C.Denton }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CNPC_Bullseye::Spawn( void ) { Precache(); // This is a dummy model that is never used! UTIL_SetSize(this, Vector(-16,-16,-16), Vector(16,16,16)); SetMoveType( MOVETYPE_NONE ); SetBloodColor( BLOOD_COLOR_RED ); ClearEffects(); SetGravity( 0.0 ); m_flFieldOfView = cos( DEG2RAD(m_flFieldOfView) / 2.0 ); //Got blood? if ( m_spawnflags & SF_BULLSEYE_BLEED ) { SetBloodColor(BLOOD_COLOR_RED); } else { SetBloodColor(DONT_BLEED); } AddFlag( FL_NPC ); AddEFlags( EFL_NO_DISSOLVE ); SetThink( &CNPC_Bullseye::BullseyeThink ); SetNextThink( gpGlobals->curtime + 0.1f ); SetSolid( SOLID_BBOX ); AddSolidFlags( FSOLID_NOT_STANDABLE ); if( m_spawnflags & SF_BULLSEYE_NONSOLID ) { AddSolidFlags( FSOLID_NOT_SOLID ); } if ( m_spawnflags & SF_BULLSEYE_VPHYSICSSHADOW ) { VPhysicsInitShadow( false, false ); } if( m_spawnflags & SF_BULLSEYE_NODAMAGE ) { m_takedamage = DAMAGE_NO; } else { m_takedamage = DAMAGE_YES; } AddEffects( EF_NODRAW ); //Check our water level PhysicsCheckWater(); CapabilitiesAdd( bits_CAP_SIMPLE_RADIUS_DAMAGE ); m_iMaxHealth = GetHealth(); if( m_fAutoaimRadius > 0.0f ) { // Make this an aimtarget, since it has some autoaim influence. AddFlag(FL_AIMTARGET); } }
Actor::~Actor() { ClearEffects(); }