]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/oo/base.qh
Merge branch 'master' into Mario/ons_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / oo / base.qh
1 #ifndef BASE_H
2 #define BASE_H
3
4 .string classname;
5 entity Object_vtbl;
6 .string vtblname;
7 .entity vtblbase;
8 // THIS LINE INTENTIONALLY LEFT BLANK
9 entity spawnVtbl(entity e, entity b)
10 {
11         entity v;
12         v = spawn();
13         copyentity(e, v);
14         v.vtblname = v.classname;
15         v.classname = "vtbl";
16         if(b)
17                 v.vtblbase = b;
18         else
19                 v.vtblbase = v;
20         return v;
21 }
22 entity spawnObject()
23 {
24         entity e;
25         e = spawn();
26         e.classname = "Object";
27         if(!Object_vtbl)
28                 Object_vtbl = spawnVtbl(e, null_entity);
29         return e;
30 }
31 #endif