PDA

View Full Version : Pre/Post Think


IceMouse[WrG]
04-18-2004, 12:38
It should be for entities, as well, not just for clients

AssKicR
04-18-2004, 14:12
no

for entities there is an EntityThink... they just gotta add it...

IceMouse[WrG]
04-18-2004, 14:30
...
I wasn't being picky about it...
Just a Pre and Post think forward, which was for entities

QwertyAccess
04-18-2004, 14:35
EntityPreThink? :P

IceMouse[WrG]
04-18-2004, 14:39
Which doesn't exist, as far as I know.
I checked most of the incs for anything in relation to PreThink, and the only one is client_PreThink(id)

SidLuke
04-18-2004, 15:04
entities think through entvars->nextthink. For entities use server_frame forward

IceMouse[WrG]
04-18-2004, 16:18
I was going to use that if worse came to worst...

I'll have to think of what to change, then

PM
04-18-2004, 16:21
entities think through entvars->nextthink. For entities use server_frame forward

but something (a module for example) can force them to think before entvars->nextthink >= gpGlobals->time, or not?

SidLuke
04-18-2004, 18:54
With module you can do many things :) Even new entities . Im not talking about standard HL entity with changed classname but about new class. Adminmod has one I think ... Time entity or something... ? There are many possibilities. Maybe its possible to create something like amx entity class and forward its Think() function so plugins autors could use it .
Like :
in module: create new class (must be in metamod link list also ?)
in plugin: call create_amx_entity native or something similar, register a function as Think() >> ( *amx link to plugin , function id , and think time ?? ) , register other functions ( precache , spawn ... )

Eh, it is a story for different topic. Sounds like a revolution in HL scripting Much better than Vexd(engine) and so powerfull with Vexd(engine) functions :lol: Or maybe I must go to bed :lol: :)

To hard for me :( Maybe someone can do it :)

Back to your question :)
entvars->nextthink time change doesn't work ?

IceMouse[WrG]
04-18-2004, 19:06
http://forums.alliedmods.net/showthread.php?t=1190
That is what I wanted it for... I just used server_frame() instead, though, as suggested

BAILOPAN
04-18-2004, 19:17
If you force a Think with nextthink, metamod will still hook it, won't it?
the only reason it wouldn't is if:
you are calling MDLL_Think() or another plugin is blocking it

PM
04-19-2004, 03:16
If you force a Think with nextthink, metamod will still hook it, won't it?
the only reason it wouldn't is if:
you are calling MDLL_Think() or another plugin is blocking it

yes, i was talking about MDLL_Think :)

T(+)rget
04-19-2004, 14:29
Physics code on our new Ball uses:

EntityThink(pEntity) (forward)

And we got it under constant activation using Entvars_Set_Int(Ball, EV_INT_flags, FL_ALWAYSTHINK) but you can use the EV_FL_nextthink(Ball, x.x) which means it only gets called at selected intervals.