register_think in fakemeta
I suppose that hooking prethink forward and checking classname is not a good way to make it.. If engine’s register_think is better designed (I don’t know), is there a way to hook an entity think by classname that same way in fakemeta?
|
Re: register_think in fakemeta
Code:
Or if you know the ent index and the ent going to be there for awhile. Then I would just store the ent index and compare it. |
Re: register_think in fakemeta
Yep, I was trying to avoid checking classname because it envolves some extra processing; copying pev->classname into a string, and comparing... But since I need to do that with few entities, I'm may check the indexes instead.
Thank you. |
Re: register_think in fakemeta
Engine does it the same way: on entity think, look through list of classnames registered for think, and if this entity's classname matches, call that forward.
|
| All times are GMT -4. The time now is 04:56. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.