mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-21 09:31:20 -08:00
Null check on designation I forgor
sowwy, this completely breaks the server whenever a new tracker (never connected before) connects. ;-;
This commit is contained in:
1 parent
91fb4bc035
commit
f2ceb84969
1 file changed
+6
-6
@@ -4,8 +4,6 @@ import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import io.eiren.util.logging.LogManager;
|
||||
|
||||
public enum TrackerPosition {
|
||||
|
||||
NONE("", TrackerRole.NONE),
|
||||
@@ -41,10 +39,12 @@ public enum TrackerPosition {
|
||||
|
||||
public static TrackerPosition getByDesignation(String designation) {
|
||||
// Support old configs. leg was renamed to knee.
|
||||
if(designation.equals("body:left_leg"))
|
||||
designation = "body:left_knee";
|
||||
if(designation.equals("body:right_leg"))
|
||||
designation = "body:right_knee";
|
||||
if(designation != null) {
|
||||
if(designation.equals("body:left_leg"))
|
||||
designation = "body:left_knee";
|
||||
if(designation.equals("body:right_leg"))
|
||||
designation = "body:right_knee";
|
||||
}
|
||||
|
||||
return designation == null ? null : byDesignation.get(designation.toLowerCase());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user