Split monster goal coordinate out of mstrategy field
Instead of packing a coordinate into unsigned long, store the goal in a coord struct, making the code a bit cleaner. Monster struct is of course slightly bigger, but that should not really matter. No change in monster behaviour. Breaks saves and bones.
This commit is contained in:
@@ -1750,8 +1750,8 @@ m_move(struct monst *mtmp, int after)
|
||||
if (is_covetous(ptr)) { /* [should this include
|
||||
* '&& mtmp->mstrategy != STRAT_NONE'?] */
|
||||
int covetousattack;
|
||||
coordxy tx = STRAT_GOALX(mtmp->mstrategy),
|
||||
ty = STRAT_GOALY(mtmp->mstrategy);
|
||||
coordxy tx = mtmp->mgoal.x,
|
||||
ty = mtmp->mgoal.y;
|
||||
struct monst *intruder = isok(tx, ty) ? m_at(tx, ty) : NULL;
|
||||
/*
|
||||
* if there's a monster on the object or in possession of it,
|
||||
|
||||
Reference in New Issue
Block a user