mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-22 00:48:09 +01:00
Optimize AnimationTree::_process_graph()
Removes redundant lookups on HashMap.
This commit is contained in:
parent
257ad9dc68
commit
010b8ba73b
@ -947,14 +947,19 @@ void AnimationTree::_process_graph(float p_delta) {
|
||||
|
||||
NodePath path = a->track_get_path(i);
|
||||
|
||||
ERR_CONTINUE(!track_cache.has(path));
|
||||
TrackCache **track_pp = track_cache.getptr(path);
|
||||
ERR_CONTINUE(!track_pp);
|
||||
|
||||
TrackCache *track = track_cache[path];
|
||||
TrackCache *track = *track_pp;
|
||||
if (track->type != a->track_get_type(i)) {
|
||||
continue; //may happen should not
|
||||
}
|
||||
|
||||
track->root_motion = root_motion_track == path;
|
||||
|
||||
ERR_CONTINUE(!state.track_map.has(path));
|
||||
int blend_idx = state.track_map[path];
|
||||
int *blend_idx_p = state.track_map.getptr(path);
|
||||
ERR_CONTINUE(!blend_idx_p);
|
||||
int blend_idx = *blend_idx_p;
|
||||
|
||||
ERR_CONTINUE(blend_idx < 0 || blend_idx >= state.track_count);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user