amki Posted April 28, 2012 Share Posted April 28, 2012 Hiho,my fellow friend bawki and me found the new offsets needed for Battlefield 3.The new offsets are:0x239E420 (X?)0x239E424 (Y? (Height!))0x239E428 (Z?)We also found that the orientation is dynamically allocated (near 0x0239D200 and bigger).Unfortunately we've had some issues understanding the current Battlefield 3 plugin code (https://github.com/mumble-voip/mumble/blob/master/plugins/bf3/bf3.cpp). Especially: is avatar_pos a float[3] containing x,y,z? (That would explain why there are 12byte read via peekProc()).What should avatar_top and avatar_front contain? Are both needed or will the x,y,z coordinates of your ingame position suffice?Cheersamki Quote Link to comment Share on other sites More sharing options...
bawki Posted April 28, 2012 Share Posted April 28, 2012 Server IP and port can be found at:0x02395298 String[26] ip:portI am still looking for squad/team information, but that could take a while(and a lucky shot ;)), also we currently do not have a new state offset, would be appreciated if golex can contribute how the values looked before the patch.update:0x0238CC2C could be sufficient for a state offset,it sometimes glitches to 4, but 1=loading, 2=game, 3=menu.since it appears as if you used arbitrary offsets for avatar_front and avatar_top I ignored those and made a patch+updated dll, which I will test today(after catching some sleep).greetings Quote Link to comment Share on other sites More sharing options...
amki Posted April 28, 2012 Author Share Posted April 28, 2012 We've found that 0x0239D200 CAN be the player's orientation but it can also be the orientation of another player.I do not yet quite understand how orientation saving works, I guess there has to be a pointer towards the current player's orientation but I've not yet found it :| Quote Link to comment Share on other sites More sharing options...
xelog Posted April 29, 2012 Share Posted April 29, 2012 Hey dudes,Your status offset was correct, nice work on finding that! For future reference, the start of the player orientation data is exactly 108 bytes (0x6C in hex) below that status offset in BF3 memory. The orientation is stored in a couple of memory aligned Vector3's. After finding the position vectors address, the up vector is 0x20 bytes after it, and the forward vector is 0x10 bytes after the up vector. Quote Link to comment Share on other sites More sharing options...
bawki Posted April 29, 2012 Share Posted April 29, 2012 yep i actually found the exact pos and orientation vectors you found, but got delayed due to fixing my multimeter's batteries :/, it was a mere 3minutes too late. The competition for next patch is ON! :D Quote Link to comment Share on other sites More sharing options...
xelog Posted April 29, 2012 Share Posted April 29, 2012 Go for it, I don't play BF3 anymore just keep my plugin updated because a decent # of people use it. If you get the offsets before I do shoot me an email so I can just update my plugin using yours, saves me some time! :) Quote Link to comment Share on other sites More sharing options...
bawki Posted June 25, 2012 Share Posted June 25, 2012 new update:https://github.com/bogie/mumble/commit/39e34edea0c185235fec8a70d86740d0a2b5e65ehas context support, and squad identity support. I can't seem to find any good value for team identity... at least nothing obvious. Quote Link to comment Share on other sites More sharing options...
Administrators kissaki Posted June 25, 2012 Administrators Share Posted June 25, 2012 You may want to submit it as a pull request on github, for a code review and potential pull.If I get the diff-code right, you set the identity to the squads ID. However, AFAIK, the identity is meant to be unique (in the context), so not meant for squads but for individuals. Quote Link to comment Share on other sites More sharing options...
bawki Posted June 25, 2012 Share Posted June 25, 2012 I will not create a pull request until I can find a valid team state value, it simply does not work without.As far as I understood the Mumble plugin API, you use the context to distinguish who is on what server, and the identity to put players into groups that belong together: people in the same team and more precise people in the same squad. This allows you to only send positional audio to people in their own team and/or squad. You can already distinguish the player from other players just by him being in mumble, now you can cross reference a list of players by their squad/team.Context:which server you are onIdentity:which group you belong to as in:- team- squad- do you have a special position in game(commander/squad leader?)Correct me if I overlooked something, also if someone can contribute how I can use the identity/context data server side, that would be awesome. I know the guys from Project Reality(realitymod.com) do it with their modded client+server. I would really like to do the same for BF3.more info: http://mumble.sourceforge.net/Positional-Audio Quote Link to comment Share on other sites More sharing options...
Administrators kissaki Posted June 27, 2012 Administrators Share Posted June 27, 2012 Context: Your talking context e.g. the context that is common to the people hearing each other positionally; meaning: the game, server and team they are on (so ppl from one team can hear each other). That is, if it is a competitive game where you don’t want to hear others from a positional direction to not get an advantage over not using PA. (So ppl don’t disable it entirely so enemies don't hear them PA.)The identity is used to uniquely identify you in the game, e.g. a player ID, so the Mumble server can be connected with the game server through scripting. E.g. automatically put a player into a channel based on what team he is on the server./e:Actually, reading the PA wiki page, you are right.It seems the documented and expected way is to use team in identity and server (etc) in context.It does not explicitly exclude the team from the context, but only names it for identity …I wonder if this is the right choice though, as ppl. might want to only be able to hear and be heard by teammates. Making this optional via a setting would be great. Unfortunately, this does not work with the current system of just one context. One would need two plugins then … Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.