Skip to content

Commit 61e4712

Browse files
committed
Fixed Unassign POV NONSHIFT LAYER when binding POV SHIFT
1 parent 8283061 commit 61e4712

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

FalconBMS Alternative Launcher Cs/JoyAssgn.cs

+10-10
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,19 @@ public class DirAssgn
141141
public int[] SoundID { get { return this.soundID; } set { this.soundID = value; } }
142142

143143
// Constructor
144-
public DirAssgn(string callback, Pinky pinky, int soundID)
145-
{
146-
this.callback[(int)pinky] = callback;
147-
this.soundID[(int)pinky] = soundID;
148-
}
149-
150144
public DirAssgn() { }
151145

152146
// Method
153147
public string GetCallback(Pinky pinky) { return this.callback[(int)pinky]; }
154148
public int GetSoundID(Pinky pinky) { return this.soundID[(int)pinky]; }
155149

156-
public void UnAssgin(Pinky pinky)
150+
public void Assign(string callback, Pinky pinky, int soundID)
151+
{
152+
this.callback[(int)pinky] = callback;
153+
this.soundID[(int)pinky] = soundID;
154+
}
155+
156+
public void UnAssign(Pinky pinky)
157157
{
158158
this.callback[(int)pinky] = "SimDoNothing";
159159
this.soundID[(int)pinky] = 0;
@@ -164,7 +164,7 @@ public void Assign(int GetPointofView, string callback, Pinky pinky, int soundID
164164
{
165165
if (GetPointofView > 7)
166166
GetPointofView = GetPointofView / 4500;
167-
this.direction[GetPointofView] = new DirAssgn(callback, pinky, soundID);
167+
this.direction[GetPointofView].Assign(callback, pinky, soundID);
168168
}
169169

170170
public string GetDirection(int GetPointOfView)
@@ -248,9 +248,9 @@ public void UnassigntargetCallback(string callbackname)
248248
for (int ii = 0; ii < this.pov[i].direction.Length; ii++)
249249
{
250250
if (this.pov[i].direction[ii].GetCallback(Pinky.UnShift) == callbackname)
251-
this.pov[i].direction[ii].UnAssgin(Pinky.UnShift);
251+
this.pov[i].direction[ii].UnAssign(Pinky.UnShift);
252252
if (this.pov[i].direction[ii].GetCallback(Pinky.Shift) == callbackname)
253-
this.pov[i].direction[ii].UnAssgin(Pinky.Shift);
253+
this.pov[i].direction[ii].UnAssign(Pinky.Shift);
254254
}
255255
}
256256

0 commit comments

Comments
 (0)