mirror of
https://github.com/Relintai/entity_spell_system.git
synced 2025-05-11 22:42:10 +02:00
Fix warning at start.
This commit is contained in:
parent
d410497b71
commit
07d81d63a9
@ -88,7 +88,9 @@ void AuraData::set_caster(Entity *value) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_caster->is_inside_tree()) {
|
||||
_caster_path = _caster->get_path();
|
||||
}
|
||||
}
|
||||
|
||||
void AuraData::set_caster_bind(Node *value) {
|
||||
|
@ -148,8 +148,10 @@ void SpellCastInfo::from_dict(Node *owner, const Dictionary &dict) {
|
||||
ERR_FAIL_COND(!ObjectDB::instance_validate(owner));
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
|
||||
if (owner->is_inside_tree()) {
|
||||
_caster = Object::cast_to<Entity>(owner->get_node_or_null(dict.get("caster", "")));
|
||||
_target = Object::cast_to<Entity>(owner->get_node_or_null(dict.get("target", "")));
|
||||
}
|
||||
|
||||
_has_cast_time = dict.get("has_cast_time", true);
|
||||
_cast_time = dict.get("cast_time", 0);
|
||||
|
Loading…
Reference in New Issue
Block a user