ID:138734
 
Code:
I have no code to show because i don't know what is or could be making this problem..


Problem description:
The problem is that all things, mobs and objects, that are normally dense seem to be treated as if they are not. i have set density = 1. still i can walk through people.

This happened after i tryed to mix alittle with the icon size of the .dmi files. so i made a 48x48 icon size .dmi and changed the pixel_x value of that icon to fit within the 32x32 that are normally dense.

after this, suddenly everything is as if it was set to density = 0. i've tryed removing the .dmi i made and the small change i did in the codesnippit ("src.pixel_x -= 7") which i believe should not cause these problems? and yet the problem prevails.

So any ideas on what has happened here? much appriciated.
Have you made any changes to the Enter() method for anything?
In response to Popisfizzy (#1)
That was excactly what i had done ! xD i just couldn't remember making any changes.

I had made it so that if they where in a specific state they should not be able to enter a certain turf. now if they weren't in that state, they should be able to enter it, but i still want it to follow the normal "rules" and standard procedures, as in not being able to enter if there is an dense object in the way. is there a good way of making this happen?

What i ended up doing for the water turf in my game, was using a for() loop to check if there already was something in there, which works fine(although it might not be a good way to do it) . however, when attempting to aply the same method for the grass turf, with the same snippit of code, it ends up not making me able to move at all. as in whatever the circumstance return 0 .

turf
water
Enter(mob/M)
if(istype(M,/mob))
if(M.npc)
return 0
else
for(var/obj/ship/b in locate(src.x,src.y,src.z))
if(b)
return 0
else
return 1

for(var/mob/c in locate(src.x,src.y,src.z))
if(c)
return 0
else
return 1

This is for the water, dunno if this is a good idea to do or a good way to do it.. but it does what i want it to do so.. xD any tips on better ways would be nice aswell. anyway.. for the grass it's the excact same thing, with the exception of /obj/ship/b being simply obj in general.

Edit: i guess i could skip the second loop and just make it check for both variables in a single loop?
In response to Jarquille (#2)
That's the problem. The check for the density variable is done in the default Enter() method. By overwriting it, you're keeping the check from happen. Where you have return 1, you should have return ..() so that the return value of the default Enter() method is returned.
In response to Popisfizzy (#3)
Thanks alot! ye i figured that was the problem.. just didn't know how to make it do the default stuff, i tryed

if(whatever)
..()
return 1

your suggestion makes all the more sense though! xD

so thanks again :)