Tíquete #48211

give_shared_vision() tripled map_get_own_seen() call

: 2023-06-10 12:06 Última Atualização: 2023-10-01 05:49

Relator:
Dono:
Tipo:
Estado:
Fechado
Componente:
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Fixed
Arquivo:
2

Details

give_shared_vision() has

              V_RADIUS(map_get_own_seen(pplayer, ptile, V_MAIN),
                       map_get_own_seen(pplayer, ptile, V_INVIS),
                       map_get_own_seen(pplayer, ptile, V_SUBSURFACE));
That is, exactly same vision base is calculated three times. We recently fixed similar case in unittools.c, so functions supporting optimization already exist.

Ticket History (3/8 Histories)

2023-06-10 12:06 Updated by: cazfi
  • New Ticket "give_shared_vision() tripled map_get_own_seen() call" created
2023-09-25 06:26 Updated by: cazfi
  • Dono Update from (Nenhum) to cazfi
  • Resolução Update from Nenhum to Accepted
2023-09-25 07:37 Updated by: cazfi
  • Resolução Update from Accepted to Nenhum
Comentário

clang:

../../../src/server/maphand.c:1137:19: error: unused function 'map_get_own_seen' [-Werror,-Wunused-function]
static inline int map_get_own_seen(const struct player *pplayer,

2023-09-25 08:01 Updated by: cazfi
  • Resolução Update from Nenhum to Accepted
Comentário

Reply To cazfi

clang: {{{ ../../../src/server/maphand.c:1137:19: error: unused function 'map_get_own_seen' -Werror,-Wunused-function static inline int map_get_own_seen(const struct player *pplayer, }}}

Fixed in attached version

2023-10-01 05:49 Updated by: cazfi
  • Estado Update from Aberto to Fechado
  • Resolução Update from Accepted to Fixed

Editar

Please login to add comment to this ticket » Login