diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/homunculus.c (renamed from src/map/mercenary.c) | 10 | ||||
-rw-r--r-- | src/map/homunculus.h (renamed from src/map/mercenary.h) | 9 |
2 files changed, 8 insertions, 11 deletions
diff --git a/src/map/mercenary.c b/src/map/homunculus.c index c56c36cdb..02177552e 100644 --- a/src/map/mercenary.c +++ b/src/map/homunculus.c @@ -30,7 +30,7 @@ #include "trade.h" #include "unit.h" -#include "mercenary.h" +#include "homunculus.h" #include <stdio.h> #include <stdlib.h> @@ -625,11 +625,9 @@ int merc_hom_alloc(struct map_session_data *sd, struct s_homunculus *hom) hd->bl.m = sd->bl.m; hd->bl.x = sd->bl.x; hd->bl.y = sd->bl.y; - x = sd->bl.x + 1; - y = sd->bl.y + 1; - map_random_dir(&hd->bl, &x, &y); - hd->bl.x = x; - hd->bl.y = y; + unit_calc_pos(&hd->bl, sd->bl.x, sd->bl.y, sd->ud.dir); + hd->bl.x = hd->ud.to_x; + hd->bl.y = hd->ud.to_y; map_addiddb(&hd->bl); status_calc_homunculus(hd,1); diff --git a/src/map/mercenary.h b/src/map/homunculus.h index 88692b4d1..d4946da3c 100644 --- a/src/map/mercenary.h +++ b/src/map/homunculus.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _MERCENARY_H_ -#define _MERCENARY_H_ +#ifndef _HOMUNCULUS_H_ +#define _HOMUNCULUS_H_ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data @@ -30,7 +30,6 @@ enum { SP_HUNGRY = 0x200 }; - struct homun_data { struct block_list bl; struct unit_data ud; @@ -39,7 +38,7 @@ struct homun_data { struct status_change sc; struct regen_data regen; struct s_homunculus_db *homunculusDB; //[orn] - struct s_homunculus homunculus ; //[orn] + struct s_homunculus homunculus; //[orn] struct map_session_data *master; //pointer back to its master int hungry_timer; //[orn] @@ -87,4 +86,4 @@ void merc_hom_init_timers(struct homun_data * hd); void merc_skill_reload(void); void merc_reload(void); -#endif /* _MERCENARY_H_ */ +#endif /* _HOMUNCULUS_H_ */ |