redraskal / r6-dissect

Match Replay API/CLI for Rainbow Six: Siege's Dissect (.rec) format.
MIT License
70 stars 11 forks source link

Banned By BattleEye Activity #5

Closed Slowline closed 1 year ago

Slowline commented 1 year ago

Hey, just reading through your code right now, I've found lines 35 – 43 in activity.go.

log.Debug().Hex("indicator", indicator).Send()
if !bytes.Equal(indicator, someOtherActivityIndicator) {
    continue
}
// No idea what the first 18 bytes mean
_, err = readBytes(18, c.compressed)
if err != nil {
    return activities, err
}

You're stating “No idea what the first 18 bytes mean” here. While going through some replays on my own in a hex editor, I've found an interesting pattern.

After someOtherActivityIndicator (these are old demos with version 6619085, the identifier in here is 0x03, 0xf0) there are 4 empty bytes following 6 bytes indicating what I presume an Activity Type. On the Left you see the regular Bomb Location Found-Activity and on the Right you'll see a BattleEye-Ban-Activity. Well in these sequences only the last byte changes as for these both types. But I'm still not sure what the 8 bytes after that mean.

var battleEyeBanType = []byte{0x59, 0x34, 0xe5, 0x8b, 0x04, 0x00}
var bombFoundType = []byte{0x59, 0x34, 0xe5, 0x8b, 0x04, 0x02}

This might be a trace for finding Defuse etc. and be worth a shot for adding that in.

Screenshot 2022-12-06 231917

redraskal commented 1 year ago

Interesting, thank you for pointing that out! I noticed a few weeks ago activities are not caught every round. I'm about to look into that as well.

redraskal commented 1 year ago

So, I think this byte change on bombs is modifying the background color of the HUD text to blue for bomb found messages. I'm just going to mark locates, battleye bans, and players joining and leaving by checking the text for certain words. The problem is siege sends these to players already localized, so dissect will eventually need a list of these localized terms so it works with any language.

redraskal commented 1 year ago

Added a Battleye event in match feedback. The problem is this message is localized, so I can't handle all edge cases. I created an Other event for non-English messages.