I reallly need to know the answer to these questions please. I know one of you devs know it
Basically I'm trying to detect an entity being created and replacing that entity with another one, when a player fires their weapon (its a grenade launcher). I want the fastest but most efficient method, so their's less delay when they're grenade is switched. I tried to check when entity's are spawned so I hooked FM_CreateEntity, which was able to catch the grenade being created but all the values I got with entity_get_int were 0 so I couldn't find out who fired it.
I'm deciding whether to use player think (not prethink), or prethink. I want to know which one is more efficient to use. Currently I'm using the player think since its called in engine so its less laggy then prethink. Though If I were to hook FM_PlayerPreThink, it would be like PrePlayerPreThink, since the hook is executed before the real thing, which could probably be the fastest check.
- 1. Are fakemeta hooks to FM_Think and the engine forward pfn_think, called in the engine?
2. Lynx, are you sure prethink is not called in the engine? Doesn't seem to make sense that the player think (not prethink) is called in engine but the prethink is not, unless the prethink method was made by amxmodx and its not an engine native like normal thinks are. Likewise for postthink also I guess.
3. BTW, the FL_ALWAYSTHINK flag does not seem to work, I tried everything including setting other flags. I registered a think to the entity and it was never called. Maybe it can only use generic think like FM_Think or pfn_think? Does this have something to do with the ltime being set?
Correct me if I'm wrong.