BGE: fix crash and return boolean on scene.replace()

Scene replacement with invalid scene name was crashing blender,
now it's a no-op.
KS_Scene.replace() to return a boolean to indicate if the scene
is valid and is scheduled for replacement. This allows more
robust game management.
This commit is contained in:
Benoit Bolsee
2014-08-23 12:31:32 +02:00
parent a0600debda
commit fb49c5aa56
4 changed files with 32 additions and 11 deletions

View File

@@ -152,6 +152,8 @@ base class --- :class:`PyObjectPlus`
:arg scene: The name of the scene to replace this scene with.
:type scene: string
:return: True if the scene exists and was scheduled for addition, False otherwise.
:rtype: boolean
.. method:: suspend()