Questions about preThink and entity thinking
Is prethink called in the engine like normal think?
|
No.
|
Few more questions:
1. Are fakemeta hooks to FM_Think called in the engine also? 2. Would doing this make the entity think instantly? Code:
And would it be faster than doing this: Code:
3. Is it okay to hook a think function to a player? Code:
|
for #3 use:
Code:
|
1. Dunno
2. Dunno to the first part, but as to the second part I think 0.1 is the lowest you can make it, just like set_task 3. Yes, that's fine knekter: start reading. |
Please
I reallly need to know the answer to these questions please. I know one of you devs know it :lol:
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.
Correct me if I'm wrong. |
FL_ALWAYSTHINK is only for brush entities, so it's funny whenever people try to incorporate it into their plugins.
The only thing that uses it by default are trains. Quote:
|
Okay, FM_SetMode worked, now to see whether it's more efficient than the think method.
|
| All times are GMT -4. The time now is 14:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.