Advertisement
Guest User

Battlefield Bad Company 2 Player Iteration Test

a guest
Sep 23rd, 2016
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Prototype   Unknown_Function()
  2. Prototype   IsLocal()
  3. Prototype.i GetParent()
  4.  
  5. Structure CPlayerData
  6.   *Function0.Unknown_Function
  7.   *Function1.Unknown_Function
  8.   *Function2.Unknown_Function
  9.   *Function3.Unknown_Function
  10.   *Function4.Unknown_Function
  11.   *Function5.Unknown_Function
  12.   *Function6.Unknown_Function
  13.   *Function7.Unknown_Function
  14.   *Function8.Unknown_Function
  15.   *IsLocal.IsLocal               ; Must check before GetParent, may Or may Not actually check local. But the game called it, so i do too
  16.   *Function10.Unknown_Function
  17.   *Function11.Unknown_Function
  18.   *Function12.Unknown_Function
  19.   *GetParent.GetParent
  20.   *Function14.Unknown_Function
  21.   *Function15.Unknown_Function
  22.   *Function16.Unknown_Function
  23.   *Function17.Unknown_Function
  24.   *Function18.Unknown_Function
  25.   *Function19.Unknown_Function
  26.   *Function20.Unknown_Function
  27.  
  28.   unknown0.a[28]
  29.   Name.s{28}                    ; 0020
  30.   unknown1.a[108]
  31.   Team.l                        ; 00A8
  32. EndStructure
  33.  
  34. Structure CPlayer
  35.   unknown0.a[528]
  36.   *PlayerData.CPlayerData       ; 0210
  37.   unknown1.a[188]
  38.   X.f                           ; 02D0
  39.   Y.f                           ; 02D4
  40.   Z.f                           ; 02D8
  41. EndStructure
  42.  
  43. Prototype.i GetPlayerList()
  44.  
  45. Structure CEntityManager
  46.   *Function0.Unknown_Function
  47.   *GetPlayerList.GetPlayerList
  48.   *Function2.Unknown_Function
  49.  
  50.   unknown0.a[176]
  51.   *LocalPlayerData.CPlayerData  ; 00B4
  52. EndStructure
  53.  
  54. Structure CGameBase
  55.   unknown0.a[44]
  56.   EntityManager.CEntityManager  ; 002C
  57. EndStructure
  58.  
  59. Procedure Main()
  60.   *base.CGameBase = $152AC60    ; Is this the address, or a pointer to it?
  61.  
  62.   If Not *base
  63.     ProcedureReturn #False
  64.   EndIf
  65.  
  66.   If Not *base\EntityManager
  67.     ProcedureReturn #False
  68.   EndIf
  69.  
  70.   If *base\EntityManager\LocalPlayerData
  71.     MessageRequester("", *base\EntityManager\LocalPlayerData\Name)
  72.   EndIf
  73.  
  74.   Protected *PlayerList.Integer = *base\EntityManager\GetPlayerList()
  75.   Protected *PlayerEnd.Integer = *PlayerList + 4
  76.  
  77.   Protected *Address
  78.   For *Address = *PlayerList\i To *PlayerEnd\i-SizeOf(Integer) Step SizeOf(Integer)
  79.     *Player.CPlayerData = PeekI(PeekI(*Address)) ; Not sure about that, still haven't wrapped my head around c pointers ^^
  80.    
  81.     PrintN(*Player\Name)
  82.    
  83.   Next
  84.  
  85. EndProcedure
  86. Main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement