Add NPCClass enum

This commit is contained in:
Gent 2020-09-22 23:41:43 -04:00
parent c722044bf5
commit 6f05f0f2c8
2 changed files with 12 additions and 0 deletions

View File

@ -16,6 +16,14 @@ const float CN_EP_RANK_3 = 0.5f;
const float CN_EP_RANK_4 = 0.3f; const float CN_EP_RANK_4 = 0.3f;
const float CN_EP_RANK_5 = 0.29f; const float CN_EP_RANK_5 = 0.29f;
// NPC classes
enum NPCClass {
NPC_BASE = 0,
NPC_MOB = 1,
NPC_BUS = 2,
NPC_EGG = 3
};
// nano powers // nano powers
enum { enum {
EST_NONE = 0, EST_NONE = 0,

View File

@ -5,6 +5,7 @@
class BaseNPC { class BaseNPC {
public: public:
sNPCAppearanceData appearanceData; sNPCAppearanceData appearanceData;
NPCClass npcClass;
BaseNPC() {}; BaseNPC() {};
BaseNPC(int x, int y, int z, int type) { BaseNPC(int x, int y, int z, int type) {
@ -20,4 +21,7 @@ public:
// hopefully no collisions happen :eyes: // hopefully no collisions happen :eyes:
appearanceData.iNPC_ID = (int32_t)rand(); appearanceData.iNPC_ID = (int32_t)rand();
}; };
BaseNPC(int x, int y, int z, int type, NPCClass classType) : BaseNPC(x, y, z, type) {
npcClass = classType;
}
}; };