diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-10-21 22:51:41 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-10-21 22:51:41 -0400 |
| commit | 50537786ae45d0e12a1dc4265e0d40d2fd4fbc4b (patch) | |
| tree | a75d44f275eeee4464570b0b3d238244830fcaf1 /gamemode/itemsystem/items/runeexplosive.lua | |
| parent | 82bcf2c8e3c64fb06bd0094ab5d889bd15a4948a (diff) | |
| parent | b0169e7ca20fd9fa4ae889af8fff16d2bf638a18 (diff) | |
| download | wintersurvival2-50537786ae45d0e12a1dc4265e0d40d2fd4fbc4b.tar.gz wintersurvival2-50537786ae45d0e12a1dc4265e0d40d2fd4fbc4b.tar.bz2 wintersurvival2-50537786ae45d0e12a1dc4265e0d40d2fd4fbc4b.zip | |
Various bugfixes and updates, gamemode should be playable again
Diffstat (limited to 'gamemode/itemsystem/items/runeexplosive.lua')
| -rw-r--r-- | gamemode/itemsystem/items/runeexplosive.lua | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/gamemode/itemsystem/items/runeexplosive.lua b/gamemode/itemsystem/items/runeexplosive.lua index 15479f2..4e7436c 100644 --- a/gamemode/itemsystem/items/runeexplosive.lua +++ b/gamemode/itemsystem/items/runeexplosive.lua @@ -2,7 +2,7 @@ ITEM.Name = "Explosive Rune" ITEM.Class = "resource" ITEM.Desc = "A highly volitile rune! Handle with care." -ITEM.Model = "models/props_combine/breenlight.mdl" +ITEM.Model = "models/props_junk/Rock001a.mdl" ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_runeexplosive.png") ITEM.Structure = { @@ -30,7 +30,7 @@ ITEM.Range = 64 ITEM.CD = 1 function ITEM:OnPrimary(user) - if(user:HasItem("Explosive Rune",1)) then + if user:HasItem("Explosive Rune",1) then self:OnUse(user) else if not user.UnEquipWeaponSlot then return end @@ -40,20 +40,20 @@ function ITEM:OnPrimary(user) end function ITEM:OnUse(user) - if( not user:IsOnGround()) then - user:SetVelocity(Vector(0,0,500)) - if(SERVER) then - user:TakeDamage(30) + if not user:IsOnGround() then + user:SetVelocity(Vector(0,0,500)) + if SERVER then + user:TakeDamage(30) end - else - if(SERVER) then - user:TakeDamage(40) + else + if SERVER then + user:TakeDamage(40) end - end - if(CLIENT) then return end - user:RemoveItem(self.Name,1) - local exp = ents.Create("env_explosion") - exp:SetPos(user:GetPos()) - exp:Fire("Explode","",0) - exp:Spawn() + end + if CLIENT then return end + user:RemoveItem(self.Name,1) + local exp = ents.Create("env_explosion") + exp:SetPos(user:GetPos()) + exp:Fire("Explode","",0) + exp:Spawn() end |
