mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Un-support force_trivial parameter for LocalVector. Instead, users are reformatted to use resize_uninitialized to make it explicit that the resize does not initialize missing elements.
This commit is contained in:
parent
99f5a3d665
commit
37415530d7
5 changed files with 20 additions and 17 deletions
|
|
@ -769,7 +769,7 @@ private:
|
|||
|
||||
// for collision pairing,
|
||||
// maintain a list of all items moved etc on each frame / tick
|
||||
LocalVector<BVHHandle, uint32_t, true> changed_items;
|
||||
LocalVector<BVHHandle> changed_items;
|
||||
uint32_t _tick = 1; // Start from 1 so items with 0 indicate never updated.
|
||||
|
||||
class BVHLockedFunction {
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ void item_remove(BVHHandle p_handle) {
|
|||
|
||||
// swap back and decrement for fast unordered remove
|
||||
_active_refs[active_ref_id] = ref_id_moved_back;
|
||||
_active_refs.resize(_active_refs.size() - 1);
|
||||
_active_refs.resize_uninitialized(_active_refs.size() - 1);
|
||||
|
||||
// keep the moved active reference up to date
|
||||
_extra[ref_id_moved_back].active_ref_id = active_ref_id;
|
||||
|
|
|
|||
|
|
@ -172,13 +172,13 @@ PooledList<TLeaf, uint32_t, true> _leaves;
|
|||
// we can maintain an un-ordered list of which references are active,
|
||||
// in order to do a slow incremental optimize of the tree over each frame.
|
||||
// This will work best if dynamic objects and static objects are in a different tree.
|
||||
LocalVector<uint32_t, uint32_t, true> _active_refs;
|
||||
LocalVector<uint32_t> _active_refs;
|
||||
uint32_t _current_active_ref = 0;
|
||||
|
||||
// instead of translating directly to the userdata output,
|
||||
// we keep an intermediate list of hits as reference IDs, which can be used
|
||||
// for pairing collision detection
|
||||
LocalVector<uint32_t, uint32_t, true> _cull_hits;
|
||||
LocalVector<uint32_t> _cull_hits;
|
||||
|
||||
// We can now have a user definable number of trees.
|
||||
// This allows using e.g. a non-pairable and pairable tree,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue