diff options
Diffstat (limited to 'src/ft_find_item.c')
-rw-r--r-- | src/ft_find_item.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ft_find_item.c b/src/ft_find_item.c index 6d795c3..bf0f67a 100644 --- a/src/ft_find_item.c +++ b/src/ft_find_item.c @@ -68,12 +68,9 @@ static void if (ft_ischarset(FT_CHRST_WEAPONS, map_char)) { weap_id = 0; - if (map_char == '@') - weap_id = 1; - else if (map_char == '#') - weap_id = 2; - else if (map_char == 'x') - weap_id = 3; + weap_id = (map_char == '@') ? (1) : (weap_id); + weap_id = (map_char == '#') ? (2) : (weap_id); + weap_id = (map_char == 'x') ? (3) : (weap_id); cl->mlist.map[(uint64_t)pl->pos_y][(uint64_t)pl->pos_x] = '0'; if (weap_id != 3) { |