RegisterHamFromEntity sends incorrectly
I have two plugins that use two different custom entities to think.
In the first code: Code:
new ent = fm_create_entity("info_target");Code:
if( !pev_valid(hill) )Code:
public HillThink( ent )Obviously I can do a classname check to get around this problem, but IMO it should not be doing this. Have I misinterpreted RegisterHamFromEntity, after changing the classname do I need a delay before RegisterHamFromEntity, or is it just whacky? |
Re: RegisterHamFromEntity sends incorrectly
RegisterHamFromEntity checks the entitys classname and registeres a hook for all entitys whith the same classname. if your classname was a info_target, it will register a hook for info_target even though you might have changed the classname.
all you have to do is a single Ham_Think hook for info_targets and check which costum entities id matches the send one of Ham_Think |
Re: RegisterHamFromEntity sends incorrectly
Quote:
Quote:
|
Re: RegisterHamFromEntity sends incorrectly
From hamsandwich.inc:
PHP Code:
|
Re: RegisterHamFromEntity sends incorrectly
RegisterHam() accepts only default entities as classname. I would use register_think(), it rocks. ^^
|
Re: RegisterHamFromEntity sends incorrectly
Quote:
|
Re: RegisterHamFromEntity sends incorrectly
What about to change the classname when you want to disable it. Like "_PPloop" and the function will not called ?
|
| All times are GMT -4. The time now is 01:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.