mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
fix level accumulation
This commit is contained in:
parent
81a60735e8
commit
ca8f6d5c0f
@ -471,7 +471,8 @@ update_level_data(const PStatFrameData &frame_data) {
|
|||||||
int collector_index = (*gi).first;
|
int collector_index = (*gi).first;
|
||||||
float value = (*gi).second;
|
float value = (*gi).second;
|
||||||
|
|
||||||
// Walk up to the top.
|
// Walk up to the top, but stop when we find a parent with actual
|
||||||
|
// data.
|
||||||
while (collector_index != 0 && collector_index != _constraint) {
|
while (collector_index != 0 && collector_index != _constraint) {
|
||||||
const PStatCollectorDef &def =
|
const PStatCollectorDef &def =
|
||||||
_client_data->get_collector_def(collector_index);
|
_client_data->get_collector_def(collector_index);
|
||||||
@ -480,8 +481,8 @@ update_level_data(const PStatFrameData &frame_data) {
|
|||||||
if (pi != alone_values.end()) {
|
if (pi != alone_values.end()) {
|
||||||
// The parent has data; subtract it.
|
// The parent has data; subtract it.
|
||||||
(*pi).second -= value;
|
(*pi).second -= value;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
collector_index = parent_index;
|
collector_index = parent_index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user