Files
mod-playerbots/code_format.sh
Keleborn ce51191e8f Fix. Leave group actions (#1774)
Fix for issue #1768 where the bot master was not getting reset. 
I also cleaned up leave group action to focus up function scope.
I moved the resets from #612 to the actual leaving function.

Disclosure: LLMs were NOT used in authoring this PR.

Test cases to consider for testers.
1. Master disbands group with random bots. Bots should go about their
business.
2. If you can dual box, create a raid where two real player both invite
random bots. One player leaves group, their bots should also leave.
(edge case, if a random bot that is supposed to leave the group becomes
leader they may disband the whole group.
2025-11-05 15:38:14 +01:00

18 lines
376 B
Bash

#!/bin/bash
CLANG_FORMAT_PATH=$(which clang-format)
if [ -z "$CLANG_FORMAT_PATH" ]; then
echo "clang-format not found."
exit 1
fi
PROJECT_ROOT=$(dirname "$0")
cpp_files=$(find $PROJECT_ROOT -name '*.cpp' -or -name '*.h' )
for file in $cpp_files; do
echo "Formatting $file"
$CLANG_FORMAT_PATH -i $file
done
echo "All .cpp or .h files have been formatted."