Post by LoE Impact on May 11, 2014 16:51:19 GMT -5
So I have been digging through all these files and came across this file called Gibber_Burst is this s weapon that didn't get put in or could possibly be in DLC?
SetWeaponSound( "fire", "Weapon_r1357.Single" )
SetWeaponSound( "npc_fire", "Weapon_Pistol.NPC_Single" )
SetWeaponSound( "single_casing", "Weapon_bulletCasing.Single" )
SetWeaponEffect( "muzzle_flash_fp", "wpn_muzzleflash_smg_FP" )
SetWeaponEffect( "muzzle_flash", "wpn_muzzleflash_smg" )
SetWeaponEntity( "crossbow_bolt" )
PrecacheWeaponAssets()
const MP_GIBBER_PISTOL_BURST_COUNT = 50 //number of bursts
const MP_GIBBER_PISTOL_BURST_DELAY = 0.5 //time before the popcors burst off +/- some randomness
const MP_GIBBER_PISTOL_BURST_OFFSET = 0.3 // how much + & - the delay to set off the explosions
const MP_GIBBER_PISTOL_BURST_RANGE = 150 //range of the bursts
//;RegisterSignal( "HitSky" )
function OnWeaponPrimaryAttack( attackParams )
{
PlayWeaponSound( "fire" )
PlayWeaponSound( "single_casing" )
self.EmitWeaponNpcSound( LOUD_WEAPON_AI_SOUND_RADIUS_MP, 0.2 )
thread FireBurstGrenade( self, attackParams )
}
function OnWeaponNpcPrimaryAttack( attackParams )
{
PlayWeaponSound( "npc_fire" )
self.EmitWeaponNpcSound( LOUD_WEAPON_AI_SOUND_RADIUS_MP, 0.2 )
FireBurstGrenade( self, attackParams )
}
function FireBurstGrenade( weapon, attackParams )
{
if ( IsClient() && !self.ShouldPredictProjectiles() )
return
local player = weapon.GetWeaponOwner()
local team = player.GetTeam()
local attackPos = player.OffsetPositionFromView( attackParams[ "pos" ], Vector( 0.0, 8.0, 4.0 ) ) // forward, right, up
local bolt = weapon.FireWeaponBolt( attackPos, attackParams.dir, 2000, damageTypes.Explosive, damageTypes.Explosive, PROJECTILE_PREDICTED )
bolt.kv.bounceFrac = 0.0
bolt.kv.gravity = 1.0
}
function OnClientAnimEvent( name )
{
if ( name == "muzzle_flash" )
{
PlayWeaponEffect_OnAttachment( "muzzle_flash_fp", "muzzle_flash", "muzzle_flash" )
}
}
function OnProjectileCollision( collisionParams )
{
popcornInfo <- {}
popcornInfo.weaponName <- "mp_titanweapon_gibber_burst"
popcornInfo.damageSourceId <- eDamageSourceId.mp_titanweapon_gibber_burst
popcornInfo.count <- MP_GIBBER_PISTOL_BURST_COUNT
popcornInfo.delay <- MP_GIBBER_PISTOL_BURST_DELAY
popcornInfo.offset <- MP_GIBBER_PISTOL_BURST_OFFSET
popcornInfo.range <- MP_GIBBER_PISTOL_BURST_RANGE
local owner = self.GetOwner()
if ( IsValid( owner ) )
thread StartPopcornExplosions( self, owner, popcornInfo, null )
SetWeaponSound( "fire", "Weapon_r1357.Single" )
SetWeaponSound( "npc_fire", "Weapon_Pistol.NPC_Single" )
SetWeaponSound( "single_casing", "Weapon_bulletCasing.Single" )
SetWeaponEffect( "muzzle_flash_fp", "wpn_muzzleflash_smg_FP" )
SetWeaponEffect( "muzzle_flash", "wpn_muzzleflash_smg" )
SetWeaponEntity( "crossbow_bolt" )
PrecacheWeaponAssets()
const MP_GIBBER_PISTOL_BURST_COUNT = 50 //number of bursts
const MP_GIBBER_PISTOL_BURST_DELAY = 0.5 //time before the popcors burst off +/- some randomness
const MP_GIBBER_PISTOL_BURST_OFFSET = 0.3 // how much + & - the delay to set off the explosions
const MP_GIBBER_PISTOL_BURST_RANGE = 150 //range of the bursts
//;RegisterSignal( "HitSky" )
function OnWeaponPrimaryAttack( attackParams )
{
PlayWeaponSound( "fire" )
PlayWeaponSound( "single_casing" )
self.EmitWeaponNpcSound( LOUD_WEAPON_AI_SOUND_RADIUS_MP, 0.2 )
thread FireBurstGrenade( self, attackParams )
}
function OnWeaponNpcPrimaryAttack( attackParams )
{
PlayWeaponSound( "npc_fire" )
self.EmitWeaponNpcSound( LOUD_WEAPON_AI_SOUND_RADIUS_MP, 0.2 )
FireBurstGrenade( self, attackParams )
}
function FireBurstGrenade( weapon, attackParams )
{
if ( IsClient() && !self.ShouldPredictProjectiles() )
return
local player = weapon.GetWeaponOwner()
local team = player.GetTeam()
local attackPos = player.OffsetPositionFromView( attackParams[ "pos" ], Vector( 0.0, 8.0, 4.0 ) ) // forward, right, up
local bolt = weapon.FireWeaponBolt( attackPos, attackParams.dir, 2000, damageTypes.Explosive, damageTypes.Explosive, PROJECTILE_PREDICTED )
bolt.kv.bounceFrac = 0.0
bolt.kv.gravity = 1.0
}
function OnClientAnimEvent( name )
{
if ( name == "muzzle_flash" )
{
PlayWeaponEffect_OnAttachment( "muzzle_flash_fp", "muzzle_flash", "muzzle_flash" )
}
}
function OnProjectileCollision( collisionParams )
{
popcornInfo <- {}
popcornInfo.weaponName <- "mp_titanweapon_gibber_burst"
popcornInfo.damageSourceId <- eDamageSourceId.mp_titanweapon_gibber_burst
popcornInfo.count <- MP_GIBBER_PISTOL_BURST_COUNT
popcornInfo.delay <- MP_GIBBER_PISTOL_BURST_DELAY
popcornInfo.offset <- MP_GIBBER_PISTOL_BURST_OFFSET
popcornInfo.range <- MP_GIBBER_PISTOL_BURST_RANGE
local owner = self.GetOwner()
if ( IsValid( owner ) )
thread StartPopcornExplosions( self, owner, popcornInfo, null )