-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minor adjustments to health thrower, reduced medic rpg ammo cost to 15 #156
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ function EFFECT:Init(data) | |
has_burner = true | ||
end | ||
|
||
if data:GetEntity():IsValid() && Startpos && Hitpos then | ||
if data:GetEntity():IsValid() and Startpos and Hitpos then | ||
self.Emitter = ParticleEmitter(Startpos) | ||
|
||
|
||
|
@@ -32,18 +32,18 @@ function EFFECT:Init(data) | |
end) | ||
end | ||
|
||
for i = 1, 2 do | ||
local p = self.Emitter:Add("particles/smokey", Startpos) | ||
p:SetDieTime(1.5) | ||
p:SetStartAlpha(50) | ||
p:SetEndAlpha(0) | ||
p:SetStartSize(math.Rand(2, 4)) | ||
p:SetEndSize(math.random(70, 90)) | ||
p:SetRoll(math.random(-10, 10)) | ||
p:SetRollDelta(math.random(-10, 10)) | ||
p:SetVelocity(((Hitpos - Startpos):GetNormal() * math.random(500, 800)) + VectorRand() * math.random(1, 60) + Vector(0,0,20)) | ||
p:SetCollide(true) | ||
p:SetColor(40, 40, 40) | ||
for e = 1, 2 do | ||
local g = self.Emitter:Add("particles/smokey", Startpos) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. instead of g this can be something like particle, no need for 1 char vars. it just makes the code harder to read. |
||
g:SetDieTime(1.5) | ||
g:SetStartAlpha(50) | ||
g:SetEndAlpha(0) | ||
g:SetStartSize(math.Rand(2, 4)) | ||
g:SetEndSize(math.random(70, 90)) | ||
g:SetRoll(math.random(-10, 10)) | ||
g:SetRollDelta(math.random(-10, 10)) | ||
g:SetVelocity(((Hitpos - Startpos):GetNormal() * math.random(500, 800)) + VectorRand() * math.random(1, 60) + Vector(0,0,20)) | ||
g:SetCollide(true) | ||
g:SetColor(40, 40, 40) | ||
end | ||
|
||
self.Emitter:Finish() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ function EFFECT:Init(data) | |
has_burner = true | ||
end | ||
local light = DynamicLight( math.random( 0, 9999999 ) ) | ||
if(light) then | ||
if (light) then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can remove the useless parentheses here |
||
if has_burner then | ||
light.R = 0; | ||
light.G = 132; | ||
|
@@ -19,7 +19,7 @@ function EFFECT:Init(data) | |
light.Size = 128; | ||
light.Decay = 64; | ||
light.Brightness = 3; | ||
light.DieTime = CurTime()+1; | ||
light.DieTime = CurTime() + 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the ; can entirely be removed |
||
end | ||
|
||
local DrawFlame = 1 | ||
|
@@ -28,7 +28,7 @@ function EFFECT:Init(data) | |
|
||
local FlameEmitter = ParticleEmitter(data:GetOrigin()) | ||
|
||
for i=0, 16 do | ||
for i = 0, 16 do | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if i isn't used replace it with _ |
||
if !FlameEmitter then return end | ||
local FlameParticle = FlameEmitter:Add("particles/flamelet1", data:GetOrigin() ) | ||
|
||
|
@@ -38,23 +38,16 @@ function EFFECT:Init(data) | |
else | ||
FlameParticle:SetColor(105, 255, 50) | ||
end | ||
|
||
FlameParticle:SetVelocity( VectorRand() * 172 ) | ||
|
||
FlameParticle:SetLifeTime(0) | ||
FlameParticle:SetDieTime(0.72) | ||
|
||
FlameParticle:SetStartAlpha(210) | ||
FlameParticle:SetStartAlpha(150) | ||
FlameParticle:SetEndAlpha(0) | ||
|
||
FlameParticle:SetStartSize(0) | ||
FlameParticle:SetEndSize(64 * (data:GetScale() or 1)) | ||
|
||
FlameParticle:SetRoll(math.Rand(-210, 210)) | ||
FlameParticle:SetRollDelta(math.Rand(-3.2, 3.2)) | ||
|
||
FlameParticle:SetAirResistance(350) | ||
|
||
FlameParticle:SetGravity(Vector(0, 0, 64)) | ||
|
||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,13 +163,13 @@ SWEP.Animations = { | |
Time = 0.5, | ||
ShellEjectAt = 0, | ||
RestoreAmmo = 1, | ||
SoundTable = { { s = "", p = 100, v = 75, t = 0.1, c = CHAN_ITEM, ind = 1, bg = 1, } }, | ||
-- SoundTable = { { s = "", p = 100, v = 75, t = 0.1, c = CHAN_ITEM, ind = 1, bg = 1, } }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dont comment these out, just delete them |
||
}, | ||
["fire_iron"] = { | ||
Source = "shoot", | ||
Time = 0.5, | ||
ShellEjectAt = 0, | ||
SoundTable = { { s = "", p = 100, v = 75, t = 0.1, c = CHAN_ITEM, ind = 1, bg = 1, } }, | ||
--SoundTable = { { s = "", p = 100, v = 75, t = 0.1, c = CHAN_ITEM, ind = 1, bg = 1, } }, | ||
}, | ||
["reload"] = { | ||
Source = "reload", | ||
|
@@ -179,9 +179,23 @@ SWEP.Animations = { | |
LHIK = true, | ||
LHIKIn = 0.5, | ||
LHIKOut = 0.2, | ||
SoundTable = { { s = "", p = 100, v = 75, t = 1.8, c = CHAN_ITEM, ind = 1, bg = 0, }, }, | ||
--SoundTable = { { s = "", p = 100, v = 75, t = 1.8, c = CHAN_ITEM, ind = 1, bg = 0, }, }, | ||
}, | ||
} | ||
if CLIENT then | ||
SWEP.Hook_ModifyBodygroups = function(wep, data) | ||
local vm = data.vm | ||
-- local wm = true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be removed |
||
if not IsValid(vm) then return end | ||
if wep:Clip1() > 0 then | ||
-- loaded | ||
vm:SetBodygroup(1, 0) | ||
else | ||
-- Empty | ||
vm:SetBodygroup(1, 1) | ||
end | ||
end | ||
end | ||
|
||
SWEP.ViewModelBoneMods = { | ||
-- ["missile"] = { scale = Vector(0.009, 0.009, 0.009), pos = Vector(0, 0, 0), angle = Angle(0, 0, 0) } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if e isn't used replace it with _