feat: WaypointReached notification for MovementAI and don't move the AI when its not built (#1844)

This commit is contained in:
David Markowitz
2025-07-12 22:21:45 -07:00
committed by GitHub
parent 5ec4142ca1
commit 49aa632d42
3 changed files with 26 additions and 4 deletions

View File

@@ -300,6 +300,12 @@ namespace GeneralUtils {
return T();
}
template<typename Container>
inline Container::value_type GetRandomElement(const Container& container) {
DluAssert(!container.empty());
return container[GenerateRandomNumber<typename Container::value_type>(0, container.size() - 1)];
}
/**
* Casts the value of an enum entry to its underlying type
* @param entry Enum entry to cast