Fix potential rare var name conflict in BTCooldown

This commit is contained in:
Serhii Snitsaruk 2024-06-23 12:14:15 +02:00
parent 2356e6c967
commit a2dedabd77
No known key found for this signature in database
GPG Key ID: A965EF8799FFEC2D
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ String BTCooldown::_generate_name() {
void BTCooldown::_setup() {
if (cooldown_state_var == StringName()) {
cooldown_state_var = vformat("cooldown_%d", rand());
cooldown_state_var = vformat("cooldown_%d", get_instance_id());
}
get_blackboard()->set_var(cooldown_state_var, false);
if (start_cooled) {