Skip to content

Commit

Permalink
Using the old sprite to draw the lemon in world
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Julian committed Apr 7, 2015
1 parent 221abe3 commit 315dd68
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 7,723 deletions.
17 changes: 15 additions & 2 deletions lua/entities/combustible_lemon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ function ENT:SetupDataTables()
end

function ENT:Initialize()
self:SetModel("models/phlenum/entities/combustible_lemon.mdl")
self:PhysicsInitSphere(5.5, "metal")
self:PhysicsInitSphere(SOLID_VPHYSICS, 3)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local vel = self:GetDirection() * self.Speed
Expand All @@ -46,6 +45,9 @@ function ENT:Initialize()
phys:SetVelocity(vel)
end
self:SetLocalVelocity(vel)
if(CLIENT) then
self:DrawShadow(false)
end
end

function ENT:PhysicsCollide(data, phys)
Expand All @@ -59,3 +61,14 @@ function ENT:PhysicsCollide(data, phys)
SafeRemoveEntity(self)
end

if(CLIENT) then

ENT.Mat = Material("phlenum/entities/combustible_lemon.vmt")

function ENT:Draw()
render.SetMaterial(self.Mat)
render.DrawSprite(self:GetPos(), 16, 16, self:GetColor())
end

end

13 changes: 13 additions & 0 deletions materials/phlenum/entities/combustible_lemon.vmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// Combustible Lemon Launcher (GMOD) by Phil Julian Meyer is licensed under a
// Creative Commons Attribution-ShareAlike 4.0 International License
//

"UnlitGeneric"
{
$basetexture "phlenum/entities/combustible_lemon"
$surfaceprop "watermelon"
$alpha 1
$alphatest 1
}

Binary file added materials/phlenum/entities/combustible_lemon.vtf
Binary file not shown.
21 changes: 0 additions & 21 deletions models/phlenum/entities/combustible_lemon.qc

This file was deleted.

Loading

0 comments on commit 315dd68

Please sign in to comment.