Closed redraskal closed 1 year ago
@stnokott Not gotten around to it- you can do this if you'd like!
We could add Operator to the MatchUpdate struct and another match update type for operator swaps. Then, append the event when the swap occurs.
Or perhaps the MatchUpdate struct should be split with composition now that it is used outside of UI events?
Are you talking about the team role swap?
Are you talking about the team role swap?
Yes. Was this not what you meant this issue for?
Are you talking about the team role swap?
Yes. Was this not what you meant this issue for?
No, this is when an attacker changes operator before the prep phase ends. Although, you can work on that too. We just need to associate a team role with the operators.
Ah I see. Sorry was indeed hinking about the role swap. The thing is, I can't really help with anything related to the replay file format, just not proficient enough with reverse-engineering file formats. I can help with internal logic things though. That's why I thought I can help with identifying role swaps since it seemed to be possible without reading any additional data from the replay file.
Yeah, that would be great. I think you could calculate the round swap using the available header data, right? And somewhat related, assigning a role to Operator would help with determining the role so we can stop using this unreliable alliance
field.
Probably calculated through rounds played and the gamemode?
Yeah, that would be great. I think you could calculate the round swap using the available header data, right?
Yes, assuming that the roles are correct, we can just simply find the first round where role[i] != role[i-1]
.
But now that I think about it, one could argue that calculating this should be a task for the framework user, not the framework itself...
And somewhat related, assigning a role to Operator would help with determining the role so we can stop using this unreliable
alliance
field.
Hm, unsure about this one. Having the role
field on the team
struct should suffice. The usual approach is going over the teams, then the players in each team and then possibly the operators each player plays. Thus, having the role in the team
struct allows us to map the role to a team, a player and a operator with just one field which is only allocated twice.
In my eyes, ditching the alliance
field, but keeping the role
field on the team
struct is the best and most efficient solution.
Obviously, this moves a bit of overhead from the library to the user, but I think it can be argued that it is reasonable to delegate deriving operator roles from team roles to the user.
Yes, it should stay on the team struct. I think we just need a way to calculate what role each operator is part of, so we can assign the team role
based on what the players pick.
Let's continue this discussion in #28 to not bloat this issue with unrelated discussions.
Are you actively working on this?
If not, I could draft a MR for this if you want. How do you want to manifest the role swap in the structs? Probably just a new field in the
Header
struct..? Something likeRoundSwap bool
?