Skip to content

Commit

Permalink
Added fix for longer names due to TMPro tags (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
JKohlman authored Oct 24, 2023
1 parent 59aadf6 commit f80bb33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/GameReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1083,15 +1083,15 @@ export default class GameReader {
let name = 'error';
let shiftedColor = -1;
if (data.hasOwnProperty('name')) {
name = this.readString(data.name).split(/<.*?>/).join('');
name = this.readString(data.name, 1000).split(/<.*?>/).join('');
} else {
this.readDictionary(data.outfitsPtr, 6, (k, v, i) => {
const key = this.readMemory<number>('int32', k);
const val = this.readMemory<number>('ptr', v);
if (key === 0 && i == 0) {
const namePtr = this.readMemory<number>('pointer', val, this.offsets!.player.outfit.playerName); // 0x40
data.color = this.readMemory<number>('uint32', val, this.offsets!.player.outfit.colorId); // 0x14
name = this.readString(namePtr).split(/<.*?>/).join('');
name = this.readString(namePtr, 1000).split(/<.*?>/).join('');
data.hat = this.readString(this.readMemory<number>('ptr', val, this.offsets!.player.outfit.hatId));
data.skin = this.readString(this.readMemory<number>('ptr', val, this.offsets!.player.outfit.skinId));
data.visor = this.readString(this.readMemory<number>('ptr', val, this.offsets!.player.outfit.visorId));
Expand Down

0 comments on commit f80bb33

Please sign in to comment.