Quote:
Originally Posted by SecurityByDesign
Does someone started to put new headers? It could be nice if we all feed the github from Rheek123 with our new headers :D
link to the header patcher from rheek on github
[Only registered and activated users can see links. Click Here To Register...]
|
I think all the headers are sorted out but the remaining issue is with some of the functions. Many functions in GWA2 use an internal function called PerformAction. Something inside seems to have changed. With this broken many of the target functions, ChangeWeaponSet, and ToggleWindows are broken.
I am looking over the data now but it may be linked to either a changed offset or something to do with the some of the patterns or values which may have changed.
Example Function:
Code:
Func TargetNearestEnemy()
Return PerformAction(0x88, 0x18)
EndFunc
PerformAction
Code:
;~ Description: Internal use only.
Func PerformAction($aAction, $aFlag)
If GetAgentExists(-2) Then
DllStructSetData($mAction, 2, $aAction)
DllStructSetData($mAction, 3, $aFlag)
Enqueue($mActionPtr, 12)
Return True
Else
Return False
EndIf
EndFunc ;==>PerformAction
GetAgentExists
Code:
;~ Description: Test if an agent exists.
Func GetAgentExists($aAgentID = -2)
Return (GetAgentPtr($aAgentID) > 0 And $aAgentID < GetMaxAgents())
EndFunc ;==>GetAgentExists
GetMaxAgents
Code:
;~ Description: Returns number of agents currently loaded.
Func GetMaxAgents()
Return MemoryRead($mMaxAgents)
EndFunc ;==>GetMaxAgents