Easier handling of skill levels by using defines instead of numbers

This commit is contained in:
NeonKnightOA 2020-01-22 13:29:37 -03:00
parent 843f8e504b
commit f0c3f764ee
29 changed files with 71 additions and 65 deletions

View file

@ -733,7 +733,7 @@ M_CheckAttack(edict_t *self)
if (enemy_range == RANGE_MELEE) if (enemy_range == RANGE_MELEE)
{ {
/* don't always melee in easy mode */ /* don't always melee in easy mode */
if ((skill->value == 0) && (rand() & 3)) if ((skill->value == SKILL_EASY) && (rand() & 3))
{ {
return false; return false;
} }
@ -783,11 +783,11 @@ M_CheckAttack(edict_t *self)
return false; return false;
} }
if (skill->value == 0) if (skill->value == SKILL_EASY)
{ {
chance *= 0.5; chance *= 0.5;
} }
else if (skill->value >= 2) else if (skill->value >= SKILL_HARD)
{ {
chance *= 2; chance *= 2;
} }

View file

@ -531,7 +531,7 @@ T_Damage(edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t dir,
meansOfDeath = mod; meansOfDeath = mod;
/* easy mode takes half damage */ /* easy mode takes half damage */
if ((skill->value == 0) && (deathmatch->value == 0) && targ->client) if ((skill->value == SKILL_EASY) && (deathmatch->value == 0) && targ->client)
{ {
damage *= 0.5; damage *= 0.5;
@ -676,7 +676,7 @@ T_Damage(edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t dir,
targ->pain(targ, attacker, knockback, take); targ->pain(targ, attacker, knockback, take);
/* nightmare mode monsters don't go into pain frames often */ /* nightmare mode monsters don't go into pain frames often */
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
targ->pain_debounce_time = level.time + 5; targ->pain_debounce_time = level.time + 5;
} }

View file

@ -186,8 +186,8 @@ Pickup_Powerup(edict_t *ent, edict_t *other)
quantity = other->client->pers.inventory[ITEM_INDEX(ent->item)]; quantity = other->client->pers.inventory[ITEM_INDEX(ent->item)];
if (((skill->value == 1) && if (((skill->value == SKILL_MEDIUM) &&
(quantity >= 2)) || ((skill->value >= 2) && (quantity >= 1))) (quantity >= 2)) || ((skill->value >= SKILL_HARD) && (quantity >= 1)))
{ {
return false; return false;
} }

View file

@ -720,12 +720,12 @@ SpawnEntities(const char *mapname, char *entities, const char *spawnpoint)
else else
{ {
if (Spawn_CheckCoop_MapHacks(ent) || ( if (Spawn_CheckCoop_MapHacks(ent) || (
((skill->value == 0) && ((skill->value == SKILL_EASY) &&
(ent->spawnflags & SPAWNFLAG_NOT_EASY)) || (ent->spawnflags & SPAWNFLAG_NOT_EASY)) ||
((skill->value == 1) && ((skill->value == SKILL_MEDIUM) &&
(ent->spawnflags & SPAWNFLAG_NOT_MEDIUM)) || (ent->spawnflags & SPAWNFLAG_NOT_MEDIUM)) ||
(((skill->value == 2) || (((skill->value == SKILL_HARD) ||
(skill->value == 3)) && (skill->value == SKILL_HARDPLUS)) &&
(ent->spawnflags & SPAWNFLAG_NOT_HARD))) (ent->spawnflags & SPAWNFLAG_NOT_HARD)))
) )
{ {

View file

@ -28,7 +28,7 @@ check_dodge(edict_t *self, vec3_t start, vec3_t dir, int speed)
} }
/* easy mode only ducks one quarter the time */ /* easy mode only ducks one quarter the time */
if (skill->value == 0) if (skill->value == SKILL_EASY)
{ {
if (random() > 0.25) if (random() > 0.25)
{ {

View file

@ -479,6 +479,12 @@ extern int gibsthisframe;
#define MOD_TRAP 39 #define MOD_TRAP 39
#define MOD_FRIENDLY_FIRE 0x8000000 #define MOD_FRIENDLY_FIRE 0x8000000
/* Easier handling of AI skill levels */
#define SKILL_EASY 0
#define SKILL_MEDIUM 1
#define SKILL_HARD 2
#define SKILL_HARDPLUS 3
extern int meansOfDeath; extern int meansOfDeath;
extern edict_t *g_edicts; extern edict_t *g_edicts;

View file

@ -382,7 +382,7 @@ berserk_pain(edict_t *self, edict_t *other /* unsued */,
self->pain_debounce_time = level.time + 3; self->pain_debounce_time = level.time + 3;
gi.sound(self, CHAN_VOICE, sound_pain, 1, ATTN_NORM, 0); gi.sound(self, CHAN_VOICE, sound_pain, 1, ATTN_NORM, 0);
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }

View file

@ -581,7 +581,7 @@ jorg_pain(edict_t *self, edict_t *other /* unused */,
self->pain_debounce_time = level.time + 3; self->pain_debounce_time = level.time + 3;
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }

View file

@ -720,7 +720,7 @@ makron_pain(edict_t *self, edict_t *other /* unused */,
self->pain_debounce_time = level.time + 3; self->pain_debounce_time = level.time + 3;
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }

View file

@ -575,7 +575,7 @@ boss5_pain(edict_t *self, edict_t *other /* unused */,
} }
/* Don't go into pain if he's firing his rockets */ /* Don't go into pain if he's firing his rockets */
if (skill->value >= 2) if (skill->value >= SKILL_HARD)
{ {
if ((self->s.frame >= FRAME_attak2_1) && if ((self->s.frame >= FRAME_attak2_1) &&
(self->s.frame <= FRAME_attak2_14)) (self->s.frame <= FRAME_attak2_14))

View file

@ -526,7 +526,7 @@ brain_tentacle_attack(edict_t *self)
VectorSet(aim, MELEE_DISTANCE, 0, 8); VectorSet(aim, MELEE_DISTANCE, 0, 8);
if (fire_hit(self, aim, (10 + (rand() % 5)), -600) && (skill->value > 0)) if (fire_hit(self, aim, (10 + (rand() % 5)), -600) && (skill->value > SKILL_EASY))
{ {
self->spawnflags |= 65536; self->spawnflags |= 65536;
} }
@ -952,7 +952,7 @@ brain_pain(edict_t *self, edict_t *other /* unused */,
self->pain_debounce_time = level.time + 3; self->pain_debounce_time = level.time + 3;
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }

View file

@ -355,7 +355,7 @@ chick_pain(edict_t *self, edict_t *other /* unused */,
gi.sound(self, CHAN_VOICE, sound_pain3, 1, ATTN_NORM, 0); gi.sound(self, CHAN_VOICE, sound_pain3, 1, ATTN_NORM, 0);
} }
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }

View file

@ -307,7 +307,7 @@ flipper_pain(edict_t *self, edict_t *other /* unused */,
self->pain_debounce_time = level.time + 3; self->pain_debounce_time = level.time + 3;
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }

View file

@ -701,7 +701,7 @@ floater_pain(edict_t *self, edict_t *other /* unused */,
self->pain_debounce_time = level.time + 3; self->pain_debounce_time = level.time + 3;
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }

View file

@ -734,7 +734,7 @@ flyer_pain(edict_t *self, edict_t *other /* unused */,
self->pain_debounce_time = level.time + 3; self->pain_debounce_time = level.time + 3;
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }

View file

@ -1806,7 +1806,7 @@ gekk_dodge(edict_t *self, edict_t *attacker, float eta)
return; return;
} }
if (skill->value == 0) if (skill->value == SKILL_EASY)
{ {
r = random(); r = random();
@ -1825,7 +1825,7 @@ gekk_dodge(edict_t *self, edict_t *attacker, float eta)
self->monsterinfo.pausetime = level.time + eta + 0.3; self->monsterinfo.pausetime = level.time + eta + 0.3;
r = random(); r = random();
if (skill->value == 1) if (skill->value == SKILL_MEDIUM)
{ {
if (r > 0.33) if (r > 0.33)
{ {
@ -1857,7 +1857,7 @@ gekk_dodge(edict_t *self, edict_t *attacker, float eta)
return; return;
} }
if (skill->value == 2) if (skill->value == SKILL_HARD)
{ {
if (r > 0.66) if (r > 0.66)
{ {

View file

@ -253,7 +253,7 @@ gladbGun_check(edict_t *self)
return; return;
} }
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
gladbGun(self); gladbGun(self);
} }

View file

@ -360,7 +360,7 @@ gladiator_pain(edict_t *self, edict_t *other /* unused */,
gi.sound(self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0); gi.sound(self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
} }
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }

View file

@ -379,7 +379,7 @@ gunner_pain(edict_t *self, edict_t *other /* unused */,
gi.sound(self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0); gi.sound(self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
} }
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }
@ -494,7 +494,7 @@ gunner_duck_down(edict_t *self)
self->monsterinfo.aiflags |= AI_DUCKED; self->monsterinfo.aiflags |= AI_DUCKED;
if (skill->value >= 2) if (skill->value >= SKILL_HARD)
{ {
if (random() > 0.5) if (random() > 0.5)
{ {

View file

@ -630,7 +630,7 @@ hover_pain(edict_t *self, edict_t *other /* unused */,
self->pain_debounce_time = level.time + 3; self->pain_debounce_time = level.time + 3;
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }

View file

@ -269,7 +269,7 @@ infantry_pain(edict_t *self, edict_t *other /* unused */,
self->pain_debounce_time = level.time + 3; self->pain_debounce_time = level.time + 3;
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }

View file

@ -662,7 +662,7 @@ insane_pain(edict_t *self, edict_t *other /* unused */,
/* suppress screaming and moaning for 1 second so pain sound plays */ /* suppress screaming and moaning for 1 second so pain sound plays */
self->fly_sound_debounce_time = level.time + 1; self->fly_sound_debounce_time = level.time + 1;
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }

View file

@ -407,7 +407,7 @@ medic_pain(edict_t *self, edict_t *other /* unused */,
self->pain_debounce_time = level.time + 3; self->pain_debounce_time = level.time + 3;
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }

View file

@ -358,7 +358,7 @@ mutant_check_refire(edict_t *self)
return; return;
} }
if (((skill->value == 3) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE)) if (((skill->value == SKILL_HARDPLUS) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE))
{ {
self->monsterinfo.nextframe = FRAME_attack09; self->monsterinfo.nextframe = FRAME_attack09;
} }
@ -674,7 +674,7 @@ mutant_pain(edict_t *self, edict_t *other /* unused */,
self->pain_debounce_time = level.time + 3; self->pain_debounce_time = level.time + 3;
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }

View file

@ -422,7 +422,7 @@ parasite_pain(edict_t *self, edict_t *other /* unused */,
self->pain_debounce_time = level.time + 3; self->pain_debounce_time = level.time + 3;
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }

View file

@ -463,7 +463,7 @@ soldier_pain(edict_t *self, edict_t *other /* unused */,
return; return;
} }
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }
@ -631,7 +631,7 @@ soldier_attack1_refire1(edict_t *self)
return; return;
} }
if (((skill->value == 3) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE)) if (((skill->value == SKILL_HARDPLUS) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE))
{ {
self->monsterinfo.nextframe = FRAME_attak102; self->monsterinfo.nextframe = FRAME_attak102;
} }
@ -659,7 +659,7 @@ soldier_attack1_refire2(edict_t *self)
return; return;
} }
if (((skill->value == 3) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE)) if (((skill->value == SKILL_HARDPLUS) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE))
{ {
self->monsterinfo.nextframe = FRAME_attak102; self->monsterinfo.nextframe = FRAME_attak102;
} }
@ -716,7 +716,7 @@ soldier_attack2_refire1(edict_t *self)
return; return;
} }
if (((skill->value == 3) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE)) if (((skill->value == SKILL_HARDPLUS) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE))
{ {
self->monsterinfo.nextframe = FRAME_attak204; self->monsterinfo.nextframe = FRAME_attak204;
} }
@ -744,7 +744,7 @@ soldier_attack2_refire2(edict_t *self)
return; return;
} }
if (((skill->value == 3) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE)) if (((skill->value == SKILL_HARDPLUS) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE))
{ {
self->monsterinfo.nextframe = FRAME_attak204; self->monsterinfo.nextframe = FRAME_attak204;
} }
@ -913,7 +913,7 @@ soldier_attack6_refire(edict_t *self)
return; return;
} }
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
self->monsterinfo.nextframe = FRAME_runs03; self->monsterinfo.nextframe = FRAME_runs03;
} }
@ -985,7 +985,7 @@ soldier_sight(edict_t *self, edict_t *other /* unused */)
gi.sound(self, CHAN_VOICE, sound_sight2, 1, ATTN_NORM, 0); gi.sound(self, CHAN_VOICE, sound_sight2, 1, ATTN_NORM, 0);
} }
if ((skill->value > 0) && (range(self, self->enemy) >= RANGE_MID)) if ((skill->value > SKILL_EASY) && (range(self, self->enemy) >= RANGE_MID))
{ {
if (random() > 0.5) if (random() > 0.5)
{ {
@ -1050,7 +1050,7 @@ soldier_dodge(edict_t *self, edict_t *attacker, float eta)
FoundTarget(self); FoundTarget(self);
} }
if (skill->value == 0) if (skill->value == SKILL_EASY)
{ {
self->monsterinfo.currentmove = &soldier_move_duck; self->monsterinfo.currentmove = &soldier_move_duck;
return; return;
@ -1059,7 +1059,7 @@ soldier_dodge(edict_t *self, edict_t *attacker, float eta)
self->monsterinfo.pausetime = level.time + eta + 0.3; self->monsterinfo.pausetime = level.time + eta + 0.3;
r = random(); r = random();
if (skill->value == 1) if (skill->value == SKILL_MEDIUM)
{ {
if (r > 0.33) if (r > 0.33)
{ {
@ -1073,7 +1073,7 @@ soldier_dodge(edict_t *self, edict_t *attacker, float eta)
return; return;
} }
if (skill->value >= 2) if (skill->value >= SKILL_HARD)
{ {
if (r > 0.66) if (r > 0.66)
{ {
@ -2049,7 +2049,7 @@ soldierh_pain(edict_t *self, edict_t *other /* unused */,
return; return;
} }
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }
@ -2281,7 +2281,7 @@ soldierh_attack1_refire1(edict_t *self)
return; return;
} }
if (((skill->value == 3) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE)) if (((skill->value == SKILL_HARDPLUS) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE))
{ {
self->monsterinfo.nextframe = FRAME_attak102; self->monsterinfo.nextframe = FRAME_attak102;
} }
@ -2309,7 +2309,7 @@ soldierh_attack1_refire2(edict_t *self)
return; return;
} }
if (((skill->value == 3) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE)) if (((skill->value == SKILL_HARDPLUS) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE))
{ {
self->monsterinfo.nextframe = FRAME_attak102; self->monsterinfo.nextframe = FRAME_attak102;
} }
@ -2431,7 +2431,7 @@ soldierh_attack2_refire1(edict_t *self)
return; return;
} }
if (((skill->value == 3) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE)) if (((skill->value == SKILL_HARDPLUS) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE))
{ {
self->monsterinfo.nextframe = FRAME_attak204; self->monsterinfo.nextframe = FRAME_attak204;
} }
@ -2459,7 +2459,7 @@ soldierh_attack2_refire2(edict_t *self)
return; return;
} }
if (((skill->value == 3) && if (((skill->value == SKILL_HARDPLUS) &&
(random() < 0.5)) || (random() < 0.5)) ||
((range(self, self->enemy) == RANGE_MELEE) && (self->s.skinnum < 4))) ((range(self, self->enemy) == RANGE_MELEE) && (self->s.skinnum < 4)))
{ {
@ -2630,7 +2630,7 @@ soldierh_attack6_refire(edict_t *self)
return; return;
} }
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
self->monsterinfo.nextframe = FRAME_runs03; self->monsterinfo.nextframe = FRAME_runs03;
} }
@ -2702,7 +2702,7 @@ soldierh_sight(edict_t *self, edict_t *other /* unused */)
gi.sound(self, CHAN_VOICE, sound_sight2, 1, ATTN_NORM, 0); gi.sound(self, CHAN_VOICE, sound_sight2, 1, ATTN_NORM, 0);
} }
if ((skill->value > 0) && (range(self, self->enemy) >= RANGE_MID)) if ((skill->value > SKILL_EASY) && (range(self, self->enemy) >= RANGE_MID))
{ {
if (random() > 0.5) if (random() > 0.5)
{ {
@ -2773,7 +2773,7 @@ soldierh_dodge(edict_t *self, edict_t *attacker, float eta)
self->enemy = attacker; self->enemy = attacker;
} }
if (skill->value == 0) if (skill->value == SKILL_EASY)
{ {
self->monsterinfo.currentmove = &soldierh_move_duck; self->monsterinfo.currentmove = &soldierh_move_duck;
return; return;
@ -2782,7 +2782,7 @@ soldierh_dodge(edict_t *self, edict_t *attacker, float eta)
self->monsterinfo.pausetime = level.time + eta + 0.3; self->monsterinfo.pausetime = level.time + eta + 0.3;
r = random(); r = random();
if (skill->value == 1) if (skill->value == SKILL_MEDIUM)
{ {
if (r > 0.33) if (r > 0.33)
{ {
@ -2796,7 +2796,7 @@ soldierh_dodge(edict_t *self, edict_t *attacker, float eta)
return; return;
} }
if (skill->value >= 2) if (skill->value >= SKILL_HARD)
{ {
if (r > 0.66) if (r > 0.66)
{ {

View file

@ -574,7 +574,7 @@ supertank_pain(edict_t *self, edict_t *other /* unused */,
} }
/* Don't go into pain if he's firing his rockets */ /* Don't go into pain if he's firing his rockets */
if (skill->value >= 2) if (skill->value >= SKILL_HARD)
{ {
if ((self->s.frame >= FRAME_attak2_1) && if ((self->s.frame >= FRAME_attak2_1) &&
(self->s.frame <= FRAME_attak2_14)) (self->s.frame <= FRAME_attak2_14))
@ -585,7 +585,7 @@ supertank_pain(edict_t *self, edict_t *other /* unused */,
self->pain_debounce_time = level.time + 3; self->pain_debounce_time = level.time + 3;
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }

View file

@ -372,7 +372,7 @@ tank_pain(edict_t *self, edict_t *other /* other */,
} }
/* If hard or nightmare, don't go into pain while attacking */ /* If hard or nightmare, don't go into pain while attacking */
if (skill->value >= 2) if (skill->value >= SKILL_HARD)
{ {
if ((self->s.frame >= FRAME_attak301) && if ((self->s.frame >= FRAME_attak301) &&
(self->s.frame <= FRAME_attak330)) (self->s.frame <= FRAME_attak330))
@ -390,7 +390,7 @@ tank_pain(edict_t *self, edict_t *other /* other */,
self->pain_debounce_time = level.time + 3; self->pain_debounce_time = level.time + 3;
gi.sound(self, CHAN_VOICE, sound_pain, 1, ATTN_NORM, 0); gi.sound(self, CHAN_VOICE, sound_pain, 1, ATTN_NORM, 0);
if (skill->value == 3) if (skill->value == SKILL_HARDPLUS)
{ {
return; /* no pain anims in nightmare */ return; /* no pain anims in nightmare */
} }
@ -613,7 +613,7 @@ tank_reattack_blaster(edict_t *self)
return; return;
} }
if (skill->value >= 2) if (skill->value >= SKILL_HARD)
{ {
if (visible(self, self->enemy)) if (visible(self, self->enemy))
{ {
@ -821,7 +821,7 @@ tank_refire_rocket(edict_t *self)
} }
/* Only on hard or nightmare */ /* Only on hard or nightmare */
if (skill->value >= 2) if (skill->value >= SKILL_HARD)
{ {
if (self->enemy->health > 0) if (self->enemy->health > 0)
{ {

View file

@ -309,15 +309,15 @@ HelpComputerMessage(edict_t *ent)
return; return;
} }
if (skill->value == 0) if (skill->value == SKILL_EASY)
{ {
sk = "easy"; sk = "easy";
} }
else if (skill->value == 1) else if (skill->value == SKILL_MEDIUM)
{ {
sk = "medium"; sk = "medium";
} }
else if (skill->value == 2) else if (skill->value == SKILL_HARD)
{ {
sk = "hard"; sk = "hard";
} }