Fix set but not used warnings
This commit is contained in:
@@ -839,9 +839,6 @@ mdamagem(struct monst *magr, struct monst *mdef,
|
|||||||
struct attack *mattk, struct obj *mwep, int dieroll)
|
struct attack *mattk, struct obj *mwep, int dieroll)
|
||||||
{
|
{
|
||||||
struct permonst *pa = magr->data, *pd = mdef->data;
|
struct permonst *pa = magr->data, *pd = mdef->data;
|
||||||
int armpro;
|
|
||||||
/* this was moved downstream during a 2020 refactor */
|
|
||||||
/* boolean cancelled; */
|
|
||||||
struct mhitm_data mhm;
|
struct mhitm_data mhm;
|
||||||
mhm.damage = d((int) mattk->damn, (int) mattk->damd);
|
mhm.damage = d((int) mattk->damn, (int) mattk->damd);
|
||||||
mhm.hitflags = MM_MISS;
|
mhm.hitflags = MM_MISS;
|
||||||
@@ -877,10 +874,6 @@ mdamagem(struct monst *magr, struct monst *mdef,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* cancellation factor is the same as when attacking the hero */
|
|
||||||
armpro = magic_negation(mdef);
|
|
||||||
/* cancelled = magr->mcan || !(rn2(10) >= 3 * armpro); */
|
|
||||||
|
|
||||||
mhitm_adtyping(magr, mattk, mdef, &mhm);
|
mhitm_adtyping(magr, mattk, mdef, &mhm);
|
||||||
if (mhm.done)
|
if (mhm.done)
|
||||||
return mhm.hitflags;
|
return mhm.hitflags;
|
||||||
|
|||||||
-10
@@ -940,8 +940,6 @@ static int
|
|||||||
hitmu(register struct monst *mtmp, register struct attack *mattk)
|
hitmu(register struct monst *mtmp, register struct attack *mattk)
|
||||||
{
|
{
|
||||||
struct permonst *mdat = mtmp->data;
|
struct permonst *mdat = mtmp->data;
|
||||||
/* int uncancelled; */
|
|
||||||
int armpro;
|
|
||||||
struct permonst *olduasmon = g.youmonst.data;
|
struct permonst *olduasmon = g.youmonst.data;
|
||||||
int res;
|
int res;
|
||||||
struct mhitm_data mhm;
|
struct mhitm_data mhm;
|
||||||
@@ -981,14 +979,6 @@ hitmu(register struct monst *mtmp, register struct attack *mattk)
|
|||||||
if ((is_undead(mdat) || is_vampshifter(mtmp)) && midnight())
|
if ((is_undead(mdat) || is_vampshifter(mtmp)) && midnight())
|
||||||
mhm.damage += d((int) mattk->damn, (int) mattk->damd); /* extra damage */
|
mhm.damage += d((int) mattk->damn, (int) mattk->damd); /* extra damage */
|
||||||
|
|
||||||
/* Next a cancellation factor.
|
|
||||||
* Use uncancelled when cancellation factor takes into account certain
|
|
||||||
* armor's special magic protection. Otherwise just use !mtmp->mcan.
|
|
||||||
*/
|
|
||||||
armpro = magic_negation(&g.youmonst);
|
|
||||||
/* this was moved downstream during a 2020 refactor */
|
|
||||||
/* uncancelled = !mtmp->mcan && (rn2(10) >= 3 * armpro); */
|
|
||||||
|
|
||||||
mhitm_adtyping(mtmp, mattk, &g.youmonst, &mhm);
|
mhitm_adtyping(mtmp, mattk, &g.youmonst, &mhm);
|
||||||
if (mhm.done)
|
if (mhm.done)
|
||||||
return mhm.hitflags;
|
return mhm.hitflags;
|
||||||
|
|||||||
Reference in New Issue
Block a user