diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index e5cef80d6..688fa94aa 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -2996,7 +2996,7 @@ static int32_t P_DoCounters(DukePlayer_t *p) case GAMETICSPERSEC*218: { p->holster_weapon = 0; - p->weapon_pos = 10; + p->weapon_pos = WEAPON_POS_RAISE; } break; } @@ -3109,7 +3109,7 @@ static int32_t P_DoCounters(DukePlayer_t *p) if (p->access_incs > 20) { p->access_incs = 0; - p->weapon_pos = 10; + p->weapon_pos = WEAPON_POS_RAISE; p->kickback_pic = 0; } } @@ -3240,11 +3240,11 @@ void P_ChangeWeapon(DukePlayer_t *p,int32_t weapon) if (p->weapon_pos == 0) p->weapon_pos = -1; - else p->weapon_pos = -9; + else p->weapon_pos = WEAPON_POS_LOWER; if (p->holster_weapon) { - p->weapon_pos = 10; + p->weapon_pos = WEAPON_POS_RAISE; p->holster_weapon = 0; p->last_weapon = -1; } @@ -3621,11 +3621,11 @@ static void P_ProcessWeapon(int32_t snum) case -9: if (p->last_weapon >= 0) { - p->weapon_pos = 10; + p->weapon_pos = WEAPON_POS_RAISE; p->last_weapon = -1; } else if (p->holster_weapon == 0) - p->weapon_pos = 10; + p->weapon_pos = WEAPON_POS_RAISE; break; case 0: break; @@ -3656,10 +3656,10 @@ static void P_ProcessWeapon(int32_t snum) p->weapon_pos = -1; P_DoQuote(QUOTE_WEAPON_LOWERED,p); } - else if (p->holster_weapon == 1 && p->weapon_pos == -9) + else if (p->holster_weapon == 1 && p->weapon_pos == WEAPON_POS_LOWER) { p->holster_weapon = 0; - p->weapon_pos = 10; + p->weapon_pos = WEAPON_POS_RAISE; P_DoQuote(QUOTE_WEAPON_RAISED,p); } } @@ -3736,10 +3736,10 @@ static void P_ProcessWeapon(int32_t snum) if (p->holster_weapon == 1) { - if (p->last_pissed_time <= (GAMETICSPERSEC*218) && p->weapon_pos == -9) + if (p->last_pissed_time <= (GAMETICSPERSEC*218) && p->weapon_pos == WEAPON_POS_LOWER) { p->holster_weapon = 0; - p->weapon_pos = 10; + p->weapon_pos = WEAPON_POS_RAISE; P_DoQuote(QUOTE_WEAPON_RAISED,p); } } @@ -3940,7 +3940,7 @@ static void P_ProcessWeapon(int32_t snum) else if ((*kb) > PWEAPON(snum, p->curr_weapon, TotalTime)) { (*kb) = 0; - p->weapon_pos = 10; + p->weapon_pos = WEAPON_POS_RAISE; if (PIPEBOMB_CONTROL(snum) == PIPEBOMB_REMOTE) { p->curr_weapon = HANDREMOTE_WEAPON; @@ -3991,7 +3991,7 @@ static void P_ProcessWeapon(int32_t snum) { (*kb) = 0; P_CheckWeapon(p); - p->weapon_pos = -9; + p->weapon_pos = WEAPON_POS_LOWER; } } else if (*kb >= PWEAPON(snum, p->curr_weapon, Reload)) diff --git a/polymer/eduke32/source/player.h b/polymer/eduke32/source/player.h index 8df591b4e..c356e3e22 100644 --- a/polymer/eduke32/source/player.h +++ b/polymer/eduke32/source/player.h @@ -39,6 +39,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define PIPEBOMB_REMOTE 0x00000001 #define PIPEBOMB_TIMER 0x00000002 +#define WEAPON_POS_LOWER -9 +#define WEAPON_POS_RAISE 10 +#define WEAPON_POS_START 6 + enum dukeinv_t { GET_STEROIDS, // 0 GET_SHIELD, diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 1305238a1..c2d72f7c0 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -842,7 +842,7 @@ void P_ResetStatus(int32_t snum) p->kickback_pic = PWEAPON(snum, p->curr_weapon, TotalTime); else p->kickback_pic = 0; - p->weapon_pos = 6; + p->weapon_pos = WEAPON_POS_START; p->walking_snd_toggle= 0; p->weapon_ang = 0; @@ -868,7 +868,7 @@ void P_ResetWeapons(int32_t snum) for (weapon = PISTOL_WEAPON; weapon < MAX_WEAPONS; weapon++) p->ammo_amount[weapon] = 0; - p->weapon_pos = 6; + p->weapon_pos = WEAPON_POS_START; p->curr_weapon = PISTOL_WEAPON; p->kickback_pic = PWEAPON(snum, p->curr_weapon, TotalTime); p->gotweapon = ((1<max_secret_rooms = 0; p->actors_killed = 0; p->max_actors_killed = 0; - p->lastrandomspot = 0; - p->weapon_pos = 6; + p->lastrandomspot = 0; + p->weapon_pos = WEAPON_POS_START; P_ResetTintFade(p); diff --git a/polymer/eduke32/source/sector.c b/polymer/eduke32/source/sector.c index 8945b5cac..7e47975ce 100644 --- a/polymer/eduke32/source/sector.c +++ b/polymer/eduke32/source/sector.c @@ -2699,7 +2699,7 @@ CHECKINV1: if ((int32_t)j != -1 && p->last_pissed_time <= (GAMETICSPERSEC*218) && p->show_empty_weapon == 0 /*&& p->kickback_pic == 0*/ && p->quick_kick == 0 && sprite[p->i].xrepeat > 32 && p->access_incs == 0 && p->knee_incs == 0) { - // if( ( p->weapon_pos == 0 || ( p->holster_weapon && p->weapon_pos == -9 ) )) + // if( ( p->weapon_pos == 0 || ( p->holster_weapon && p->weapon_pos == WEAPON_POS_LOWER ) )) { if (j == 10 || j == 11) { @@ -2811,7 +2811,7 @@ CHECKINV1: if (p->holster_weapon) { sb_snum |= BIT(SK_HOLSTER); - p->weapon_pos = -9; + p->weapon_pos = WEAPON_POS_LOWER; } else if ((int32_t)j >= 0 && (p->gotweapon & (1<curr_weapon != j) switch (j) @@ -2837,7 +2837,7 @@ CHECKINV1: { p->curr_weapon = j; p->last_weapon = -1; - p->weapon_pos = 10; + p->weapon_pos = WEAPON_POS_RAISE; } break; case HANDBOMB_WEAPON: