more autopickup_exception
An optimization. Split the patterns into two chains, one for things you want "always picked up", and one for things you want "never picked up". That way, the entire exception list isn't being checked twice, once for each type of check. The check for things to "always pick up" only checks the chain at the AP_GRAB index, and the check for things to "never pick up" only checks the chain at the AP_LEAVE index. - Also modifies the toggle autopickup '@' message appropriately for the AUTOPICKUP_EXCEPTIONS build. (it just tacks on ", with some exceptions" if there are some)
This commit is contained in:
@@ -264,8 +264,10 @@ struct instance_flags {
|
||||
boolean clicklook; /* allow right-clicking for look */
|
||||
boolean obsolete; /* obsolete options can point at this, it isn't used */
|
||||
#ifdef AUTOPICKUP_EXCEPTIONS
|
||||
struct autopickup_exception *autopickup_exceptions;
|
||||
#endif /* AUTOPICKUP_EXCEPTIONS */
|
||||
struct autopickup_exception *autopickup_exceptions[2];
|
||||
#define AP_LEAVE 0
|
||||
#define AP_GRAB 1
|
||||
#endif
|
||||
#ifdef WIN32CON
|
||||
#define MAX_ALTKEYHANDLER 25
|
||||
char altkeyhandler[MAX_ALTKEYHANDLER];
|
||||
|
||||
Reference in New Issue
Block a user