LegacyScriptEngine
LegacyScriptEngine copied to clipboard
[Bug]: Native Api中使用hook会导致服务器崩溃(补上了崩溃日志)
Describe the bug
使用native api里NativeFunction原生函数的hook方法后,当原函数被调用,服务端就会崩溃
To Reproduce
如下例,当玩家与村民等实体交互时,即原函数被调用时,服务端崩溃
let func = NativeFunction.fromSymbol("?interact@Player@@QEAA_NAEAVActor@@AEBVVec3@@@Z");
func.hook((pl, act, pos) => {
let res = func.call(pl, act, pos);
return res;
});
Expected behavior
不崩溃
Screenshots
No response
Platform
win10
BDS Version
1.20.62
LeviLamina Version
0.9.2
LegacyScriptEngine Version
0.4.3
Additional context
据我所知ll3下的LSE没有native api了吧😂