9 class(Defer).entity owner;
10 class(Defer).void(entity) defer_func;
13 void SUB_Remove(entity this)
18 void defer_think(entity this)
20 setthink(this, SUB_Remove);
21 this.nextthink = time;
22 this.defer_func(this.owner);
26 * Execute func() after time + fdelay.
27 * self when func is executed = self when defer is called
29 void defer(entity this, float fdelay, void(entity) func)
31 entity e = new_pure(deferred);
34 setthink(e, defer_think);
35 e.nextthink = time + fdelay;