- [FIX] Arreglada l'interacció amb el cursor
- [NEW] Afegit mode noclip - [NEW] Acabant la part de La Vella
This commit is contained in:
@@ -67,8 +67,8 @@ actors={
|
||||
if v.ox then x = x + v.ox end
|
||||
if v.oy then y = y + v.oy end
|
||||
local mousex,mousey=mouse.pos()
|
||||
local mx = math.floor((mousex+game.cam.x)/8)
|
||||
local my = math.floor((mousey+game.cam.y)/8)
|
||||
local mx = math.floor((mousex)/8)
|
||||
local my = math.floor((mousey)/8)
|
||||
if (mx==x or mx==x+1) and (my==y or my==y-1) then
|
||||
actors.under_cursor=v.name
|
||||
pal.subpal(1,16,8)
|
||||
@@ -157,27 +157,27 @@ actors={
|
||||
local step=string.sub(v.path.route,v.path.pos,v.path.pos)
|
||||
if step=='u' then
|
||||
v.o='u'
|
||||
if not actors.check_collision(v.x,v.y,v.o) and not mapa.check_collision(v.x,v.y-1) then
|
||||
if v.noclip or not actors.check_collision(v.x,v.y,v.o) and not mapa.check_collision(v.x,v.y-1) then
|
||||
v.y=v.y-1
|
||||
v.dy=4
|
||||
needs_sorting=true
|
||||
end
|
||||
elseif step=='d' then
|
||||
v.o='d'
|
||||
if not actors.check_collision(v.x,v.y,v.o) and not mapa.check_collision(v.x,v.y+1) then
|
||||
if v.noclip or not actors.check_collision(v.x,v.y,v.o) and not mapa.check_collision(v.x,v.y+1) then
|
||||
v.y=v.y+1
|
||||
v.dy=-4
|
||||
needs_sorting=true
|
||||
end
|
||||
elseif step=='l' then
|
||||
v.o='l'
|
||||
if not actors.check_collision(v.x,v.y,v.o) and not mapa.check_collision(v.x-1,v.y) then
|
||||
if v.noclip or not actors.check_collision(v.x,v.y,v.o) and not mapa.check_collision(v.x-1,v.y) then
|
||||
v.x=v.x-1
|
||||
v.dx=4
|
||||
end
|
||||
elseif step=='r' then
|
||||
v.o='r'
|
||||
if not actors.check_collision(v.x,v.y,v.o) and not mapa.check_collision(v.x+1,v.y) then
|
||||
if v.noclip or not actors.check_collision(v.x,v.y,v.o) and not mapa.check_collision(v.x+1,v.y) then
|
||||
v.x=v.x+1
|
||||
v.dx=-4
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user