diff --git a/code/swb_base/ViewModelBase.cs b/code/swb_base/ViewModelBase.cs index 3d57e8b4..4b155def 100644 --- a/code/swb_base/ViewModelBase.cs +++ b/code/swb_base/ViewModelBase.cs @@ -5,95 +5,95 @@ namespace SWB_Base { - class ViewModelBase : BaseViewModel - { - private WeaponBase weapon; - - private Vector3 lerpMovementPos; - private Angles lerpMovementAngle; - private Vector3 lerpSwayPos; - private Rotation lerpSwayRotation; - private Vector3 lerpZoomPos; - private Angles lerpZoomAngle; - private Vector3 lerpRunPos; - private Angles lerpRunAngle; - private Vector3 lerpTuckPos; - private Angles lerpTuckAngle; - - private float lerpZoomFOV; - - private float walkBob = 0; - private float tuckDist = -1; - - private int maxSideSway = 2; - private int maxJumpSway = 4; - private int maxMoveSway = 5; - private int maxTiltSway = 5; - - private bool isInJump = false; - private bool isDualWieldVM = true; - private bool liveEditing = false; - - /* + class ViewModelBase : BaseViewModel + { + private WeaponBase weapon; + + private Vector3 lerpMovementPos; + private Angles lerpMovementAngle; + private Vector3 lerpSwayPos; + private Rotation lerpSwayRotation; + private Vector3 lerpZoomPos; + private Angles lerpZoomAngle; + private Vector3 lerpRunPos; + private Angles lerpRunAngle; + private Vector3 lerpTuckPos; + private Angles lerpTuckAngle; + + private float lerpZoomFOV; + + private float walkBob = 0; + private float tuckDist = -1; + + private int maxSideSway = 2; + private int maxJumpSway = 4; + private int maxMoveSway = 5; + private int maxTiltSway = 5; + + private bool isInJump = false; + private bool isDualWieldVM = true; + private bool liveEditing = false; + + /* * Add realistic viewbobbing! */ - public ViewModelBase( WeaponBase weapon, bool isDualWieldVM = false ) - { - this.weapon = weapon; - this.isDualWieldVM = isDualWieldVM; - } - - public override void PostCameraSetup( ref CameraSetup camSetup ) - { - base.PostCameraSetup( ref camSetup ); - - if ( weapon.IsDormant ) return; - - FieldOfView = weapon.FOV; - tuckDist = weapon.GetTuckDist(); - - if ( isDualWieldVM ) - { - FlipViewModel( ref camSetup ); - } - - AddIdleAnimations( ref camSetup ); - AddViewbobAnimations( ref camSetup ); - AddMovementAnimations( ref camSetup ); - AddWeaponSwayAnimations( ref camSetup ); - AddActionAnimations( ref camSetup ); - } - - private void FlipViewModel( ref CameraSetup camSetup ) - { - // Waiting for https://github.com/Facepunch/sbox-issues/issues/324 - - // Temp solution: - var posOffset = Vector3.Zero; - posOffset -= camSetup.Rotation.Right * 10; - Position += posOffset; - } - - // Idle animations - private void AddIdleAnimations( ref CameraSetup camSetup ) - { - if ( liveEditing ) return; - if ( weapon.IsZooming && !weapon.ShouldTuck( tuckDist ) ) return; - - var left = camSetup.Rotation.Left; - var up = camSetup.Rotation.Up; - var realTime = RealTime.Now; - var sideSwingMod = 0.1f; - var upSwingMod = -0.1f; - - Position += up * MathF.Sin( realTime ) * upSwingMod; - Position += left * MathF.Sin( realTime * sideSwingMod ) * -0.5f; - } - - // Viewbob animations - private void AddViewbobAnimations( ref CameraSetup camSetup ) - { + public ViewModelBase( WeaponBase weapon, bool isDualWieldVM = false ) + { + this.weapon = weapon; + this.isDualWieldVM = isDualWieldVM; + } + + public override void PostCameraSetup( ref CameraSetup camSetup ) + { + base.PostCameraSetup( ref camSetup ); + + if ( weapon.IsDormant ) return; + + FieldOfView = weapon.FOV; + tuckDist = weapon.GetTuckDist(); + + if ( isDualWieldVM ) + { + FlipViewModel( ref camSetup ); + } + + AddIdleAnimations( ref camSetup ); + AddViewbobAnimations( ref camSetup ); + AddMovementAnimations( ref camSetup ); + AddWeaponSwayAnimations( ref camSetup ); + AddActionAnimations( ref camSetup ); + } + + private void FlipViewModel( ref CameraSetup camSetup ) + { + // Waiting for https://github.com/Facepunch/sbox-issues/issues/324 + + // Temp solution: + var posOffset = Vector3.Zero; + posOffset -= camSetup.Rotation.Right * 10; + Position += posOffset; + } + + // Idle animations + private void AddIdleAnimations( ref CameraSetup camSetup ) + { + if ( liveEditing ) return; + if ( weapon.IsZooming && !weapon.ShouldTuck( tuckDist ) ) return; + + var left = camSetup.Rotation.Left; + var up = camSetup.Rotation.Up; + var realTime = RealTime.Now; + var sideSwingMod = 0.1f; + var upSwingMod = -0.1f; + + Position += up * MathF.Sin( realTime ) * upSwingMod; + Position += left * MathF.Sin( realTime * sideSwingMod ) * -0.5f; + } + + // Viewbob animations + private void AddViewbobAnimations( ref CameraSetup camSetup ) + { /* WIP float speedMod = 1; @@ -124,194 +124,194 @@ private void AddViewbobAnimations( ref CameraSetup camSetup ) Position += forward * tan * 0.4f; */ - var speed = Owner.Velocity.Length.LerpInverse( 0, 320 ); - speed = speed * weapon.WalkAnimationSpeedMod; + var speed = Owner.Velocity.Length.LerpInverse( 0, 320 ); + speed = speed * weapon.WalkAnimationSpeedMod; - var left = camSetup.Rotation.Left; - var up = camSetup.Rotation.Up; - - if ( Owner.GroundEntity != null ) - { - walkBob += Time.Delta * 25.0f * speed; - } + var left = camSetup.Rotation.Left; + var up = camSetup.Rotation.Up; - var sideSwingMod = -1f; - var upSwingMod = 0.6f; + if ( Owner.GroundEntity != null ) + { + walkBob += Time.Delta * 25.0f * speed; + } - if ( weapon.IsZooming ) - { - speed = speed * 0.25f; - sideSwingMod = sideSwingMod * 0.4f; - upSwingMod = upSwingMod * 0.4f; - } + var sideSwingMod = -1f; + var upSwingMod = 0.6f; - Position += up * MathF.Sin( walkBob ) * speed * sideSwingMod; - Position += left * MathF.Sin( walkBob * upSwingMod ) * speed * -0.5f; + if ( weapon.IsZooming ) + { + speed = speed * 0.25f; + sideSwingMod = sideSwingMod * 0.4f; + upSwingMod = upSwingMod * 0.4f; + } + + Position += up * MathF.Sin( walkBob ) * speed * sideSwingMod; + Position += left * MathF.Sin( walkBob * upSwingMod ) * speed * -0.5f; } // Movement animations private void AddMovementAnimations( ref CameraSetup camSetup ) - { - // Angles - // var xSpeed = Math.Clamp( Owner.Velocity.x * 0.1f, -maxSideSway, maxSideSway ); // Is not predicted yet so looks weird - var zSpeed = Math.Clamp( Owner.Velocity.z * 0.1f, -maxJumpSway, maxJumpSway ); - var movAngle = new Angles( zSpeed, 0, 0 ); - - lerpMovementAngle = MathZ.FILerp( lerpMovementAngle, movAngle, 10f * weapon.WalkAnimationSpeedMod ); - Rotation *= Rotation.From( lerpMovementAngle ); - - // Pos - var up = camSetup.Rotation.Up; - var targPos = Vector3.Zero; - targPos -= up * zSpeed * 0.1f; - - lerpMovementPos = MathZ.FILerp( lerpMovementPos, targPos, 10f * weapon.WalkAnimationSpeedMod ); - Position += lerpMovementPos; - } - - // Sway animations - private void AddWeaponSwayAnimations( ref CameraSetup camSetup ) - { - var swayAmountMod = 1f; - - if ( weapon.IsZooming ) - swayAmountMod = 0.25f; - - // Move sway - var right = camSetup.Rotation.Right; - var up = camSetup.Rotation.Up; - var targPos = Vector3.Zero; - targPos -= right * Math.Clamp( Mouse.Delta.x * swayAmountMod * 0.5f, -maxMoveSway, maxMoveSway ); - targPos += up * Math.Clamp( Mouse.Delta.y * swayAmountMod * 0.5f, -maxMoveSway, maxMoveSway ); - - lerpSwayPos = MathZ.FILerp( lerpSwayPos, targPos, 10f * weapon.WalkAnimationSpeedMod ); - Position += lerpSwayPos; - - // Tilt sway - var tiltX = Math.Clamp( Mouse.Delta.x * swayAmountMod * 1, -maxTiltSway, maxTiltSway ); - var tiltY = Math.Clamp( Mouse.Delta.y * swayAmountMod * 2, -maxTiltSway, maxTiltSway ); - var targRotation = Rotation.From( tiltY, -tiltX, tiltX ); - - if ( lerpSwayRotation.w == 0 ) - lerpSwayRotation.w = 1; - - lerpSwayRotation = Rotation.Slerp( lerpSwayRotation, targRotation, RealTime.Delta * 10f * weapon.WalkAnimationSpeedMod ); - Rotation *= lerpSwayRotation; - } - - private void LerpToPosition( Angles angles, Vector3 pos, ref Angles lerpTargAngle, ref Vector3 lerpTargPos, ref CameraSetup camSetup ) - { - // Angles - lerpTargAngle = MathZ.FILerp( lerpTargAngle, angles, 10f ); + { + // Angles + // var xSpeed = Math.Clamp( Owner.Velocity.x * 0.1f, -maxSideSway, maxSideSway ); // Is not predicted yet so looks weird + var zSpeed = Math.Clamp( Owner.Velocity.z * 0.1f, -maxJumpSway, maxJumpSway ); + var movAngle = new Angles( zSpeed, 0, 0 ); + + lerpMovementAngle = MathUtil.FILerp( lerpMovementAngle, movAngle, 10f * weapon.WalkAnimationSpeedMod ); + Rotation *= Rotation.From( lerpMovementAngle ); + + // Pos + var up = camSetup.Rotation.Up; + var targPos = Vector3.Zero; + targPos -= up * zSpeed * 0.1f; + + lerpMovementPos = MathUtil.FILerp( lerpMovementPos, targPos, 10f * weapon.WalkAnimationSpeedMod ); + Position += lerpMovementPos; + } + + // Sway animations + private void AddWeaponSwayAnimations( ref CameraSetup camSetup ) + { + var swayAmountMod = 1f; + + if ( weapon.IsZooming ) + swayAmountMod = 0.25f; + + // Move sway + var right = camSetup.Rotation.Right; + var up = camSetup.Rotation.Up; + var targPos = Vector3.Zero; + targPos -= right * Math.Clamp( Mouse.Delta.x * swayAmountMod * 0.5f, -maxMoveSway, maxMoveSway ); + targPos += up * Math.Clamp( Mouse.Delta.y * swayAmountMod * 0.5f, -maxMoveSway, maxMoveSway ); + + lerpSwayPos = MathUtil.FILerp( lerpSwayPos, targPos, 10f * weapon.WalkAnimationSpeedMod ); + Position += lerpSwayPos; + + // Tilt sway + var tiltX = Math.Clamp( Mouse.Delta.x * swayAmountMod * 1, -maxTiltSway, maxTiltSway ); + var tiltY = Math.Clamp( Mouse.Delta.y * swayAmountMod * 2, -maxTiltSway, maxTiltSway ); + var targRotation = Rotation.From( tiltY, -tiltX, tiltX ); + + if ( lerpSwayRotation.w == 0 ) + lerpSwayRotation.w = 1; + + lerpSwayRotation = Rotation.Slerp( lerpSwayRotation, targRotation, RealTime.Delta * 10f * weapon.WalkAnimationSpeedMod ); + Rotation *= lerpSwayRotation; + } + + private void LerpToPosition( Angles angles, Vector3 pos, ref Angles lerpTargAngle, ref Vector3 lerpTargPos, ref CameraSetup camSetup ) + { + // Angles + lerpTargAngle = MathUtil.FILerp( lerpTargAngle, angles, 10f ); Rotation *= Rotation.From( lerpTargAngle ); - // Position - lerpTargPos = MathZ.FILerp( lerpTargPos, pos, 10f ); - - var right = camSetup.Rotation.Right; - var up = camSetup.Rotation.Up; - var forward = camSetup.Rotation.Forward; - - var posOffset = Vector3.Zero; - posOffset += right * lerpTargPos.x; - posOffset += up * lerpTargPos.y; - posOffset += forward * lerpTargPos.z; - - Position += posOffset; - } - - // Action animations - private void AddActionAnimations( ref CameraSetup camSetup ) - { - - if ( weapon.ShouldTuck( tuckDist ) && weapon.RunAnimData != null ) - { - var animationCompletion = Math.Min( 1, ((weapon.TuckRange - tuckDist) / weapon.TuckRange) + 0.5f ); - LerpToPosition( weapon.RunAnimData.Angle * animationCompletion, weapon.RunAnimData.Pos * animationCompletion, ref lerpTuckAngle, ref lerpTuckPos, ref camSetup ); - - // Prevent other animations while tucking - return; - - } - else if ( tuckDist == -1 && lerpTuckPos != Vector3.Zero ) - { - if ( !weapon.IsZooming && !weapon.IsRunning ) - { - LerpToPosition( Angles.Zero, Vector3.Zero, ref lerpTuckAngle, ref lerpTuckPos, ref camSetup ); - } - else - { - lerpTuckPos = Vector3.Zero; - lerpTuckAngle = Angles.Zero; - } - } - - if ( weapon.IsZooming && weapon.ZoomAnimData != null ) - { - // Zoom in - LerpToPosition( weapon.ZoomAnimData.Angle, weapon.ZoomAnimData.Pos, ref lerpZoomAngle, ref lerpZoomPos, ref camSetup ); - - // FOV - lerpZoomFOV = MathZ.FILerp( lerpZoomFOV, weapon.ZoomFOV, 10f ); - FieldOfView = lerpZoomFOV; - - // Freeze viewmodel (temp solution) - if ( !string.IsNullOrEmpty( weapon.FreezeViewModelOnZoom ) ) - SetAnimBool( weapon.FreezeViewModelOnZoom, true ); - - } - else if ( !lerpZoomPos.IsNearlyEqual( Vector3.Zero, 0.01f ) ) - { - // Zoom out - LerpToPosition( Angles.Zero, Vector3.Zero, ref lerpZoomAngle, ref lerpZoomPos, ref camSetup ); - - // FOV (restore) - lerpZoomFOV = MathZ.FILerp( lerpZoomFOV, weapon.FOV, 10f ); - FieldOfView = lerpZoomFOV; - - } - else - { - if ( lerpZoomFOV != weapon.FOV ) - { - // Reset zoom vars - lerpZoomPos = Vector3.Zero; - lerpZoomAngle = Angles.Zero; - lerpZoomFOV = weapon.FOV; - } - } - - // DEBUG (set true to do live edits) - // liveEditing = true; - - if ( weapon.IsRunning && weapon.RunAnimData != null || liveEditing ) - { - var testAngles = weapon.RunAnimData.Angle; - var testPos = weapon.RunAnimData.Pos; - - if ( liveEditing ) - { - FieldOfView = weapon.ZoomFOV; - testAngles = new Angles( -2.85f, -0.34f, 6f ); - testPos = new Vector3( -5.245f, -1.05f, 0f ); - } - - LerpToPosition( testAngles, testPos, ref lerpRunAngle, ref lerpRunPos, ref camSetup ); - - } - else if ( !lerpRunPos.IsNearlyEqual( Vector3.Zero, 0.01f ) ) - { - LerpToPosition( Angles.Zero, Vector3.Zero, ref lerpRunAngle, ref lerpRunPos, ref camSetup ); - - } - else - { - if ( lerpRunPos != Vector3.Zero ) - { - lerpRunPos = Vector3.Zero; - lerpRunAngle = Angles.Zero; - } - } - } - } + // Position + lerpTargPos = MathUtil.FILerp( lerpTargPos, pos, 10f ); + + var right = camSetup.Rotation.Right; + var up = camSetup.Rotation.Up; + var forward = camSetup.Rotation.Forward; + + var posOffset = Vector3.Zero; + posOffset += right * lerpTargPos.x; + posOffset += up * lerpTargPos.y; + posOffset += forward * lerpTargPos.z; + + Position += posOffset; + } + + // Action animations + private void AddActionAnimations( ref CameraSetup camSetup ) + { + + if ( weapon.ShouldTuck( tuckDist ) && weapon.RunAnimData != null ) + { + var animationCompletion = Math.Min( 1, ((weapon.TuckRange - tuckDist) / weapon.TuckRange) + 0.5f ); + LerpToPosition( weapon.RunAnimData.Angle * animationCompletion, weapon.RunAnimData.Pos * animationCompletion, ref lerpTuckAngle, ref lerpTuckPos, ref camSetup ); + + // Prevent other animations while tucking + return; + + } + else if ( tuckDist == -1 && lerpTuckPos != Vector3.Zero ) + { + if ( !weapon.IsZooming && !weapon.IsRunning ) + { + LerpToPosition( Angles.Zero, Vector3.Zero, ref lerpTuckAngle, ref lerpTuckPos, ref camSetup ); + } + else + { + lerpTuckPos = Vector3.Zero; + lerpTuckAngle = Angles.Zero; + } + } + + if ( weapon.IsZooming && weapon.ZoomAnimData != null ) + { + // Zoom in + LerpToPosition( weapon.ZoomAnimData.Angle, weapon.ZoomAnimData.Pos, ref lerpZoomAngle, ref lerpZoomPos, ref camSetup ); + + // FOV + lerpZoomFOV = MathUtil.FILerp( lerpZoomFOV, weapon.ZoomFOV, 10f ); + FieldOfView = lerpZoomFOV; + + // Freeze viewmodel (temp solution) + if ( !string.IsNullOrEmpty( weapon.FreezeViewModelOnZoom ) ) + SetAnimBool( weapon.FreezeViewModelOnZoom, true ); + + } + else if ( !lerpZoomPos.IsNearlyEqual( Vector3.Zero, 0.01f ) ) + { + // Zoom out + LerpToPosition( Angles.Zero, Vector3.Zero, ref lerpZoomAngle, ref lerpZoomPos, ref camSetup ); + + // FOV (restore) + lerpZoomFOV = MathUtil.FILerp( lerpZoomFOV, weapon.FOV, 10f ); + FieldOfView = lerpZoomFOV; + + } + else + { + if ( lerpZoomFOV != weapon.FOV ) + { + // Reset zoom vars + lerpZoomPos = Vector3.Zero; + lerpZoomAngle = Angles.Zero; + lerpZoomFOV = weapon.FOV; + } + } + + // DEBUG (set true to do live edits) + // liveEditing = true; + + if ( weapon.IsRunning && weapon.RunAnimData != null || liveEditing ) + { + var testAngles = weapon.RunAnimData.Angle; + var testPos = weapon.RunAnimData.Pos; + + if ( liveEditing ) + { + FieldOfView = weapon.ZoomFOV; + testAngles = new Angles( -2.85f, -0.34f, 6f ); + testPos = new Vector3( -5.245f, -1.05f, 0f ); + } + + LerpToPosition( testAngles, testPos, ref lerpRunAngle, ref lerpRunPos, ref camSetup ); + + } + else if ( !lerpRunPos.IsNearlyEqual( Vector3.Zero, 0.01f ) ) + { + LerpToPosition( Angles.Zero, Vector3.Zero, ref lerpRunAngle, ref lerpRunPos, ref camSetup ); + + } + else + { + if ( lerpRunPos != Vector3.Zero ) + { + lerpRunPos = Vector3.Zero; + lerpRunAngle = Angles.Zero; + } + } + } + } } diff --git a/code/swb_base/WeaponBase.Attack.cs b/code/swb_base/WeaponBase.Attack.cs index 55456dd1..5cc29a74 100644 --- a/code/swb_base/WeaponBase.Attack.cs +++ b/code/swb_base/WeaponBase.Attack.cs @@ -47,7 +47,7 @@ public virtual void Attack( ClipInfo clipInfo, bool isPrimary ) (Owner as AnimEntity).SetAnimBool( "b_attack", true ); // Tell the clients to play the shoot effects - BlastUtil.ScreenShakeRPC( clipInfo.ScreenShake.Length, clipInfo.ScreenShake.Speed, clipInfo.ScreenShake.Size, clipInfo.ScreenShake.Rotation ); + ScreenUtil.Shake( clipInfo.ScreenShake ); ShootEffects( clipInfo.MuzzleFlashParticle, clipInfo.BulletEjectParticle, clipInfo.ShootAnim ); if ( clipInfo.ShootSound != null ) @@ -100,7 +100,7 @@ async Task AsyncAttack( ClipInfo clipInfo, bool isPrimary, float delay ) TakeAmmo( 1 ); // Play shoot effects - BlastUtil.ScreenShakeRPC( clipInfo.ScreenShake.Length, clipInfo.ScreenShake.Speed, clipInfo.ScreenShake.Size, clipInfo.ScreenShake.Rotation ); + ScreenUtil.Shake( clipInfo.ScreenShake ); ShootEffects( clipInfo.MuzzleFlashParticle, clipInfo.BulletEjectParticle, null ); if ( clipInfo.ShootSound != null ) diff --git a/code/swb_base/WeaponBase.Entity.cs b/code/swb_base/WeaponBase.Entity.cs index 0f23aa79..37c3d0a1 100644 --- a/code/swb_base/WeaponBase.Entity.cs +++ b/code/swb_base/WeaponBase.Entity.cs @@ -89,7 +89,7 @@ public virtual void FireEntity( ClipInfo clipInfo, bool isPrimary ) firedEntity.SetModel( EntityModel ); firedEntity.Owner = Owner; - firedEntity.Position = MathZ.RelativeAdd( Position, EntitySpawnOffset, Owner.EyeRot ); + firedEntity.Position = MathUtil.RelativeAdd( Position, EntitySpawnOffset, Owner.EyeRot ); firedEntity.Rotation = Owner.EyeRot * Rotation.From( EntityAngles ); firedEntity.RemoveDelay = RemoveDelay; @@ -98,7 +98,7 @@ public virtual void FireEntity( ClipInfo clipInfo, bool isPrimary ) firedEntity.IsSticky = IsSticky; firedEntity.Damage = clipInfo.Damage; firedEntity.Force = clipInfo.Force; - firedEntity.StartVelocity = MathZ.RelativeAdd( Vector3.Zero, EntityVelocity, Owner.EyeRot ); + firedEntity.StartVelocity = MathUtil.RelativeAdd( Vector3.Zero, EntityVelocity, Owner.EyeRot ); firedEntity.Start(); } @@ -120,7 +120,7 @@ public override void Attack( ClipInfo clipInfo, bool isPrimary ) (Owner as AnimEntity).SetAnimBool( "b_attack", true ); // Weapon anim - BlastUtil.ScreenShakeRPC( clipInfo.ScreenShake.Length, clipInfo.ScreenShake.Speed, clipInfo.ScreenShake.Size, clipInfo.ScreenShake.Rotation ); + ScreenUtil.Shake( clipInfo.ScreenShake ); ShootEffects( clipInfo.MuzzleFlashParticle, clipInfo.BulletEjectParticle, clipInfo.ShootAnim ); if ( !string.IsNullOrEmpty( clipInfo.ShootSound ) ) @@ -161,7 +161,7 @@ async Task AsyncAttack( ClipInfo clipInfo, bool isPrimary, float delay ) TakeAmmo( 1 ); // Play shoot effects - BlastUtil.ScreenShakeRPC( clipInfo.ScreenShake.Length, clipInfo.ScreenShake.Speed, clipInfo.ScreenShake.Size, clipInfo.ScreenShake.Rotation ); + ScreenUtil.Shake( clipInfo.ScreenShake ); ShootEffects( clipInfo.MuzzleFlashParticle, clipInfo.BulletEjectParticle, null ); if ( clipInfo.ShootSound != null ) diff --git a/code/swb_base/WeaponBase.Sniper.cs b/code/swb_base/WeaponBase.Sniper.cs index 6f1f10b2..0129da3a 100644 --- a/code/swb_base/WeaponBase.Sniper.cs +++ b/code/swb_base/WeaponBase.Sniper.cs @@ -114,7 +114,7 @@ public override void PostCameraSetup( ref CameraSetup camSetup ) if ( lerpZoomAmount == 0 ) lerpZoomAmount = camSetup.FieldOfView; - lerpZoomAmount = MathZ.FILerp( lerpZoomAmount, ZoomAmount, 10f ); + lerpZoomAmount = MathUtil.FILerp( lerpZoomAmount, ZoomAmount, 10f ); camSetup.FieldOfView = lerpZoomAmount; } } diff --git a/code/swb_base/WeaponBase.cs b/code/swb_base/WeaponBase.cs index 6a365919..c762a804 100644 --- a/code/swb_base/WeaponBase.cs +++ b/code/swb_base/WeaponBase.cs @@ -214,7 +214,7 @@ public override void BuildInput( InputBuilder input ) // Mouse sensitivity if ( IsZooming ) { - input.ViewAngles = MathZ.FILerp( input.OriginalViewAngles, input.ViewAngles, AimSensitivity * 90 ); + input.ViewAngles = MathUtil.FILerp( input.OriginalViewAngles, input.ViewAngles, AimSensitivity * 90 ); } // Recoil diff --git a/code/swb_base/entities/explosives/Grenade.cs b/code/swb_base/entities/explosives/Grenade.cs index 7fbb88d9..a76b60a8 100644 --- a/code/swb_base/entities/explosives/Grenade.cs +++ b/code/swb_base/entities/explosives/Grenade.cs @@ -40,7 +40,7 @@ async Task DelayedExplode() public virtual void Explode() { // Explosion sound - var explosionSound = MathZ.GetRandom( ExplosionSounds ); + var explosionSound = MathUtil.GetRandom( ExplosionSounds ); if ( !string.IsNullOrEmpty( explosionSound ) ) PlaySound( explosionSound ); @@ -49,7 +49,7 @@ public virtual void Explode() Particles.Create( ExplosionEffect, PhysicsBody.MassCenter ); // Screenshake - BlastUtil.ScreenShake( PhysicsBody.MassCenter, ExplosionRadius*1.5f, ExplosionShake ); + ScreenUtil.ShakeAt( PhysicsBody.MassCenter, ExplosionRadius*1.5f, ExplosionShake ); // Damage BlastUtil.Explode( PhysicsBody.MassCenter, ExplosionRadius, ExplosionDamage, ExplosionForce, Owner, Weapon, this ); diff --git a/code/swb_base/entities/explosives/Rocket.cs b/code/swb_base/entities/explosives/Rocket.cs index 921ed592..9a211694 100644 --- a/code/swb_base/entities/explosives/Rocket.cs +++ b/code/swb_base/entities/explosives/Rocket.cs @@ -65,7 +65,7 @@ public virtual void Explode() } // Explosion sound - var explosionSound = MathZ.GetRandom( ExplosionSounds ); + var explosionSound = MathUtil.GetRandom( ExplosionSounds ); if ( !string.IsNullOrEmpty( explosionSound ) ) PlaySound( explosionSound ); @@ -75,7 +75,7 @@ public virtual void Explode() Particles.Create( ExplosionEffect, PhysicsBody.MassCenter ); // Screenshake - BlastUtil.ScreenShake( PhysicsBody.MassCenter, ExplosionRadius*2, ExplosionShake ); + ScreenUtil.ShakeAt( PhysicsBody.MassCenter, ExplosionRadius*2, ExplosionShake ); // Damage BlastUtil.Explode( PhysicsBody.MassCenter, ExplosionRadius, ExplosionDamage, ExplosionForce, Owner, Weapon, this ); diff --git a/code/swb_base/util/AngPos.cs b/code/swb_base/structures/AngPos.cs similarity index 100% rename from code/swb_base/util/AngPos.cs rename to code/swb_base/structures/AngPos.cs diff --git a/code/swb_base/util/AnimatedAction.cs b/code/swb_base/structures/AnimatedAction.cs similarity index 100% rename from code/swb_base/util/AnimatedAction.cs rename to code/swb_base/structures/AnimatedAction.cs diff --git a/code/swb_base/util/ClipInfo.cs b/code/swb_base/structures/ClipInfo.cs similarity index 100% rename from code/swb_base/util/ClipInfo.cs rename to code/swb_base/structures/ClipInfo.cs diff --git a/code/swb_base/util/ScreenShake.cs b/code/swb_base/structures/ScreenShake.cs similarity index 100% rename from code/swb_base/util/ScreenShake.cs rename to code/swb_base/structures/ScreenShake.cs diff --git a/code/swb_base/util/BlastUtil.cs b/code/swb_base/util/BlastUtil.cs index d2ed058d..2c9fce05 100644 --- a/code/swb_base/util/BlastUtil.cs +++ b/code/swb_base/util/BlastUtil.cs @@ -48,35 +48,5 @@ public static void Explode( Vector3 origin, float radius, float damage, float fo .WithWeapon( weapon ) ); } } - - [ClientRpc] - public static void ScreenShakeRPC( float length, float speed, float size, float rotation ) - { - new Sandbox.ScreenShake.Perlin( length, speed, size, rotation ); - } - - public static void ScreenShake( Vector3 origin, float radius, ScreenShake screenShake ) - { - var objects = Physics.GetEntitiesInSphere( origin, radius ); - - foreach ( var obj in objects ) - { - // Player check - if ( obj is not Player ply || !ply.IsValid() ) - continue; - - // Dist check - var targetPos = ply.PhysicsBody.MassCenter; - var dist = Vector3.DistanceBetween( origin, targetPos ); - if ( dist > radius ) - continue; - - var distanceMul = 1.0f - Math.Clamp( dist / radius, 0.0f, 0.75f ); - screenShake.Rotation *= distanceMul; - screenShake.Size *= distanceMul; - - ScreenShakeRPC( To.Single( ply ), screenShake.Length, screenShake.Speed, screenShake.Size, screenShake.Rotation ); - } - } } } diff --git a/code/swb_base/util/MathUtil.cs b/code/swb_base/util/MathUtil.cs new file mode 100644 index 00000000..6dff41e1 --- /dev/null +++ b/code/swb_base/util/MathUtil.cs @@ -0,0 +1,46 @@ +using Sandbox; +using System; +using System.Collections.Generic; + +/* + * Utility class to handle framerate independent + useful calculations +*/ + +namespace SWB_Base +{ + class MathUtil + { + public static float FILerp( float fromF, float toF, float amount ) + { + return fromF.LerpTo( toF, amount * RealTime.Delta ); + } + + public static Vector3 FILerp( Vector3 fromVec, Vector3 toVec, float amount ) + { + return fromVec.LerpTo( toVec, amount * RealTime.Delta ); + } + + public static Angles FILerp( Angles fromAng, Angles toAng, float amount ) + { + return Angles.Lerp( fromAng, toAng, amount * RealTime.Delta ); + } + + public static Vector3 RelativeAdd( Vector3 vec1, Vector3 vec2, Rotation rot ) + { + vec1 += vec2.x * rot.Right; + vec1 += vec2.y * rot.Up; + vec1 += vec2.z * rot.Forward; + + return vec1; + } + + public static T GetRandom( List list ) + { + if ( list.Count == 0 ) return default; + + var random = new Random(); + var randI = random.Next( list.Count ); + return list[randI]; + } + } +} diff --git a/code/swb_base/util/MathZ.cs b/code/swb_base/util/MathZ.cs deleted file mode 100644 index bca09687..00000000 --- a/code/swb_base/util/MathZ.cs +++ /dev/null @@ -1,46 +0,0 @@ -using Sandbox; -using System; -using System.Collections.Generic; - -/* - * Utility class to handle framerate independent animations -*/ - -namespace SWB_Base -{ - class MathZ - { - public static float FILerp( float fromF, float toF, float amount ) - { - return fromF.LerpTo( toF, amount * RealTime.Delta ); - } - - public static Vector3 FILerp( Vector3 fromVec, Vector3 toVec, float amount ) - { - return fromVec.LerpTo( toVec, amount * RealTime.Delta ); - } - - public static Angles FILerp( Angles fromAng, Angles toAng, float amount ) - { - return Angles.Lerp( fromAng, toAng, amount * RealTime.Delta ); - } - - public static Vector3 RelativeAdd( Vector3 vec1, Vector3 vec2, Rotation rot ) - { - vec1 += vec2.x * rot.Right; - vec1 += vec2.y * rot.Up; - vec1 += vec2.z * rot.Forward; - - return vec1; - } - - public static T GetRandom( List list ) - { - if ( list.Count == 0 ) return default; - - var random = new Random(); - var randI = random.Next( list.Count ); - return list[randI]; - } - } -} diff --git a/code/swb_base/util/ScreenUtil.cs b/code/swb_base/util/ScreenUtil.cs new file mode 100644 index 00000000..ba570556 --- /dev/null +++ b/code/swb_base/util/ScreenUtil.cs @@ -0,0 +1,67 @@ +using Sandbox; +using System; + +namespace SWB_Base +{ + partial class ScreenUtil + { + public static void Shake( float length = 0, float speed = 0, float size = 0, float rotation = 0 ) + { + ShakeRPC( length, speed, size, rotation ); + } + + public static void Shake( To to, float length = 0, float speed = 0, float size = 0, float rotation = 0 ) + { + ShakeRPC( to, length, speed, size, rotation ); + } + + public static void Shake( To to, ScreenShake screenShake ) + { + if ( screenShake != null ) + Shake( to, screenShake.Length, screenShake.Speed, screenShake.Size, screenShake.Rotation ); + } + + public static void Shake( ScreenShake screenShake ) + { + if ( screenShake != null ) + Shake( screenShake.Length, screenShake.Speed, screenShake.Size, screenShake.Rotation ); + } + + public static void ShakeAt( Vector3 origin, float radius = 1, float length = 0, float speed = 0, float size = 0, float rotation = 0 ) + { + var objects = Physics.GetEntitiesInSphere( origin, radius ); + + foreach ( var obj in objects ) + { + // Player check + if ( obj is not Player ply || !ply.IsValid() ) + continue; + + // Distance check + var targetPos = ply.PhysicsBody.MassCenter; + var dist = Vector3.DistanceBetween( origin, targetPos ); + if ( dist > radius ) + continue; + + // Intensity calculation + var distanceMul = 1.0f - Math.Clamp( dist / radius, 0.0f, 0.75f ); + rotation *= distanceMul; + size *= distanceMul; + + ShakeRPC( To.Single( ply ), length, speed, size, rotation ); + } + } + + public static void ShakeAt( Vector3 position, float radius, ScreenShake screenShake ) + { + if ( screenShake != null ) + ShakeAt( position, radius, screenShake.Length, screenShake.Speed, screenShake.Size, screenShake.Rotation ); + } + + [ClientRpc] + public static void ShakeRPC( float length = 0, float speed = 0, float size = 0, float rotation = 0 ) + { + new Sandbox.ScreenShake.Perlin( length, speed, size, rotation ); + } + } +} diff --git a/code/swb_css/GrenadeHE.cs b/code/swb_css/GrenadeHE.cs index cf47fb4d..25198b9d 100644 --- a/code/swb_css/GrenadeHE.cs +++ b/code/swb_css/GrenadeHE.cs @@ -52,7 +52,7 @@ private FiredEntity CreateGrenadeEntity( ClipInfo clipInfo, bool isPrimary ) { "css_grenade_he.explode" }; - grenade.ExplosionEffect = "particles/explosion_fireball.vpcf"; + grenade.ExplosionEffect = "weapons/css_grenade_he/particles/grenade_he_explosion.vpcf"; grenade.ExplosionShake = new ScreenShake { Length = 1f, diff --git a/code/swb_css/M249HE.cs b/code/swb_css/M249HE.cs index 579c99c6..a0450b62 100644 --- a/code/swb_css/M249HE.cs +++ b/code/swb_css/M249HE.cs @@ -82,7 +82,7 @@ private FiredEntity CreateGrenadeEntity( ClipInfo clipInfo, bool isPrimary ) { "css_grenade_he.explode" }; - grenade.ExplosionEffect = "particles/explosion_fireball.vpcf"; + grenade.ExplosionEffect = "weapons/css_grenade_he/particles/grenade_he_explosion.vpcf"; grenade.ExplosionShake = new ScreenShake { Length = 1f, diff --git a/code/swb_explosives/RPG-7-Hotdog.cs b/code/swb_explosives/RPG-7-Hotdog.cs new file mode 100644 index 00000000..4097c13f --- /dev/null +++ b/code/swb_explosives/RPG-7-Hotdog.cs @@ -0,0 +1,52 @@ +using Sandbox; +using SWB_Base; +using System; +using System.Collections.Generic; + +namespace SWB_EXPLOSIVES +{ + [Library( "swb_explosives_rpg7_hotdog", Title = "RPG-7-Hotdog" )] + public class RPG7Hotdog : RPG7 + { + public override string ViewModelPath => "weapons/swb/explosives/rpg-7-hotdog/swb_v_rpg7_hotdog.vmdl"; + public override string WorldModelPath => "weapons/swb/explosives/rpg-7-hotdog/swb_w_rpg7_hotdog.vmdl"; + public override string Icon => "/swb_explosives/textures/ui/icon_rpg7.png"; + + public override Func CreateEntity => CreateHotdogEntity; + public override Vector3 EntityVelocity => new Vector3( 0, 0, 50 ); + public override Angles EntityAngles => new Angles( 0, 180, 0 ); + public override string EntityModel => "models/citizen_props/hotdog01.vmdl"; + + public RPG7Hotdog() : base() { } + + private FiredEntity CreateHotdogEntity( ClipInfo clipInfo, bool isPrimary ) + { + var rocket = new Rocket(); + rocket.Weapon = this; + rocket.ExplosionDelay = 3f; + rocket.ExplosionRadius = 400f; + rocket.ExplosionDamage = 300f; + rocket.ExplosionForce = 500f; + rocket.ExplosionSounds = new List + { + "css_grenade_he.explode" + }; + rocket.ExplosionEffect = "particles/swb/explosion/hotdogs.vpcf"; + rocket.RocketSound = "swb_explosives_rpg7.rocketloop"; + rocket.RocketEffects = new List + { + "particles/swb/smoke/swb_smoketrail_1.vpcf", + "particles/swb/fire/swb_fire_rocket_1.vpcf" + }; + rocket.ExplosionShake = new ScreenShake + { + Length = 1f, + Speed = 5f, + Size = 7f, + Rotation = 3f + }; + + return rocket; + } + } +} diff --git a/code/swb_explosives/RPG-7.cs b/code/swb_explosives/RPG-7.cs index 95510234..d5539c0d 100644 --- a/code/swb_explosives/RPG-7.cs +++ b/code/swb_explosives/RPG-7.cs @@ -86,7 +86,7 @@ private FiredEntity CreateRocketEntity( ClipInfo clipInfo, bool isPrimary ) "swb_explosion_4", "swb_explosion_5" }; - rocket.ExplosionEffect = "particles/explosion_fireball.vpcf"; + rocket.ExplosionEffect = "weapons/css_grenade_he/particles/grenade_he_explosion.vpcf"; rocket.RocketSound = "swb_explosives_rpg7.rocketloop"; rocket.RocketEffects = new List { diff --git a/weapons/css_grenade_he/particles/css_grenade_he_explosion.vpcf b/weapons/css_grenade_he/particles/css_grenade_he_explosion.vpcf deleted file mode 100644 index 2d20b44d..00000000 --- a/weapons/css_grenade_he/particles/css_grenade_he_explosion.vpcf +++ /dev/null @@ -1,11 +0,0 @@ - -{ - _class = "CParticleSystemDefinition" - m_nBehaviorVersion = 10 - m_controlPointConfigurations = - [ - { - m_name = "preview" - }, - ] -} \ No newline at end of file diff --git a/weapons/css_grenade_he/particles/css_grenade_he_explosion.vpcf_c b/weapons/css_grenade_he/particles/css_grenade_he_explosion.vpcf_c deleted file mode 100644 index bf150df5..00000000 Binary files a/weapons/css_grenade_he/particles/css_grenade_he_explosion.vpcf_c and /dev/null differ diff --git a/weapons/css_grenade_he/particles/explosion_fireball.vpcf b/weapons/css_grenade_he/particles/explosion_fireball.vpcf deleted file mode 100644 index 455afe5e..00000000 --- a/weapons/css_grenade_he/particles/explosion_fireball.vpcf +++ /dev/null @@ -1,1232 +0,0 @@ - -{ - _class = "CParticleSystemDefinition" - m_nBehaviorVersion = 10 - m_controlPointConfigurations = - [ - { - m_name = "preview" - }, - ] - m_Emitters = - [ - { - _class = "C_OP_InstantaneousEmitter" - m_nParticlesToEmit = - { - m_nType = "PF_TYPE_RANDOM_UNIFORM" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 100.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 50.0 - m_flRandomMax = 150.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - }, - ] - m_Initializers = - [ - { - _class = "C_INIT_CreateWithinSphere" - m_fRadiusMax = - { - m_nType = "PF_TYPE_RANDOM_UNIFORM" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 40.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 20.0 - m_flRandomMax = 40.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - }, - { - _class = "C_INIT_InitFloat" - m_InputValue = - { - m_nType = "PF_TYPE_RANDOM_UNIFORM" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 1.5 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.5 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_nOutputField = "1" - }, - { - _class = "C_INIT_InitFloat" - m_InputValue = - { - m_nType = "PF_TYPE_RANDOM_UNIFORM" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 20.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 15.0 - m_flRandomMax = 25.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - }, - { - _class = "C_INIT_InitFloat" - m_InputValue = - { - m_nType = "PF_TYPE_RANDOM_UNIFORM" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 1.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = -45.0 - m_flRandomMax = 45.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_nOutputField = "4" - }, - { - _class = "C_INIT_VelocityRandom" - m_LocalCoordinateSystemSpeedMin = - { - m_nType = "PVEC_TYPE_LITERAL" - m_vLiteralValue = [ -100.0, -100.0, 0.0 ] - m_LiteralColor = [ 0, 0, 0, 0 ] - m_nVectorAttribute = 6 - m_vVectorAttributeScale = [ 1.0, 1.0, 1.0 ] - m_nControlPoint = 0 - m_vCPValueScale = [ 1.0, 1.0, 1.0 ] - m_vCPRelativePosition = [ 0.0, 0.0, 0.0 ] - m_vCPRelativeDir = [ 1.0, 0.0, 0.0 ] - m_FloatComponentX = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_FloatComponentY = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_FloatComponentZ = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_FloatInterp = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_flInterpInput0 = 0.0 - m_flInterpInput1 = 1.0 - m_vInterpOutput0 = [ 0.0, 0.0, 0.0 ] - m_vInterpOutput1 = [ 1.0, 1.0, 1.0 ] - m_Gradient = - { - m_Stops = [ ] - } - } - m_LocalCoordinateSystemSpeedMax = - { - m_nType = "PVEC_TYPE_LITERAL" - m_vLiteralValue = [ 100.0, 100.0, 0.0 ] - m_LiteralColor = [ 0, 0, 0, 0 ] - m_nVectorAttribute = 6 - m_vVectorAttributeScale = [ 1.0, 1.0, 1.0 ] - m_nControlPoint = 0 - m_vCPValueScale = [ 1.0, 1.0, 1.0 ] - m_vCPRelativePosition = [ 0.0, 0.0, 0.0 ] - m_vCPRelativeDir = [ 1.0, 0.0, 0.0 ] - m_FloatComponentX = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_FloatComponentY = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_FloatComponentZ = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_FloatInterp = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_flInterpInput0 = 0.0 - m_flInterpInput1 = 1.0 - m_vInterpOutput0 = [ 0.0, 0.0, 0.0 ] - m_vInterpOutput1 = [ 1.0, 1.0, 1.0 ] - m_Gradient = - { - m_Stops = [ ] - } - } - }, - { - _class = "C_INIT_VelocityFromNormal" - m_fSpeedMin = 10.0 - m_fSpeedMax = 100.0 - }, - ] - m_Operators = - [ - { - _class = "C_OP_BasicMovement" - m_Gravity = [ 0.0, 0.0, 100.0 ] - m_fDrag = 0.1 - }, - { - _class = "C_OP_Decay" - }, - { - _class = "C_OP_FadeAndKill" - m_flEndFadeInTime = 0.0 - m_flStartFadeOutTime = 0.1 - }, - { - _class = "C_OP_InterpolateRadius" - m_flEndScale = 2.0 - }, - ] - m_Renderers = - [ - { - _class = "C_OP_RenderSprites" - m_hTexture = resource:"materials/particle/fire_particle_2/fire_particle_2.vtex" - m_vecColorScale = - { - m_nType = "PVEC_TYPE_LITERAL_COLOR" - m_vLiteralValue = [ 0.0, 0.0, 0.0 ] - m_LiteralColor = [ 255, 255, 255, 255 ] - m_nVectorAttribute = 6 - m_vVectorAttributeScale = [ 1.0, 1.0, 1.0 ] - m_nControlPoint = 0 - m_vCPValueScale = [ 1.0, 1.0, 1.0 ] - m_vCPRelativePosition = [ 0.0, 0.0, 0.0 ] - m_vCPRelativeDir = [ 1.0, 0.0, 0.0 ] - m_FloatComponentX = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_FloatComponentY = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_FloatComponentZ = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_FloatInterp = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_flInterpInput0 = 0.0 - m_flInterpInput1 = 1.0 - m_vInterpOutput0 = [ 0.0, 0.0, 0.0 ] - m_vInterpOutput1 = [ 1.0, 1.0, 1.0 ] - m_Gradient = - { - m_Stops = [ ] - } - } - m_flSelfIllumAmount = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 15.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_flDiffuseAmount = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 15.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - }, - { - _class = "C_OP_RenderStandardLight" - m_vecColorScale = - { - m_nType = "PVEC_TYPE_LITERAL_COLOR" - m_vLiteralValue = [ 0.0, 0.0, 0.0 ] - m_LiteralColor = [ 255, 215, 0, 255 ] - m_nVectorAttribute = 6 - m_vVectorAttributeScale = [ 1.0, 1.0, 1.0 ] - m_nControlPoint = 0 - m_vCPValueScale = [ 1.0, 1.0, 1.0 ] - m_vCPRelativePosition = [ 0.0, 0.0, 0.0 ] - m_vCPRelativeDir = [ 1.0, 0.0, 0.0 ] - m_FloatComponentX = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_FloatComponentY = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_FloatComponentZ = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_FloatInterp = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.0 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - m_flInterpInput0 = 0.0 - m_flInterpInput1 = 1.0 - m_vInterpOutput0 = [ 0.0, 0.0, 0.0 ] - m_vInterpOutput1 = [ 1.0, 1.0, 1.0 ] - m_Gradient = - { - m_Stops = [ ] - } - } - m_flIntensity = - { - m_nType = "PF_TYPE_LITERAL" - m_nMapType = "PF_MAP_TYPE_DIRECT" - m_flLiteralValue = 0.1 - m_nControlPoint = 0 - m_nScalarAttribute = 3 - m_nVectorAttribute = 6 - m_nVectorComponent = 0 - m_flRandomMin = 0.0 - m_flRandomMax = 1.0 - m_nRandomMode = "PF_RANDOM_MODE_CONSTANT" - m_flLOD0 = 0.0 - m_flLOD1 = 0.0 - m_flLOD2 = 0.0 - m_flLOD3 = 0.0 - m_flNoiseOutputMin = 0.0 - m_flNoiseOutputMax = 1.0 - m_flNoiseScale = 0.1 - m_vecNoiseOffsetRate = [ 0.0, 0.0, 0.0 ] - m_flNoiseOffset = 0.0 - m_nNoiseOctaves = 1 - m_nNoiseTurbulence = "PF_NOISE_TURB_NONE" - m_nNoiseType = "PF_NOISE_TYPE_PERLIN" - m_nNoiseModifier = "PF_NOISE_MODIFIER_NONE" - m_flNoiseTurbulenceScale = 1.25 - m_flNoiseTurbulenceMix = 0.5 - m_flNoiseImgPreviewScale = 1.0 - m_bNoiseImgPreviewLive = true - m_nInputMode = "PF_INPUT_MODE_CLAMPED" - m_flMultFactor = 1.0 - m_flInput0 = 0.0 - m_flInput1 = 1.0 - m_flOutput0 = 0.0 - m_flOutput1 = 1.0 - m_nBiasType = "PF_BIAS_TYPE_STANDARD" - m_flBiasParameter = 0.0 - m_Curve = - { - m_spline = [ ] - m_tangents = [ ] - m_vDomainMins = [ 0.0, 0.0 ] - m_vDomainMaxs = [ 0.0, 0.0 ] - } - } - }, - ] -} \ No newline at end of file diff --git a/weapons/css_grenade_he/particles/explosion_fireball.vpcf_c b/weapons/css_grenade_he/particles/explosion_fireball.vpcf_c deleted file mode 100644 index 6eb9b2df..00000000 Binary files a/weapons/css_grenade_he/particles/explosion_fireball.vpcf_c and /dev/null differ