Anonymous Login
2020-08-14 17:41 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001538OpenClonkEngine - Renderingpublic2017-08-20 12:09
Assigned To 
Product Version 
Target Version8.1Fixed in Version 
Summary0001538: SetGraphics(nil, Definition) does not work as expected with sprite graphics
DescriptionWhen calling the following script:

var dummy = CreateObject(Dummy);
dummy->SetShape(-5, -2, 10, 4);
dummy->SetGraphics(nil, GoldBar); // sprite graphics
dummy.Visibility = VIS_All;

the dummy object has no graphics. I expected that it would use the gold bar graphics. However, when calling

var dummy = CreateObject(Dummy);
dummy->SetShape(-4, -6, 8, 12);
dummy->SetGraphics(nil, Hammer); // mesh graphics
dummy.Visibility = VIS_All;

then the dummy object looks like a hammer. I found this when was creating a test scenario for
TagsNo tags attached.
Attached Files

related to 0001458new SetGraphics - GFXOV_MODE_Object does not superimpose all overlays 



Marky (developer)

Debugging is not easy at the moment, my debug build takes more than 20 minutes to load the objects definitions. Is this the case for others, too? I deleted all definitions except those that I want to test for now, let's see how long it takes then.


Marky (developer)

This could be caused by the fact that the Dummy object has no graphics file at all. Maybe Clonk-Karls recent fix did something to fix this, too. Will get the latest repository version now.


Marky (developer)

Last edited: 2016-01-07 17:06

View 3 revisions

This bug is indeed limited to objects that do not have a Graphics.png or mesh graphics file in their base directory.

Update: I cannot really explain why, though. The object gets the correct graphics in the code.
Update: The shape was not updated in this call, but forcing the shape update does not improve the situation either.


Marky (developer)

I will commit my test scenario now, another problem was setting the graphics of Goal_DeathMatch and Goal_Wealth, these produce empty pictures for some reason.
I replaced them with other graphics so the scenario makes more sense, but maybe someone else can fix it.


Marky (developer)

Ok, another thing that I found out is: Not the current shape of the object is used to draw the object, but the shape of its definition. This explains a lot!

-Issue History
Date Modified Username Field Change
2016-01-07 11:02 Marky New Issue
2016-01-07 11:02 Marky Relationship added related to 0001458
2016-01-07 14:57 Marky Note Added: 0004482
2016-01-07 15:24 Marky Note Added: 0004483
2016-01-07 16:12 Marky Note Added: 0004484
2016-01-07 16:52 Marky Note Edited: 0004484 View Revisions
2016-01-07 17:06 Marky Note Edited: 0004484 View Revisions
2016-01-07 17:42 Marky Note Added: 0004485
2016-01-07 17:57 Marky Note Added: 0004486
2017-08-05 13:58 Maikel Target Version => 8.0
2017-08-20 12:09 Zapper Target Version 8.0 => 8.1
+Issue History