mob
proc
Fall()
if(src.doublefall == 1)
return
flick("fallstart",src)
bound_x = 15
bound_width = 19
bound_height = 42
fall
if(src.fallstopper == 1||src.newgravity == 1)
src.doublefall = 0
return
var/mobdense = 0
var/objdense = 0
if(src.InAir == 1)
src.doublefall = 1
if(src.y<2||src.y == null)
return
for(var/obj/P in get_step(src,2))
if(P.density == 1)
objdense = 1
for(var/mob/M in get_step(src,2))
if(M.density == 1)
mobdense = 1
var/turf/check = locate(src.x,src.y-1,src.z)
icon_state="fall"
if(check.density == 1||mobdense == 1||objdense==1)
src.InAir = 0
dir = odir
step_y = 0
bound_x = 13
bound_width = 23
bound_height = 28
spawn(3)
src.JumpDelay = 0
if(src.icon_state == "fall")
src.icon_state = "stand"
flick("land",src)
src.doublefall = 0
if(mobdense==1)
src.y-=1
else
if(check.density == 0&&mobdense == 0&&objdense==0)
step(src,2,6)
dir = odir
spawn(0.5)
goto fall
Problem description:
This is my proc for falling with my gravity code. However, this occurs.
At this exact position, on any left-side of a platform, it activates the falling proc, but it doesn't allow the user to fall. I have a feeling it's likely due to the fact that the player's x position is that of the empty space next to the platform, however they're still colliding with the platform due to the bounding box. As you see in the code, it changes the bounding box when falling, and resets it when the player lands. If anyone can give me a hand to remedy this, I would much appreciate it. If you need more information to provide a fix, don't hesitate to ask.
The problem with your code is it's changing the icon_state or flicking it in the wrong place. I would guess that it should be done in this section instead