Merge remote-tracking branch 'origin/samual/serverlist'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / oo / base.h
1 .string classname;
2 entity Object_vtbl;
3 .string vtblname;
4 .entity vtblbase;
5 // THIS LINE INTENTIONALLY LEFT BLANK
6 entity spawnVtbl(entity e, entity b)
7 {
8         entity v;
9         v = spawn();
10         copyentity(e, v);
11         v.vtblname = v.classname;
12         v.classname = "vtbl";
13         if(b)
14                 v.vtblbase = b;
15         else
16                 v.vtblbase = v;
17         return v;
18 }
19 entity spawnObject()
20 {
21         entity e;
22         e = spawn();
23         e.classname = "Object";
24         if(!Object_vtbl)
25                 Object_vtbl = spawnVtbl(e, null_entity);
26         return e;
27 }