Fix drawing the spawn slots in ESSEntityWorldSpawner3DArea's gizmo.

This commit is contained in:
Relintai 2025-04-14 18:16:13 +02:00
parent df9be4f17d
commit bdda27e116
2 changed files with 10 additions and 2 deletions

View File

@ -50,6 +50,8 @@ void ESSEntityWorldSpawner3DArea::set_spawn_area_extents(const Vector3 &p_extent
_spawn_area_extents = p_extents;
_spawn_slots_dirty = true;
update_gizmos();
}
int ESSEntityWorldSpawner3DArea::get_spawn_slot_count() const {
@ -59,6 +61,8 @@ void ESSEntityWorldSpawner3DArea::set_spawn_slot_count(const int p_spawn_slot_co
_spawn_slot_count = p_spawn_slot_count;
_spawn_slots_dirty = true;
update_gizmos();
}
float ESSEntityWorldSpawner3DArea::get_respawn_time_min() const {
@ -201,7 +205,11 @@ ESSEntityWorldSpawner3DArea::ESSEntityWorldSpawner3DArea() {
ESSEntityWorldSpawner3DArea::~ESSEntityWorldSpawner3DArea() {
}
Vector<Vector2> ESSEntityWorldSpawner3DArea::get_spawn_positions() const {
Vector<Vector2> ESSEntityWorldSpawner3DArea::get_spawn_positions() {
if (_spawn_slots_dirty) {
_recalculate_slots();
}
Vector<Vector2> pos;
for (int i = 0; i < _spawn_slots.size(); ++i) {

View File

@ -77,7 +77,7 @@ public:
~ESSEntityWorldSpawner3DArea();
// For the gizmo
Vector<Vector2> get_spawn_positions() const;
Vector<Vector2> get_spawn_positions();
protected:
bool _set(const StringName &p_name, const Variant &p_value);