]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/monsters/lib/monsters_early.qh
Allow spawning monsters by ID & remove spawn list
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / monsters / lib / monsters_early.qh
1 // for definitions used outside the monsters folder
2
3 #ifdef SVQC
4 .string spawnmob;
5 .float monster_attack;
6
7 float monster_skill;
8 float spawncode_first_load; // used to tell the player the monster database is loading (TODO: fix this?)
9
10 .entity monster_owner; // new monster owner entity, fixes non-solid monsters
11 .float monstercount; // per player monster count
12
13 .float stat_monsters_killed; // stats
14 .float stat_monsters_total;
15 float monsters_total;
16 float monsters_killed;
17 void monsters_setstatus(); // monsters.qc
18 .float monster_moveflags; // checks where to move when not attacking
19 #endif // SVQC
20
21 #ifndef MENUQC
22 .float monsterid;
23 // Monster IDs
24 float MONSTER_FIRST             = 1;
25 float MONSTER_ZOMBIE            = 2;
26 float MONSTER_BRUTE             = 3;
27 float MONSTER_ANIMUS            = 4;
28 float MONSTER_SHAMBLER          = 5;
29 float MONSTER_BRUISER           = 6;
30 float MONSTER_WYVERN            = 7;
31 float MONSTER_CERBERUS          = 8;
32 float MONSTER_SLIME             = 9;
33 float MONSTER_KNIGHT            = 10;
34 float MONSTER_STINGRAY          = 11;
35 float MONSTER_MAGE                      = 12;
36 float MONSTER_SPIDER            = 13;
37 float MONSTER_LAST                      = 14;
38
39 // id-string converters (TODO: remove these!)
40 string monster_id2string(float mnster)
41 {
42         switch(mnster)
43         {
44                 case MONSTER_ZOMBIE:    return "zombie";
45                 case MONSTER_BRUTE:     return "brute";
46                 case MONSTER_ANIMUS:    return "animus";
47                 case MONSTER_SHAMBLER:  return "shambler";
48                 case MONSTER_BRUISER:   return "bruiser";
49                 case MONSTER_WYVERN:    return "wyvern";
50                 case MONSTER_CERBERUS:  return "cerberus";
51                 case MONSTER_SLIME:     return "slime";
52                 case MONSTER_KNIGHT:    return "knight";
53                 case MONSTER_STINGRAY:  return "stingray";
54                 case MONSTER_MAGE:              return "mage";
55                 case MONSTER_SPIDER:    return "spider";
56                 default: return "";
57         }
58 }
59 float monster_string2id(string monster)
60 {
61         switch(monster)
62         {
63                 case "zombie":          return MONSTER_ZOMBIE;
64                 case "brute":           return MONSTER_BRUTE;
65                 case "animus":          return MONSTER_ANIMUS;
66                 case "shambler":        return MONSTER_SHAMBLER;
67                 case "bruiser":         return MONSTER_BRUISER;
68                 case "wyvern":          return MONSTER_WYVERN;
69                 case "cerberus":        return MONSTER_CERBERUS;
70                 case "slime":           return MONSTER_SLIME;
71                 case "knight":          return MONSTER_KNIGHT;
72                 case "stingray":        return MONSTER_STINGRAY;
73                 case "mage":            return MONSTER_MAGE;
74                 case "spider":          return MONSTER_SPIDER;
75                 default:                        return 0;
76         }
77 }
78
79 float MSF_UPDATE       = 2;
80 float MSF_STATUS       = 4;
81 float MSF_SETUP        = 8;
82 float MSF_ANG          = 16;
83 float MSF_MOVE         = 32;
84 .float anim_start_time;
85 float MSF_ANIM         = 64;
86 float MSF_SIZE             = 128;
87
88 float MSF_FULL_UPDATE  = 16777215;
89
90 #endif // CSQC/SVQC