Externify trycall() and replace many docall() calls with it
trycall() is a short docall() wrapper that is a no-op if the item is already identified or the player has called the object type already. For some reason, many calls to docall() did those same exact checks beforehand. This commit eliminates that redundancy by converting those calls into trycall(), which is now made extern rather than local to do.c. No behavior should be changed by this commit; I've checked that none of the affected places could take a different code path now that the oc_name_known and oc_uname checks are removed.
This commit is contained in:
@@ -435,6 +435,7 @@ extern int dodrop(void);
|
||||
extern boolean boulder_hits_pool(struct obj *, int, int, boolean);
|
||||
extern boolean flooreffects(struct obj *, int, int, const char *);
|
||||
extern void doaltarobj(struct obj *);
|
||||
extern void trycall(struct obj *);
|
||||
extern boolean canletgo(struct obj *, const char *);
|
||||
extern void dropx(struct obj *);
|
||||
extern void dropy(struct obj *);
|
||||
|
||||
Reference in New Issue
Block a user