#define to enum changes

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1077 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2005-06-06 22:08:51 +00:00
parent 7b0f0fb0e1
commit ffe7dc485b
4 changed files with 64 additions and 58 deletions

View file

@ -606,9 +606,11 @@ entity newmis;
#endif #endif
// weaponstate defines // weaponstate defines
#define WS_IDLE 0 enum {
#define WS_FIRING1 1 WS_IDLE,
#define WS_FIRING2 2 // used with nailgun WS_FIRING1,
WS_FIRING2 // used with nailgun
};
// unions // unions
// DO NOT MIX UNION TYPES LIKE I AM DOING // DO NOT MIX UNION TYPES LIKE I AM DOING
@ -799,4 +801,3 @@ float (entity e, float healamount, float ignore) T_Heal; // health function
float(entity targ, entity inflictor) CanDamage; float(entity targ, entity inflictor) CanDamage;

View file

@ -6,12 +6,15 @@
var float chan_no_phs_add = 0; var float chan_no_phs_add = 0;
INTEGER eng_support; INTEGER eng_support;
#define ENG_STOF 0x01
#define ENG_CVARSTRING 0x02 enumflags {
#define ENG_TEBUILTINS 0x04 ENG_STOF,
#define ENG_TEBLOOD 0x08 ENG_CVARSTRING,
#define ENG_EFRED 0x10 ENG_TEBUILTINS,
#define ENG_EFBLUE 0x20 ENG_TEBLOOD,
ENG_EFRED,
ENG_EFBLUE
};
// prototypes // prototypes
void() EFF_SetEffects; void() EFF_SetEffects;

View file

@ -1,30 +1,32 @@
// client death messages // client death messages
#define MOD_NONE 0 enum {
#define MOD_AXE 1 MOD_NONE,
#define MOD_SHOTGUN 2 MOD_AXE,
#define MOD_SUPERSHOTGUN 3 MOD_SHOTGUN,
#define MOD_SPIKE 4 MOD_SUPERSHOTGUN,
#define MOD_SUPERSPIKE 5 MOD_SPIKE,
#define MOD_GRENADE 6 MOD_SUPERSPIKE,
#define MOD_ROCKET 8 MOD_GRENADE,
#define MOD_ROCKETRADIUS 9 MOD_ROCKET,
#define MOD_SHAFT 10 MOD_ROCKETRADIUS,
#define MOD_SHAFTWATER 11 MOD_SHAFT,
#define MOD_SHAFTSLIME 12 MOD_SHAFTWATER,
#define MOD_SHAFTLAVA 13 MOD_SHAFTSLIME,
#define MOD_TELEFRAG 14 MOD_SHAFTLAVA,
#define MOD_TELEFRAGDEFLECT 15 MOD_TELEFRAG,
#define MOD_SQUISH 16 MOD_TELEFRAGDEFLECT,
#define MOD_DROWN 17 MOD_SQUISH,
#define MOD_SLIME 18 MOD_DROWN,
#define MOD_LAVA 19 MOD_SLIME,
#define MOD_EXPLOBOX 20 MOD_LAVA,
#define MOD_FALL 21 MOD_EXPLOBOX,
#define MOD_FIREBALL 22 MOD_FALL,
#define MOD_EXIT 23 MOD_FIREBALL,
#define MOD_LASER 24 MOD_EXIT,
#define MOD_SELFWATER 25 MOD_LASER,
#define MOD_HURT 26 MOD_SELFWATER,
MOD_HURT
};
void(string targ, INTEGER mod) SuicideMessage = void(string targ, INTEGER mod) SuicideMessage =
{ {

View file

@ -1,16 +1,17 @@
// Generic projectile spawning code (PRJ) --- // Generic projectile spawning code (PRJ) ---
// projectile effect enumerator
// projectile effect defines enum {
#define PE_NONE 0 PE_NONE,
#define PE_SPIKE 1 PE_SPIKE,
#define PE_SUPERSPIKE 2 PE_SUPERSPIKE,
#define PE_WIZSPIKE 3 PE_WIZSPIKE,
#define PE_KNIGHTSPIKE 4 PE_KNIGHTSPIKE,
#define PE_GUNSHOT 5 PE_GUNSHOT,
#define PE_EXPLOSION 6 PE_EXPLOSION,
#define PE_EXPLOSIONGROUND 7 PE_EXPLOSIONGROUND,
#define PE_LASER 8 PE_LASER
};
// functions used only by this QC file // functions used only by this QC file
float() _PRJ_Bounce = float() _PRJ_Bounce =
@ -181,4 +182,3 @@ void(entity parent, string modl, vector org, vector vel, INTEGER effect, INTEGER
setsize (newmis, VEC_ORIGIN, VEC_ORIGIN); setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);
setorigin (newmis, org); setorigin (newmis, org);
}; };