-
Notifications
You must be signed in to change notification settings - Fork 1
/
e2_code_test_ftrace.txt
76 lines (69 loc) · 2.26 KB
/
e2_code_test_ftrace.txt
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
70
71
72
73
74
75
76
@name Test
@inputs
@outputs [H1 H2 H3 H4]:array C
@persist [A B]:ftrace E:entity
@trigger
@model models/sprops/cuboids/height06/size_1/cube_6x6x6.mdl
runOnTick(1)
if(first() || dupefinished())
{
E = entity()
A = E:setFTrace(vec(0,0,0),vec(0,0,1), 25)
A:putActionSkipEnt(E):putArray(E)
A:putActionSkip("GetModel", "models/props_c17/furnitureshelf001a.mdl")
# A:putActionSkip("GetModel", "models/props_c17/oildrum001.mdl")
A:putActionOnly("GetClass","prop_physics")
A:putArrayID(123)
# A:setUnit()
A:useAction()
A:dumpItem("A")
print(1, "\n")
B = A:getCopy():putActionSkipEnt(E):putActionOnly("GetClass","prop_physics")
B:useAction():putActionSkip("GetModel", 1)
holoCreate(1,vec(0,0,0),0.1 * vec(1,1,1)) holoColor(1,vec(255,0,0))
holoCreate(2,vec(0,0,0),0.1 * vec(1,1,1)) holoColor(2,vec(0,255,0))
holoCreate(3,vec(0,0,0),0.1 * vec(1,1,1)) holoColor(3,vec(0,0,255))
}
print(A:getEntity():model())
A:smpLocal()
H1[1, number] = A:isHitNoDraw()
H1[2, number] = A:isHitNonWorld()
H1[3, number] = A:isHit()
H1[4, number] = A:isHitSky()
H1[5, number] = A:isHitWorld()
H1[6, number] = A:getHitBox()
H1[7, number] = A:getMatType()
H1[8, number] = A:getHitGroup()
H1[9, number] = A:getContents()
H2[1, vector] = A:getHitPos()
H2[2, vector] = A:getHitNormal()
H2[3, vector] = A:getNormal()
H2[4, string] = A:getHitTexture()
H2[5, vector] = A:getStartPos()
H2[6, number] = A:getSurfacePropsID()
H2[7, number] = A:getPhysicsBoneID()
H2[8, string] = A:getSurfacePropsName()
H3[1, number] = A:getFraction()
H3[2, number] = A:getFractionLen()
H3[3, number] = A:isStartSolid()
H3[4, number] = A:isAllSolid()
H3[5, number] = A:getFractionLS()
H3[6, number] = A:getFractionLenLS()
H3[7, entity] = A:getBase()
H3[8, entity] = A:getEntity()
H4[1, vector] = A:getDir()
H4[2, vector] = A:getPos()
H4[3, number] = A:getMask()
H4[4, vector] = A:getStart()
H4[5, vector] = A:getStop()
H4[6, number] = A:getLen()
H4[7, number] = A:getCollideGroup()
H4[8, number] = A:getSurfaceFlags()
H4[9, number] = A:getDispFlags()
C = B:setPos(E:pos()):setDir(E:up()):smpWorld():getFractionLen()
holoPos(1, B:getStart())
holoAng(1, E:angles())
holoPos(2, B:getStop())
holoAng(2, E:angles())
holoPos(3, B:getHitPos())
holoAng(3, E:angles())