feat(core): port decompiled AC client physics — CollisionPrimitives + PhysicsBody
Two major C# ports from the decompiled retail AC client (acclient.exe): 1. CollisionPrimitives (9 functions, 26 tests): - SphereIntersectsRay, RayPlaneIntersect, CalcNormal - SphereIntersectsPoly, FindTimeOfCollision - HitsWalkable, FindWalkableCollision - SlideSphere, LandOnSphere Ported from chunk_00530000.c functions FUN_005384e0 through FUN_0053a230. Cross-referenced against ACE's Physics/ C# port for algorithm verification. 2. PhysicsBody (7 methods, 31 tests): - update_object (top-level per-frame, sub-stepped at MaxQuantum=0.1) - UpdatePhysicsInternal (Euler: pos += v*dt + 0.5*a*dt²) - calc_acceleration (gravity=-9.8 when HasGravity) - set_velocity (clamp to MaxVelocity=50) - set_local_velocity (body→world via quaternion) - set_on_walkable, calc_friction (ground normal + pow decay) Ported from chunk_00510000.c/chunk_00500000.c. Struct layout confirmed against ACE PhysicsObj field offsets. 367 total tests green (258 core + 109 net). 57 new tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
21fd550909
commit
6a5d8c1580
36 changed files with 989 additions and 0 deletions
0
tools/ghidra_project/acclient.gpr
Normal file
0
tools/ghidra_project/acclient.gpr
Normal file
11
tools/ghidra_project/acclient.rep/idata/00/00000000.prp
Normal file
11
tools/ghidra_project/acclient.rep/idata/00/00000000.prp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<FILE_INFO>
|
||||
<BASIC_INFO>
|
||||
<STATE NAME="CONTENT_TYPE" TYPE="string" VALUE="Program" />
|
||||
<STATE NAME="PARENT" TYPE="string" VALUE="/" />
|
||||
<STATE NAME="FILE_ID" TYPE="string" VALUE="c0a8162cd88181512443538400" />
|
||||
<STATE NAME="FILE_TYPE" TYPE="int" VALUE="0" />
|
||||
<STATE NAME="READ_ONLY" TYPE="boolean" VALUE="false" />
|
||||
<STATE NAME="NAME" TYPE="string" VALUE="acclient.exe" />
|
||||
</BASIC_INFO>
|
||||
</FILE_INFO>
|
||||
BIN
tools/ghidra_project/acclient.rep/idata/00/~00000000.db/db.3.gbf
Normal file
BIN
tools/ghidra_project/acclient.rep/idata/00/~00000000.db/db.3.gbf
Normal file
Binary file not shown.
BIN
tools/ghidra_project/acclient.rep/idata/00/~00000000.db/db.4.gbf
Normal file
BIN
tools/ghidra_project/acclient.rep/idata/00/~00000000.db/db.4.gbf
Normal file
Binary file not shown.
5
tools/ghidra_project/acclient.rep/idata/~index.bak
Normal file
5
tools/ghidra_project/acclient.rep/idata/~index.bak
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
VERSION=1
|
||||
/
|
||||
00000000:acclient.exe:c0a8162cd88181512443538400
|
||||
NEXT-ID:1
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
||||
5
tools/ghidra_project/acclient.rep/idata/~index.dat
Normal file
5
tools/ghidra_project/acclient.rep/idata/~index.dat
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
VERSION=1
|
||||
/
|
||||
00000000:acclient.exe:c0a8162cd88181512443538400
|
||||
NEXT-ID:1
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
||||
6
tools/ghidra_project/acclient.rep/project.prp
Normal file
6
tools/ghidra_project/acclient.rep/project.prp
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<FILE_INFO>
|
||||
<BASIC_INFO>
|
||||
<STATE NAME="OWNER" TYPE="string" VALUE="erikn" />
|
||||
</BASIC_INFO>
|
||||
</FILE_INFO>
|
||||
4
tools/ghidra_project/acclient.rep/user/~index.dat
Normal file
4
tools/ghidra_project/acclient.rep/user/~index.dat
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
||||
4
tools/ghidra_project/acclient.rep/versioned/~index.bak
Normal file
4
tools/ghidra_project/acclient.rep/versioned/~index.bak
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
||||
4
tools/ghidra_project/acclient.rep/versioned/~index.dat
Normal file
4
tools/ghidra_project/acclient.rep/versioned/~index.dat
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,5 @@
|
|||
VERSION=1
|
||||
/
|
||||
00000000:acclient.exe:c0a8162ccd0182120605721300
|
||||
NEXT-ID:1
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
||||
0
tools/ghidra_project/acclient_full2/acclient_full2.gpr
Normal file
0
tools/ghidra_project/acclient_full2/acclient_full2.gpr
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<FILE_INFO>
|
||||
<BASIC_INFO>
|
||||
<STATE NAME="CONTENT_TYPE" TYPE="string" VALUE="Program" />
|
||||
<STATE NAME="PARENT" TYPE="string" VALUE="/" />
|
||||
<STATE NAME="FILE_ID" TYPE="string" VALUE="c0a8162d356182196155907400" />
|
||||
<STATE NAME="FILE_TYPE" TYPE="int" VALUE="0" />
|
||||
<STATE NAME="READ_ONLY" TYPE="boolean" VALUE="false" />
|
||||
<STATE NAME="NAME" TYPE="string" VALUE="acclient.exe" />
|
||||
</BASIC_INFO>
|
||||
</FILE_INFO>
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,4 @@
|
|||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
VERSION=1
|
||||
/
|
||||
00000000:acclient.exe:c0a8162d356182196155907400
|
||||
NEXT-ID:1
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
IADD:00000000:/acclient.exe
|
||||
IDSET:/acclient.exe:c0a8162d356182196155907400
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<FILE_INFO>
|
||||
<BASIC_INFO>
|
||||
<STATE NAME="OWNER" TYPE="string" VALUE="erikn" />
|
||||
</BASIC_INFO>
|
||||
</FILE_INFO>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<FILE_INFO>
|
||||
<BASIC_INFO>
|
||||
<STATE NAME="CONTENT_TYPE" TYPE="string" VALUE="Program" />
|
||||
<STATE NAME="PARENT" TYPE="string" VALUE="/" />
|
||||
<STATE NAME="FILE_ID" TYPE="string" VALUE="c0a8162f0d1181714693391400" />
|
||||
<STATE NAME="FILE_TYPE" TYPE="int" VALUE="0" />
|
||||
<STATE NAME="READ_ONLY" TYPE="boolean" VALUE="false" />
|
||||
<STATE NAME="NAME" TYPE="string" VALUE="acclient.exe" />
|
||||
</BASIC_INFO>
|
||||
</FILE_INFO>
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,5 @@
|
|||
VERSION=1
|
||||
/
|
||||
00000000:acclient.exe:c0a8162f0d1181714693391400
|
||||
NEXT-ID:1
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
VERSION=1
|
||||
/
|
||||
00000000:acclient.exe:c0a8162f0d1181714693391400
|
||||
NEXT-ID:1
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<FILE_INFO>
|
||||
<BASIC_INFO>
|
||||
<STATE NAME="OWNER" TYPE="string" VALUE="erikn" />
|
||||
</BASIC_INFO>
|
||||
</FILE_INFO>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
||||
Loading…
Add table
Add a link
Reference in a new issue