[FM] get_tr2 TR_pHit loves the fun module
Disable the fun module and run the script below.
The server will crash with "bad entity in index of edict". But it will not crash if fun module is enabled. Code:
|
Re: [FM] get_tr2 TR_pHit loves the fun module
You're not calling the traceline function from the engine yourself. Observe that you're hooking it pre, so the traceresult structure is in fact garbage/unfilled.
You must manually call traceline to ensure that valid data exists, otherwise you are relying on a previous module being in the call chain and having had modified the structure (such as Fun does). I.e., this isn't a bug, just a misunderstanding of how Metamod pre calls work ;) |
Re: [FM] get_tr2 TR_pHit loves the fun module
This is what you must do below if your not going to use the fun module and hooking pre.
Code:
|
Re: [FM] get_tr2 TR_pHit loves the fun module
Note one thing - and this is an annoyance in how MM works - doing this will override the value from Fun. So your script will interfere with other scripts doing hitbox stuff.
There really isn't any nice solution to this except for putting fun down further on the call chain than fakemeta. |
Re: [FM] get_tr2 TR_pHit loves the fun module
Of course, and i knew that i had to hook it in post, don't know how did i forgot/not noticed that, this can be locked, sorry.
|
All times are GMT -4. The time now is 21:22. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.