mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
fix: negative hard joint handling... correctly this time
This commit is contained in:
1 parent
062e6e9626
commit
0582339332
4 files changed
+30
-20
No files matched your search
@@ -1,5 +1,5 @@
|
||||
export function nameToArmorId(name: string) {
|
||||
const match = name.match(/.+_armor_(\d+)/);
|
||||
const match = name.match(/.+_armor_(-?\d+)/);
|
||||
const group1 = match![1];
|
||||
|
||||
return parseInt(group1);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import { ModelArmor } from './modelDefinitions';
|
||||
|
||||
export function resolveArmor(armor: ModelArmor, index: number) {
|
||||
const spaced = armor.spaced?.includes(index) ?? false;
|
||||
const thickness = index === -1 ? 0 : armor.thickness[index] ?? 0;
|
||||
|
||||
return { spaced, thickness };
|
||||
}
|
||||
Reference in new issue
Block a user