Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Set Scene actuator broken #819

Closed
youle31 opened this issue Sep 1, 2018 · 2 comments
Closed

Bug: Set Scene actuator broken #819

youle31 opened this issue Sep 1, 2018 · 2 comments
Labels

Comments

@youle31
Copy link
Collaborator

youle31 commented Sep 1, 2018

test file: http://pasteall.org/blend/index.php?id=50267

press space to load scene 1

@youle31 youle31 added the bug label Sep 1, 2018
@youle31
Copy link
Collaborator Author

youle31 commented Sep 2, 2018

In KX_KetsjiEngine::ReplaceScheduledScenes line 1405, replacing:

m_scenes->SetValue(sce_idx, CM_AddRef(tmpscene));

with m_scenes->Add(CM_AddRef(tmpscene));

seems to fix the bug. m_scenes->SetValue(sce_idx, CM_AddRef(tmpscene)) gives an error:

assertblender
assertvs1

panzergame added a commit that referenced this issue Sep 2, 2018
The commit f62dca6 introduced a remove of the replaced
scene in the scene list, this call is unnecessary as
EXP_ListValue::SetValue is swapping the values.
The drawback of RemoveValue was to reduce the size of the
container by actually erasing the item.

This is fixed by not removing the scene but only replacing
its pointer.

Fix issue: #819.
@youle31
Copy link
Collaborator Author

youle31 commented Sep 2, 2018

fixed here 60b5dc4

@youle31 youle31 closed this as completed Sep 2, 2018
youle31 pushed a commit that referenced this issue May 26, 2019
The commit f62dca6 introduced a remove of the replaced
scene in the scene list, this call is unnecessary as
EXP_ListValue::SetValue is swapping the values.
The drawback of RemoveValue was to reduce the size of the
container by actually erasing the item.

This is fixed by not removing the scene but only replacing
its pointer.

Fix issue: #819.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant