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

Commit 6d94ce2

Browse files
committed
Ronin edits
1 parent 32ca348 commit 6d94ce2

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

Ronin.rte/Actors/Brains/Commander/RoninCommander.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ AddActor = AHuman
8282
HolsterOffset = Vector
8383
X = -6
8484
Y = -4
85+
StableVelocityThreshold = Vector
86+
X = 12
87+
Y = 20
8588
Head = Attachable
8689
CopyOf = Ronin Commander Head
8790
ParentOffset = Vector

Ronin.rte/Actors/Brains/Commander/RoninCommander.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function Create(self)
2323
self.Head.Frame = self.face;
2424
end
2525
end
26+
self.stableVel = self:GetStableVelocityThreshold();
2627
end
2728
function Update(self)
2829
if self.updateTimer:IsPastSimMS(1000) then
@@ -36,9 +37,9 @@ function Update(self)
3637
end
3738
end
3839
self.Frame = (self.face == 2 and self.Vel.Y > (SceneMan.GlobalAcc.Y * 0.15)) and 3 or self.face;
39-
40+
local crouching = false;
4041
if self:IsPlayerControlled() and self.Status < Actor.INACTIVE and self.FGLeg and self.BGLeg then
41-
local crouching = self.controller:IsState(Controller.BODY_CROUCH);
42+
crouching = self.controller:IsState(Controller.BODY_CROUCH);
4243
if self.Status == Actor.UNSTABLE then
4344
if self.dir == self.FlipFactor then
4445
local motion = (self.Vel.Magnitude * 0.5 + math.abs(self.AngularVel));
@@ -49,6 +50,7 @@ function Update(self)
4950
else
5051
self.dir = 0;
5152
end
53+
crouching = false;
5254
elseif crouching then
5355
if not self.crouchHeld then
5456
if not self.tapTimer:IsPastSimMS(self.lungeTapDelay) and SceneMan.Scene.GlobalAcc.Magnitude > 10 then
@@ -60,4 +62,5 @@ function Update(self)
6062
end
6163
self.crouchHeld = crouching;
6264
end
65+
self:SetStableVelocityThreshold(crouching and self.stableVel * (1 + math.cos(self.RotAngle)) or self.stableVel)
6366
end
92 Bytes
Loading
89 Bytes
Loading

0 commit comments

Comments
 (0)