Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 22 additions & 0 deletions Repos/Chicken_Bullets-master/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
21 changes: 21 additions & 0 deletions Repos/Chicken_Bullets-master/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
```
=== Chicken Bullets ===
--By HeX

All bullets fired from any guns, including HL2 default, become chickens!
https://www.youtube.com/watch?v=KZVbO3iYQNo


How to use:
Extract to addons/, enabled by default.

CVars:
chicken_bullet_enabled 1/0 --Enable chicken bullets?
chicken_bullet_speed 24000 --Speed of hen
chicken_bullet_multi 2 --Damage multiplier
chicken_bullet_eggs 1/0 --Lay eggs?

Extra credits:
Chicken model --lduke
Sounds / Effects --Teta_Bonita
```
10 changes: 10 additions & 0 deletions Repos/Chicken_Bullets-master/addon.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"AddonInfo"
{
"name" "Chicken Bullets"
"version" "1.0"
"up_date" "23.08.14"
"author_name" "Teta_Bonita + HeX"
"author_email" ""
"author_url" ""
"info" "Oh cluck"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@


local RED = Color(255,80,0,255)

killicon.Add("chicken_bullet", "killicons/chicken_bullet", RED)

language.Add("chicken_bullet", "Chicken")












136 changes: 136 additions & 0 deletions Repos/Chicken_Bullets-master/lua/autorun/server/sv_ChickenBullets.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@

AddCSLuaFile("autorun/client/cl_ChickenBullets.lua")

local Enabled = CreateConVar("chicken_bullet_enabled", 1)
local Velocity = CreateConVar("chicken_bullet_speed", 100)
local Multi = CreateConVar("chicken_bullet_multi", 2)
local Eggs = CreateConVar("chicken_bullet_eggs", 1)

local sndTabAttack = {
Sound("chicken/attack1.wav"),
Sound("chicken/attack2.wav"),
}


--bullet.Damage is 0 for HL2 guns, dumbass garry!
local HL2Guns = {
["weapon_ar2"] = "sk_plr_dmg_ar2",
["weapon_smg1"] = "sk_plr_dmg_smg1",
["weapon_shotgun"] = "sk_plr_dmg_buckshot",
["weapon_pistol"] = "sk_plr_dmg_pistol",
["weapon_357"] = "sk_plr_dmg_357",
}

local function FireChickenBullet(self,Bul)
if not IsValid(self) or not Enabled:GetBool() then return end

//Was a chicken bullet
if self.CanFireChickenBullet then
//Fix HL2 gun damage
local Owner = Bul.Attacker
if Owner and Owner.GetActiveWeapon then --Is a player shooting these
local Wep = Owner:GetActiveWeapon()

if IsValid(Wep) then
local New = HL2Guns[ Wep:GetClass() ]

if New then
Bul.Damage = GetConVarNumber(New) * Multi:GetFloat()
end
end
end

self.CanFireChickenBullet = false --Don't trigger more chickens
return true --Override this bullet
end


for i=1, Bul.Num do
self:EmitSound("chicken/chicken_tube.mp3")
self:EmitSound( table.Random(sndTabAttack) )

local x = Bul.Spread.x
local y = Bul.Spread.y
local Ang = Bul.Dir + Vector(0, math.Rand(-x, x), math.Rand(-y, y) )

local Hen = ents.Create("chicken_bullet")
Hen:SetModel("models/lduke/chicken/chicken3.mdl")
Hen:SetPos(Bul.Src)
Hen:SetAngles( Ang:Angle() )
Hen:SetOwner(self)
Hen:SetPhysicsAttacker(self)
Hen.Owner = self
Hen:Spawn()
Hen.Eggs = Eggs:GetBool()
Hen.Bullet = Bul

if not IsValid(Hen) then return end
local Phys = Hen.PhysObj
if IsValid(Phys) then
Phys:SetVelocity( Hen:GetForward() * (Bul.Force + Velocity:GetInt() ) )
end
end

return false --No bullet
end

hook.Add("EntityFireBullets", "FireChickenBullet", FireChickenBullet)



--- Resources ---
resource.AddFile("materials/particles/feather.vtf") --Particle
resource.AddFile("materials/particles/feather.vmt")

resource.AddFile("materials/killicons/chicken_bullet.vtf") --Killicon
resource.AddFile("materials/killicons/chicken_bullet.vmt")

resource.AddFile("materials/models/lduke/chicken/chicken2.vtf") --Materials
resource.AddFile("materials/models/lduke/chicken/chicken2.vmt")

resource.AddFile("models/lduke/chicken/chicken3.mdl") --Models
resource.AddFile("models/lduke/chicken/chicken3.phy")
resource.AddFile("models/lduke/chicken/chicken3.dx80.vtx")
resource.AddFile("models/lduke/chicken/chicken3.dx90.vtx")
resource.AddFile("models/lduke/chicken/chicken3.sw.vtx")
resource.AddFile("models/lduke/chicken/chicken3.vvd")

resource.AddFile("sound/chicken/alert.wav") --Sounds
resource.AddFile("sound/chicken/attack1.wav")
resource.AddFile("sound/chicken/attack2.wav")
resource.AddFile("sound/chicken/death.wav")
resource.AddFile("sound/chicken/idle1.wav")
resource.AddFile("sound/chicken/idle2.wav")
resource.AddFile("sound/chicken/idle3.wav")
resource.AddFile("sound/chicken/pain1.wav")
resource.AddFile("sound/chicken/pain2.wav")
resource.AddFile("sound/chicken/pain3.wav")
resource.AddFile("sound/chicken/chicken_tube.mp3")




























81 changes: 81 additions & 0 deletions Repos/Chicken_Bullets-master/lua/effects/chicken_death/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
-- Chicken explosion effect
-- By Teta_Bonita

function EFFECT:Init( data )

local Pos = data:GetOrigin()
--Pos.z = Pos.z + 10

local emitter3D = ParticleEmitter( Pos, true )
local emitter2D = ParticleEmitter( Pos, false )

-- Make an expanding blood puff facing the player
local particle = emitter2D:Add( "effects/blood_core", Pos )
particle:SetDieTime( math.Rand( 0.5, 0.6 ) )
particle:SetStartSize( 25 )
particle:SetEndSize( math.Rand( 60, 80 ) )
particle:SetStartAlpha( math.Rand( 200, 230 ) )
particle:SetColor( 220, 20, 30 )

-- Shoot blood drops
for i = 1,8 do

local norm = Vector( math.Rand( -1, 1 ), math.Rand( -1, 1 ), math.Rand( -0.3, 1 ) ):GetNormalized()

local particle = emitter2D:Add( "effects/blood2", Pos + norm * 5 )
particle:SetDieTime( math.Rand( 0.8, 1 ) )
particle:SetVelocity( norm * math.Rand( 150, 200 ) )
particle:SetAirResistance( 80 )
particle:SetGravity( Vector( 0, 0, -400 ) )
particle:SetCollide( true )
particle:SetBounce( 0.7 )
particle:SetStartSize( 1 )
particle:SetEndSize( 2 )
particle:SetStartLength( math.Rand( 8, 14 ) )
particle:SetEndLength( math.Rand( 12, 18 ) )
particle:SetStartAlpha( math.Rand( 200, 230 ) )
particle:SetColor( 220, 20, 30 )

end

-- Emit feathers
for i = 1,32 do

local norm = Vector( math.Rand( -1, 1 ), math.Rand( -1, 1 ), math.Rand( -0.3, 1 ) ):GetNormalized()
local size = math.Rand( 3, 5 )

local particle = emitter3D:Add( "particles/feather", Pos + norm * 3 )
particle:SetDieTime( math.Rand( 3.5, 4.5 ) )
particle:SetVelocity( norm * math.Rand( 250, 500 ) )
particle:SetAirResistance( 350 )
particle:SetGravity( Vector( math.Rand( -25, 25 ), math.Rand( -25, 25 ), -300 ) )
particle:SetCollide( true )
particle:SetBounce( 0.1 )
particle:SetAngles( AngleRand() )
particle:SetAngleVelocity( AngleRand() * 150 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( size )
particle:SetEndSize( size )
particle:SetColor( 255, 255, 255 )

end

emitter3D:Finish()
emitter2D:Finish()

end


function EFFECT:Think()

-- Kill instantly... this effect is only used to spawn particles on init.
return false

end


function EFFECT:Render()


end

59 changes: 59 additions & 0 deletions Repos/Chicken_Bullets-master/lua/effects/chicken_pain/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
-- Chicken pain effect
-- By Teta_Bonita

function EFFECT:Init( data )

local Pos = data:GetOrigin()

local emitter3D = ParticleEmitter( Pos, true )
local emitter2D = ParticleEmitter( Pos, false )

-- Make an expanding blood puff facing the player
local particle = emitter2D:Add( "effects/blood2", Pos )
particle:SetDieTime( math.Rand( 0.2, 0.4 ) )
particle:SetStartSize( 3 )
particle:SetEndSize( math.Rand( 8, 12 ) )
particle:SetStartAlpha( 255 )
particle:SetColor( 220, 20, 30 )

-- Emit feathers
for i = 1,32 do

local norm = Vector( math.Rand( -1, 1 ), math.Rand( -1, 1 ), math.Rand( -0.3, 1 ) ):GetNormalized()
local size = math.Rand( 3, 5 )

local particle = emitter3D:Add( "particles/feather", Pos + norm * 3 )
particle:SetDieTime( math.Rand( 2, 2.5 ) )
particle:SetVelocity( norm * math.Rand( 150, 300 ) )
particle:SetAirResistance( 400 )
particle:SetGravity( Vector( math.Rand( -25, 25 ), math.Rand( -25, 25 ), -300 ) )
particle:SetCollide( true )
particle:SetBounce( 0.1 )
particle:SetAngles( AngleRand() )
particle:SetAngleVelocity( AngleRand() * 150 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( size )
particle:SetEndSize( size )
particle:SetColor( 255, 255, 255 )

end

emitter3D:Finish()
emitter2D:Finish()

end


function EFFECT:Think()

-- Kill instantly... this effect is only used to spawn particles on init.
return false

end


function EFFECT:Render()


end

Loading