Hook think\spawn "gib"
How to hook think\spawn gibs after death in cs?
|
Re: Hook think\spawn "gib"
Last time I tested Ham_Think failed there, so I used register_think and it worked.
|
Re: Hook think\spawn "gib"
In combat.cpp not used LINK_ENTITY_TO_CLASS( entity_class, CGib ); therefore cannot be registered through Ham
|
Re: Hook think\spawn "gib"
By looking at CS mod code, yeah, you're right; there is no associated classname to the CGib class. An easy way to hook Gib spawn would be hooking SetModel (checking the properly model)
Then with the gib entid, you can hook with RegisterHamFromEntity forwards you want. But at the first hook, you wouldn't be able to hook Spawn pre (because you'll be registering forwards just some steps after Spawn Pre). |
Re: Hook think\spawn "gib"
Torment question: which is faster equal( szClassName, "gib" ) or ( szClassName[ 0 ] == 'g' && szClassName[ 2 ] == 'b' ) ?
|
Re: Hook think\spawn "gib"
The second one.
|
Re: Hook think\spawn "gib"
Are you checking it's classname?
|
Re: Hook think\spawn "gib"
Quote:
Quote:
|
Re: Hook think\spawn "gib"
Quote:
|
Re: Hook think\spawn "gib"
Quote:
|
| All times are GMT -4. The time now is 13:09. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.