thrownobj, kick[ed]obj (trunk only)

Rename ``kickobj'' to ``kickedobj'' so that the tense matches that
of ``thrownobj''.  Also, move their declarations to decl.h and their
definitions to decl.c since usage has spread from dokick.c/dothrow.c to
various files and is about to expand to another one.
This commit is contained in:
nethack.rankin
2011-01-16 01:29:18 +00:00
parent 3e28b6a164
commit 363163b0c3
8 changed files with 81 additions and 91 deletions

View File

@@ -26,9 +26,8 @@ static NEARDATA const char toss_objs[] =
static NEARDATA const char bullets[] =
{ ALLOW_COUNT, COIN_CLASS, ALL_CLASSES, GEM_CLASS, 0 };
struct obj *thrownobj = 0; /* tracks an object until it lands */
/* thrownobj (decl.c) tracks an object until it lands */
extern struct obj *kickobj; /* from dokick.c */
extern boolean notonhead; /* for long worms */
@@ -1265,7 +1264,7 @@ boolean maybe_wakeup;
int
thitmonst(mon, obj)
register struct monst *mon;
register struct obj *obj; /* thrownobj or kickobj or uwep */
register struct obj *obj; /* thrownobj or kickedobj or uwep */
{
register int tmp; /* Base chance to hit */
register int disttmp; /* distance modifier */
@@ -1273,7 +1272,7 @@ register struct obj *obj; /* thrownobj or kickobj or uwep */
boolean guaranteed_hit = (u.uswallow && mon == u.ustuck);
hmode = (obj == uwep) ? HMON_APPLIED :
(obj == kickobj) ? HMON_KICKED : HMON_THROWN;
(obj == kickedobj) ? HMON_KICKED : HMON_THROWN;
/* Differences from melee weapons:
*