Compute radar range in one place, rad_range()
Before, a part was duplicated in radmap() and rad_map_set(), and another part in their callers.
This commit is contained in:
parent
e49cb13480
commit
e41762ca49
5 changed files with 36 additions and 28 deletions
|
@ -158,8 +158,7 @@ do_unit_move(struct emp_qelem *ulist, int *together,
|
|||
}
|
||||
if (type == EF_SHIP) {
|
||||
rad_map_set(player->cnum, leader->x, leader->y, leader->effic,
|
||||
(int)techfact(leader->tech,
|
||||
mchr[leader->type].m_vrnge));
|
||||
leader->tech, mchr[leader->type].m_vrnge);
|
||||
}
|
||||
if (cp == NULL || *cp == '\0')
|
||||
cp = &dirch[DIR_STOP];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue