diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-12-10 08:59:54 +0100 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-12-10 08:59:54 +0100 |
commit | 7b3e1090f314e5ad669add8cabd9dd2cda790a0f (patch) | |
tree | 4de8096b10994c0fcd8c578ea516171764947f28 /src/crepe | |
parent | 4e7ddc9d8eb396f7160e09da8c9b3d797274600a (diff) |
Replaced xor
Diffstat (limited to 'src/crepe')
-rw-r--r-- | src/crepe/api/AI.h | 16 |
1 files changed, 4 insertions, 12 deletions
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) |