Anonymous Login
2017-12-11 17:46 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001538OpenClonkEngine - Renderingpublic2017-08-20 14:09
ReporterMarky 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
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 http://bugs.openclonk.org/view.php?id=1458
TagsNo tags attached.
Attached Files

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

-Notes

~0004482

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.

~0004483

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.

~0004484

Marky (developer)

Last edited: 2016-01-07 18: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.

~0004485

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.

~0004486

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!
+Notes

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