Makes pixelshift better

Ditto
This commit is contained in:
christiankabbalahexpert
2023-08-19 19:37:05 +10:00
parent 5c4271811f
commit a7d2db1c4b
3 changed files with 26 additions and 20 deletions
+1 -1
View File
@@ -15,4 +15,4 @@
movement_dir &= ~(NORTH|SOUTH)
if((movement_dir & EAST) && (movement_dir & WEST))
movement_dir &= ~(EAST|WEST)
user.Move(get_step(src, movement_dir), movement_dir)
user.Move(get_step(src, movement_dir), movement_dir)
+1 -1
View File
@@ -88,4 +88,4 @@
if(holder)
holder.keyLoop(src)
if(mob.focus)
mob.focus.keyLoop(src)
mob.focus.keyLoop(src)
+24 -18
View File
@@ -58,31 +58,20 @@
user.body_l_leg()
return
if(client.keys_held["Ctrl"])
//!shift for pixel shifting
if(client.keys_held["Ctrl"] && !client.keys_held["Shift"])
switch(SSinput.movement_keys[_key])
if(NORTH)
if(client.keys_held["Shift"])
northshift()
else
northface()
northface()
return
if(SOUTH)
if(client.keys_held["Shift"])
southshift()
else
southface()
southface()
return
if(WEST)
if(client.keys_held["Shift"])
westshift()
else
westface()
westface()
return
if(EAST)
if(client.keys_held["Shift"])
eastshift()
else
eastface()
eastface()
return
return ..()
@@ -91,4 +80,21 @@
if("Alt")
toggle_move_intent()
return
return ..()
return ..()
/// Mostly used for pixel shift right now
/mob/keyLoop(client/user)
..() //Oops! You need this to move, don't you?
if(user.keys_held["Ctrl"] && user.keys_held["Shift"])
var/direction = NONE
for(var/_key in user.keys_held)
direction = direction | SSinput.movement_keys[_key]
switch(direction)
if(NORTH)
northshift()
if(SOUTH)
southshift()
if(WEST)
westshift()
if(EAST)
eastshift()