From fd039b0945a35425eadf3bb575930f7a1079ec3c Mon Sep 17 00:00:00 2001 From: Sveinung Kvilhaugsvik Date: Fri, 12 Mar 2021 15:09:01 +0100 Subject: [PATCH 1/2] Rename get_tile_bonus(). The function get_tile_bonus() takes the primary player from the unit argument, not from the tile argument. Rename it to get_unit_vs_tile_bonus(). See osdn #41748 --- common/effects.c | 5 +++-- common/effects.h | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/common/effects.c b/common/effects.c index a2ee59d84c..2279e94e6b 100644 --- a/common/effects.c +++ b/common/effects.c @@ -920,8 +920,9 @@ int get_unit_bonus(const struct unit *punit, enum effect_type effect_type) /**********************************************************************//** Returns the effect bonus at a tile **************************************************************************/ -int get_tile_bonus(const struct tile *ptile, const struct unit *punit, - enum effect_type etype) +int get_unit_vs_tile_bonus(const struct tile *ptile, + const struct unit *punit, + enum effect_type etype) { struct player *pplayer = NULL; const struct unit_type *utype = NULL; diff --git a/common/effects.h b/common/effects.h index ad5e386357..70ca8b2740 100644 --- a/common/effects.h +++ b/common/effects.h @@ -422,8 +422,9 @@ int get_unittype_bonus(const struct player *pplayer, const struct unit_type *punittype, enum effect_type effect_type); int get_unit_bonus(const struct unit *punit, enum effect_type effect_type); -int get_tile_bonus(const struct tile *ptile, const struct unit *punit, - enum effect_type etype); +int get_unit_vs_tile_bonus(const struct tile *ptile, + const struct unit *punit, + enum effect_type etype); /* miscellaneous auxiliary effects functions */ struct effect_list *get_req_source_effects(struct universal *psource); -- 2.20.1