Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit fb7e0cd

Browse files
committed
Minor Medikit tweaks
1 parent 67032b4 commit fb7e0cd

File tree

2 files changed

+7
-50
lines changed

2 files changed

+7
-50
lines changed

Base.rte/Devices/Tools/Medikit/Medikit.ini

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -34,47 +34,6 @@ AddEffect = MOPixel
3434
EffectStopStrength = 0.5
3535

3636

37-
AddAmmo = Magazine
38-
PresetName = Medikit Magazine
39-
Mass = 0
40-
HitsMOs = 0
41-
GetsHitByMOs = 0
42-
SpriteFile = ContentFile
43-
FilePath = Base.rte/Null.bmp
44-
FrameCount = 1
45-
SpriteOffset = Vector
46-
X = 0
47-
Y = 0
48-
EntryWound = AEmitter
49-
CopyOf = Dent Metal
50-
ExitWound = AEmitter
51-
CopyOf = Dent Metal
52-
AtomGroup = AtomGroup
53-
AutoGenerate = 1
54-
Material = Material
55-
CopyOf = Bullet Metal
56-
Resolution = 2
57-
Depth = 0
58-
DeepGroup = AtomGroup
59-
AutoGenerate = 1
60-
Material = Material
61-
CopyOf = Bullet Metal
62-
Resolution = 3
63-
Depth = 1
64-
DeepCheck = 0
65-
JointStrength = 200
66-
JointStiffness = 1
67-
JointOffset = Vector
68-
X = 0
69-
Y = 0
70-
DrawAfterParent = 1
71-
RoundCount = 1
72-
RTTRatio = 0
73-
RegularRound = Round
74-
CopyOf = Null Round
75-
Discardable = 0
76-
77-
7837
AddDevice = HDFirearm
7938
PresetName = Medikit
8039
AddToGroup = Tools
@@ -125,7 +84,7 @@ AddDevice = HDFirearm
12584
Y = 2
12685
SharpLength = 5
12786
Magazine = Magazine
128-
CopyOf = Medikit Magazine
87+
CopyOf = Null Magazine
12988
Loudness = 0.0
13089
RateOfFire = 100
13190
ReloadTime = 500

Base.rte/Devices/Tools/Medikit/Medikit.lua

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ function Update(self)
77
if parent and IsActor(parent) then
88
parent = ToActor(parent);
99
local target;
10-
local extend = 0;
11-
if parent:GetController():IsState(Controller.AIM_SHARP) then
12-
extend = self.Radius; -- Reach out further
13-
end
10+
local extend = parent:GetController():IsState(Controller.AIM_SHARP) and self.Radius or 0;
11+
1412
for actor in MovableMan.Actors do
1513
local dist = SceneMan:ShortestDistance(self.MuzzlePos, actor.Pos, SceneMan.SceneWrapsX);
1614
if dist.Magnitude < (actor.Radius + extend) and actor.Team == self.Team and actor.ID ~= parent.ID then
@@ -31,11 +29,11 @@ function Update(self)
3129
target:FlashWhite(50);
3230
AudioMan:PlaySound("Base.rte/Sounds/GUIs/SlicePicked.wav", SceneMan:TargetDistanceScalar(self.Pos), false, true, -1);
3331

34-
local radist = math.ceil(5 + target.Radius / 2);
35-
for i = 1, radist do
32+
local targetSize = math.ceil(5 + target.Radius / 2);
33+
for i = 1, targetSize do
3634
local part = CreateMOPixel("Heal Glow", "Base.rte");
37-
local vec = Vector(radist * 2, 0):RadRotate(6.28 / radist * i);
38-
part.Pos = target.Pos + Vector(0, -radist / 3):RadRotate(target.RotAngle) + vec;
35+
local vec = Vector(targetSize * 2, 0):RadRotate(6.28 / targetSize * i);
36+
part.Pos = target.Pos + Vector(0, -targetSize / 3):RadRotate(target.RotAngle) + vec;
3937
part.Vel = target.Vel * 0.5 - Vector(vec.X, vec.Y) / 4;
4038
MovableMan:AddParticle(part);
4139
end

0 commit comments

Comments
 (0)