1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
include('shared.lua')
ENT.RenderGroup = RENDERGROUP_BOTH
/*---------------------------------------------------------
Name: Draw
Desc: Draw it!
---------------------------------------------------------*/
function ENT:Draw()
--self:DrawModel()
render.SetColorMaterial()
render.DrawSphere( self:GetPos(), 10, 30, 30, Color( 255, 0, 0, 100 ) )
end
/*---------------------------------------------------------
Name: DrawTranslucent
Desc: Draw translucent
---------------------------------------------------------*/
function ENT:DrawTranslucent()
// This is here just to make it backwards compatible.
// You shouldn't really be drawing your model here unless it's translucent
--self:Draw()
end
/*---------------------------------------------------------
Name: BuildBonePositions
Desc:
---------------------------------------------------------*/
function ENT:BuildBonePositions( NumBones, NumPhysBones )
// You can use this section to position the bones of
// any animated model using self:SetBonePosition( BoneNum, Pos, Angle )
// This will override any animation data and isn't meant as a
// replacement for animations. We're using this to position the limbs
// of ragdolls.
end
/*---------------------------------------------------------
Name: SetRagdollBones
Desc:
---------------------------------------------------------*/
function ENT:SetRagdollBones( bIn )
// If this is set to true then the engine will call
// DoRagdollBone (below) for each ragdoll bone.
// It will then automatically fill in the rest of the bones
self.m_bRagdollSetup = bIn
end
/*---------------------------------------------------------
Name: DoRagdollBone
Desc:
---------------------------------------------------------*/
function ENT:DoRagdollBone( PhysBoneNum, BoneNum )
// self:SetBonePosition( BoneNum, Pos, Angle )
end
|