From 7b3e1090f314e5ad669add8cabd9dd2cda790a0f Mon Sep 17 00:00:00 2001 From: max-001 Date: Tue, 10 Dec 2024 08:59:54 +0100 Subject: Replaced xor --- src/crepe/api/AI.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src/crepe/api') diff --git a/src/crepe/api/AI.h b/src/crepe/api/AI.h index de574cd..d48d9df 100644 --- a/src/crepe/api/AI.h +++ b/src/crepe/api/AI.h @@ -39,27 +39,19 @@ public: //! Turn on the seek behavior void seek_on() { flags |= SEEK; } //! Turn off the seek behavior - void seek_off() { - if (on(SEEK)) flags ^= SEEK; - } + void seek_off() { flags &= ~SEEK; } //! Turn on the flee behavior void flee_on() { flags |= FLEE; } //! Turn off the flee behavior - void flee_off() { - if (on(FLEE)) flags ^= FLEE; - } + void flee_off() { flags &= ~FLEE; } //! Turn on the arrive behavior void arrive_on() { flags |= ARRIVE; } //! Turn off the arrive behavior - void arrive_off() { - if (on(ARRIVE)) flags ^= ARRIVE; - } + void arrive_off() { flags &= ~ARRIVE; } //! Turn on the path follow behavior void path_follow_on() { flags |= PATH_FOLLOW; } //! Turn off the path follow behavior - void path_follow_off() { - if (on(PATH_FOLLOW)) flags ^= PATH_FOLLOW; - } + void path_follow_off() { flags &= ~PATH_FOLLOW; } /** * \brief Add a path node (for the path following behavior) -- cgit v1.2.3