aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api
diff options
context:
space:
mode:
authormax-001 <maxsmits21@kpnmail.nl>2024-12-10 08:59:54 +0100
committermax-001 <maxsmits21@kpnmail.nl>2024-12-10 08:59:54 +0100
commit7b3e1090f314e5ad669add8cabd9dd2cda790a0f (patch)
tree4de8096b10994c0fcd8c578ea516171764947f28 /src/crepe/api
parent4e7ddc9d8eb396f7160e09da8c9b3d797274600a (diff)
Replaced xor
Diffstat (limited to 'src/crepe/api')
-rw-r--r--src/crepe/api/AI.h16
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)