X-Git-Url: http://git.pond.sub.org/?p=empserver;a=blobdiff_plain;f=src%2Flib%2Fsubs%2Fmslsub.c;h=a25f28f68e44e83e5a4af4e94b50c17a83f99f21;hp=69b06a9541c734af1093f2576e76270e89c2c9a7;hb=0b46e31d60f5b60f4dfca7df60574264f6713a3b;hpb=b14f5276ab7274b9b6ebb04d48b31e9a0daa5dd2 diff --git a/src/lib/subs/mslsub.c b/src/lib/subs/mslsub.c index 69b06a954..a25f28f68 100644 --- a/src/lib/subs/mslsub.c +++ b/src/lib/subs/mslsub.c @@ -1,6 +1,6 @@ /* * Empire - A multi-player, client/server Internet based war game. - * Copyright (C) 1986-2015, Dave Pare, Jeff Bailey, Thomas Ruschak, + * Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak, * Ken Stevens, Steve McClure, Markus Armbruster * * Empire is free software: you can redistribute it and/or modify @@ -29,14 +29,13 @@ * Known contributors to this file: * Ken Stevens, 1995 * Steve McClure, 1996-2000 - * Markus Armbruster, 2004-2012 + * Markus Armbruster, 2004-2021 */ #include #include #include "chance.h" -#include "file.h" #include "misc.h" #include "nat.h" #include "news.h" @@ -114,7 +113,7 @@ msl_launch(struct plnstr *pp, int type, char *what, coord x, coord y, struct sctstr sect; int dam; - dam = pln_damage(pp, 'p', 0) / 2; + dam = pln_damage(pp, 'p', NULL) / 2; if (pp->pln_ship >= 0) { shipdamage(&ship, dam); putship(ship.shp_uid, &ship); @@ -164,7 +163,7 @@ msl_hit(struct plnstr *pp, int hardtarget, int type, } else { hitchance = pln_hitchance(pp, hardtarget, type); hit = pct_chance(hitchance); - mpr(pp->pln_own, "\t%d%% hitchance...%s\n", hitchance, + mpr(pp->pln_own, "\t%d%% hit chance...%s\n", hitchance, hit ? "HIT!" : "miss"); } @@ -258,7 +257,7 @@ msl_intercept(struct plnstr *msl, struct sctstr *sp, int sublaunch, pp = &ip->plane; if (pp->pln_own != sp->sct_own) continue; - if (mission_pln_equip(ip, NULL, 'i') < 0) { + if (mission_pln_equip(ip, NULL, 0) < 0) { emp_remque(qp); free(qp); continue; @@ -276,7 +275,7 @@ msl_intercept(struct plnstr *msl, struct sctstr *sp, int sublaunch, next = qp->q_forw; ip = (struct plist *)qp; pp = &ip->plane; - if (mission_pln_equip(ip, NULL, 'i') < 0) { + if (mission_pln_equip(ip, NULL, 0) < 0) { emp_remque(qp); free(qp); continue; @@ -366,7 +365,7 @@ msl_abm_intercept(struct plnstr *msl, coord x, coord y, int sublaunch) struct emp_qelem irvlist; getsect(x, y, §); - msl_sel(&irvlist, x, y, msl->pln_own, P_N, P_O, 0); + msl_sel(&irvlist, x, y, msl->pln_own, P_N, 0, 0); return msl_intercept(msl, §, sublaunch, &irvlist, "warhead", "abm", sublaunch ? N_NUKE_SSTOP : N_NUKE_STOP);