Reduce chance of index error

This commit is contained in:
memetrollsXD 2022-08-03 04:21:40 +02:00
parent a2ee743b26
commit 87c5fe3e0e
No known key found for this signature in database
GPG Key ID: 105C2F3417AC32CD

View File

@ -155,14 +155,13 @@ export default class Player {
planeId: 10001
}
const LINEUPS = 6;
let slot = 0;
dataObj.lineup = {
curIndex: 0,
lineups: {}
}
for (let i = 0; i <= LINEUPS; i++) {
const copy = baseLineup;
copy.index = slot++;
copy.index = 0;
dataObj.lineup.lineups[i] = copy;
}