I've noticed that objects will occasionally be drawn with the wrong icon. In this image the pickax icon is incorrectly being drawn to represent an object.
The object is of type /obj/water. The icon var of that type is set to 'water.dmi' and is never changed at runtime. water.dmi doesn't have an icon state that's the pickax icon. I'm sure its icon_state is never changed at runtime because:
* the water object only exists for 5 ticks, then is deleted (its loc is set to null)
* it's created and no reference to it is kept
* there's no code that sets an object's icon_state to be the pickax
* there's no unnamed state that's the pickax icon (so it's not the case that the object's icon is being changed and the pickax image is defaulted to because its icon_state doesn't exist in the new icon)
I've also seen this happen in some other projects.
My best guess is that objects are being recycled and their properties are somehow not being updated. Maybe the internal bits that handle this are designed to do things 10 times per second and because of the increased framerate (I've only ever seen this happen in games that use lower-than-default values for world.tick_lag) there's a chance for a glitch to happen when objects get recycled. Or it could just be a problem on the client end. The client retains information even after an object ID has been recycled, so it's applying old information to a new object because the new object has an ID that was previously used.
The reason I suspect this is the case is because the pickax and water icons are used by objects that exist only as visual effects. They only exist for 5-10 ticks, then are deleted (their loc is set to null) so the game will accumulate a lot of these deleted objects. There are other objects used like this, but the pick ax and water objects are the most common, so if the glitch is rare, odds are it would occur this way.
Numbered Steps to Reproduce Problem:
I have no idea how to reproduce this.
Code Snippet (if applicable) to Reproduce Problem:
|
|
Expected Results:
Actual Results:
Does the problem occur:
Every time? Or how often?
In other games?
In other user accounts?
On other computers?
When does the problem NOT occur?
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
I first saw this problem a while ago. I forget exactly when, but a few months at least.
Workarounds:
if you use browse_rsc() in the current state this may make the issue more prominent especially if using the fix you found of using it twice.
EDIT:This may not be the issue but w/e I didn't read it all before replying due to the nature of the problem but if it has been going on a few months maybe there is another problem here, but it seems to me there should be no good reason this should ever happen.
If it was the first problem though it seems to me that due to increased tick lag its just easier to see the problem that always happens in every game because more data is sent all the time to update the client due to the increased tick lag.