nifengyuexia
Member
Well, that function is different in JPN release. This can not work. But try.
Code:apiRequest(2.0) local gpr = require( "ee-gpr-alias" ) local eeObj = getEEObject() -- Fix bug 10414 - large stretched polygons block view of player characters local FixPointTable = function() local s6 = eeObj.GetGpr(gpr.s6) -- obj in question local p5Tbl = eeObj.ReadMem32(s6+0x10) -- ptr to object's data local numPts = eeObj.ReadMem32(p5Tbl+0x110) -- num points in list local pTbl = 0x1D47840 -- bg_point_buff (we need to scan this) for i = 1, numPts do local stat = eeObj.ReadMem32(pTbl + 0xc) -- check 4th word, should be 0 if (stat ~= 0) then -- if not, we need to fix if (i > 1) then -- if this is any but the first entry stat = eeObj.ReadMem64(pTbl-0x10) -- fix by replacing the x, y with eeObj.WriteMem64(pTbl, stat) -- the previous entry's x and y. stat = 0x0000000080000000 -- replace the z with 0x80000000 eeObj.WriteMem64(pTbl+8, stat) -- replace the 4th word with 0 else stat = eeObj.ReadMem32(pTbl + 0x1c) -- if this is the first entry if (stat == 0) then -- make sure the second entry is kosher stat = eeObj.ReadMem64(pTbl+0x10) eeObj.WriteMem64(pTbl, stat) -- if it is, use the x, y from that entry. stat = 0x0000000080000000 -- replace the z with 0x80000000 eeObj.WriteMem64(pTbl+8, stat) -- replace the 4th word with 0 else eeObj.WriteMem64(pTbl, 0) -- if the 2nd entry is not kosher eeObj.WriteMem64(pTbl+8, 0x0000000080000000) -- write 0, 0, 0x80000000, 0 end end else -- check if Z value is between 0 and 0x8000 stat = eeObj.ReadMem32(pTbl + 8) -- if so, overwrite Z with 0x80000000 if (stat <= 0x8000) then eeObj.WriteMem32(pTbl+8, 0x80000000) end end pTbl = pTbl + 0x10 end end eeObj.AddHook(0x4F4094, 0x8e150180, FixPointTable)
Okay, give you feedback after the test






