llde / xOBSE

Oblivion Script extender source
243 stars 35 forks source link

GetGroundSurfaceMaterial Oddities #103

Open qwertyasdfgh2 opened 3 years ago

qwertyasdfgh2 commented 3 years ago

GetGroundSurfaceMaterial function only seems to return correct values when player is standing on an object with set material type. When standing on terrain it always returns 31 (Default/Unknown) regardless of material type set in land texture. Is this a bug or just a limitation?

Additionally, when waterwalking (using magic) it also returns 31 - one would expect it to return 8 (Water) in that situation.

shadeMe commented 3 years ago

IIRC (it's been nearly a decade since I implemented the command, so I could be wrong), it's a limitation as the engine doesn't assign the correct Havok material to the terrain. One could theoretically patch the physics engine to do this, though.

qwertyasdfgh2 commented 3 years ago

Well, that's a shame. Anyway, if it can't be fixed from OBSE, feel free to close this.

llde commented 3 years ago

I'm willing to have this fixed, but I have nothing about havok and terrains