View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0001995 | OpenClonk | Engine | public | 2018-02-11 17:48 | 2018-02-17 19:55 | ||||||||
Reporter | Clonkonaut | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||||
Status | new | Resolution | open | ||||||||||
Platform | PC | OS | Windows | OS Version | 10 | ||||||||
Product Version | |||||||||||||
Target Version | 9.0 | Fixed in Version | |||||||||||
Summary | 0001995: CreateObject() does not distinguish between objects and ids | ||||||||||||
Description | It is possible to pass an object for an id in CreateObject(). There is no warning or error message. The created object has the passed object as prototype and will horrible break the game as soon as the mother object gets destroyed. | ||||||||||||
Steps To Reproduce | Select any object and call CreateObject(this); | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files |
|
![]() |
|
Luchs (administrator) 2018-02-17 17:10 |
Should we disallow using objects in CreateObject()? Print a warning? Or remove child objects after the parent object is removed? Or change the child's prototype to the parent object's prototype? I wonder whether there is any useful application for this. |
Clonkonaut (developer) 2018-02-17 19:55 |
I would suggest disallowing it and print a warning (the standard warning when providing a value of a wrong data type). I don't see any feasible application. |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2018-02-11 17:48 | Clonkonaut | New Issue | |
2018-02-17 17:10 | Luchs | Note Added: 0006145 | |
2018-02-17 19:55 | Clonkonaut | Note Added: 0006146 |