You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: code/tools/MagnetoStick.cs
+24-23Lines changed: 24 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,10 @@ public override void OnPlayerControlTick()
12
12
13
13
using(Prediction.Off())
14
14
{
15
-
// I might not want to overwrite super's class memeber MaxTraceDistance
16
-
// ~56.54 hu to m based on rough doorway estimates
17
-
traceDistance=75//hu | ? // TODO: To be adjusted when tested
15
+
test
16
+
// I might not want to overwrite super's class memeber MaxTraceDistance
17
+
// ~56.54 hu to m based on rough doorway estimates
18
+
traceDistance=75//hu | ? // TODO: To be adjusted when tested
18
19
varinput=Owner.Input;
19
20
20
21
varstartPos=Owner.EyePos;
@@ -31,14 +32,14 @@ public override void OnPlayerControlTick()
31
32
return;
32
33
33
34
if(tr.Entity.IsWorld)
34
-
{
35
-
if(this.attached)
36
-
{
37
-
// Spawn rope of N lengh (32hu?) to connect points of attachment
38
-
{}
39
-
}
35
+
{
36
+
if(this.attached)
37
+
{
38
+
// Spawn rope of N lengh (32hu?) to connect points of attachment
39
+
{}
40
+
}
40
41
return;
41
-
}
42
+
}
42
43
43
44
if(tr.Entity==target)// Not sure what a target is
44
45
return;
@@ -59,20 +60,20 @@ public override void OnPlayerControlTick()
59
60
60
61
else
61
62
{
62
-
if(!input.Pressed(InputButton.Attack1){
63
-
// Hold Left Click to engage magnet affect. moving all items near/directional away with a small force
64
-
{}
65
-
};
66
-
if(!input.Pressed(InputButton.Attack2){
67
-
/** this.attached:False -- Right Click to grab object. Take first object on crosshair of certain distance away to hold in front of magnetostick (ragdolled if possible)
68
-
this.attached:True -- Right Click to disattach object: */
63
+
if(!input.Pressed(InputButton.Attack1){
64
+
// Hold Left Click to engage magnet affect. moving all items near/directional away with a small force
65
+
{}
66
+
};
67
+
if(!input.Pressed(InputButton.Attack2){
68
+
/** this.attached:False -- Right Click to grab object. Take first object on crosshair of certain distance away to hold in front of magnetostick (ragdolled if possible)
69
+
this.attached:True -- Right Click to disattach object: */
0 commit comments