GetGameObjectType is overwritten in KX_FontObject to differentiate a font object into AddNodeReplicaObject function. Now, in this function, we add fonts in the appropriate list.
Details
- Reviewers
Campbell Barton (campbellbarton) Jorge Bernal (lordloki) Dalai Felinto (dfelinto) Mitchell Stokes (moguri) - Commits
- rBS176ecd9c9ca9: BGE : Fix for T43724 and T41599 addObject() with KX_FontObject and overlay scene
rB176ecd9c9ca9: BGE : Fix for T43724 and T41599 addObject() with KX_FontObject and overlay scene
Diff Detail
Event Timeline
Can you install arcanist and send the patch via 'arc diff'? Otherwise we can't see the context of the patch (i.e., to see more lines of the changed files before or after the changes)
| source/gameengine/Ketsji/KX_Scene.h | ||
|---|---|---|
| 143 ↗ | (On Diff #3588) | Fine by me, don't need to add those comments in the final patch though. |
I still didn't understand what's the point of this patch. Does it change anything for the final user?
| source/gameengine/Ketsji/KX_Scene.cpp | ||
|---|---|---|
| 535 | replace if by else if or even better, by a switch. | |
The patch just corrects crashes, because if we add font in overlay scene the font it's added in the scene which contains the logic controller, and yes it's change nothing for the final user.
The patch just corrects crashes, because if we add font in overlay scene the font it's added in the scene which contains the logic controller, and yes it's change nothing for the final user.
If it fixes a crash then it certainly helps the user ;) Do you have a sample file that reproduces the crash? Was it ever reported?
| source/gameengine/Ketsji/KX_FontObject.h | ||
|---|---|---|
| 73 | should be public? | |
Looks good to me.
Note: I checked both bugs and with these changes they are working now.