Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
defer.qh File Reference
#include "oo.qh"
#include "self.qh"
Include dependency graph for defer.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 classfield (Defer).entity owner
void defer (entity this, float fdelay, void(entity) func)
 Execute func() after time + fdelay.
void defer_think (entity this)
 entityclass (Defer)
void SUB_Remove (entity this)
 Remove entity.

Function Documentation

◆ classfield()

classfield ( Defer )

References entity(), and owner.

◆ defer()

void defer ( entity this,
float fdelay,
void(entity) func )

Execute func() after time + fdelay.

self when func is executed = self when defer is called

Definition at line 29 of file defer.qh.

30 {
31 entity e = new_pure(deferred);
32 e.owner = this;
33 e.defer_func = func;
35 e.nextthink = time + fdelay;
36 }
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float time
void defer_think(entity this)
Definition defer.qh:18
#define new_pure(class)
purely logical entities (not linked to the area grid)
Definition oo.qh:67
#define setthink(e, f)

References defer_think(), entity(), new_pure, setthink, and time.

Referenced by spawnfunc(), sv_notice_join(), TEST(), and trigger_push_test().

◆ defer_think()

void defer_think ( entity this)

Definition at line 18 of file defer.qh.

19 {
20 setthink(this, SUB_Remove);
21 this.nextthink = time;
22 this.defer_func(this.owner);
23 }
entity owner
Definition main.qh:87
float nextthink
void SUB_Remove(entity this)
Remove entity.
Definition defer.qh:13

References entity(), nextthink, owner, setthink, SUB_Remove(), and time.

Referenced by defer().

◆ entityclass()

entityclass ( Defer )

◆ SUB_Remove()