diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index d8027a2c..b675d2da 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -80,7 +80,6 @@ // If we're pulling something then drop what we're currently pulling and pull this instead. if(pulling) if(gs==0) - stop_pulling() return FALSE // Are we trying to pull something we are already pulling? Then enter grab cycle and end. if(AM == pulling) @@ -88,11 +87,13 @@ if(istype(AM,/mob/living)) var/mob/living/AMob = AM AMob.grabbedby(src) + return TRUE stop_pulling() if(AM.pulledby) log_combat(AM, AM.pulledby, "pulled from", src) AM.pulledby.stop_pulling() //an object can't be pulled by two mobs at once. + pulling = AM AM.pulledby = src grab_state = gs @@ -102,19 +103,44 @@ var/mob/M = AM log_combat(src, M, "grabbed", addition="passive grab") visible_message("[src] has grabbed [M] passively.") - return TRUE +//move character into tile whos grabbing you +/atom/movable/proc/adjust_position() + + var/pull_dir = get_dir(src, pulledby) + if (pulledby <> null) + switch(pull_dir) + if(NORTH) + animate(src, pixel_x=0, pixel_y=8, time=5) + if(NORTHEAST) + animate(src, pixel_x=8, pixel_y=8, time=5) + if(NORTHWEST) + animate(src, pixel_x=-8, pixel_y=8, time=5) + if(SOUTHEAST) + animate(src, pixel_x=8, pixel_y=-8, time=5) + if(SOUTHWEST) + animate(src, pixel_x=-8, pixel_y=-8, time=5) + if(SOUTH) + animate(src, pixel_x=0, pixel_y=-8, time=5) + if(WEST) + animate(src, pixel_x=-8, pixel_y=0, time=5) + if(EAST) + animate(src, pixel_x=8, pixel_y=0, time=5) + + /atom/movable/proc/stop_pulling() if(pulling) pulling.pulledby = null var/mob/living/ex_pulled = pulling pulling = null grab_state = 0 + if(isliving(ex_pulled)) var/mob/living/L = ex_pulled L.update_canmove()// mob gets up if it was lyng down in a chokehold + /atom/movable/proc/Move_Pulled(atom/A) if(!pulling) return @@ -132,9 +158,12 @@ return step(pulling, get_dir(pulling.loc, A)) + + /atom/movable/proc/check_pulling() if(pulling) var/atom/movable/pullee = pulling + if(pullee && get_dist(src, pullee) > 1) stop_pulling() return @@ -149,6 +178,11 @@ stop_pulling() return + + + + + //////////////////////////////////////// // Here's where we rewrite how byond handles movement except slightly different // To be removed on step_ conversion @@ -220,6 +254,7 @@ // place due to a Crossed, Bumped, etc. call will interrupt // the second half of the diagonal movement, or the second attempt // at a first half if step() fails because we hit something. + if (direct & NORTH) if (direct & EAST) if (step(src, NORTH) && moving_diagonally) @@ -276,6 +311,7 @@ if(. && pulling && pulling == pullee) //we were pulling a thing and didn't lose it during our move. if(pulling.anchored) stop_pulling() + else var/pull_dir = get_dir(src, pulling) //puller and pullee more than one tile away or in diagonal position @@ -283,6 +319,7 @@ pulling.Move(T, get_dir(pulling, T)) //the pullee tries to reach our previous position if(pulling && get_dist(src, pulling) > 1) //the pullee couldn't keep up stop_pulling() + if(pulledby && moving_diagonally != FIRST_DIAG_STEP && get_dist(src, pulledby) > 1)//separated from our puller and not in the middle of a diagonal move. pulledby.stop_pulling() diff --git a/sound/AI/aimalf.ogg b/sound/AI/aimalf.ogg index b7996916..50b7688d 100644 Binary files a/sound/AI/aimalf.ogg and b/sound/AI/aimalf.ogg differ diff --git a/sound/AI/aliens.ogg b/sound/AI/aliens.ogg index f7d17462..98132048 100644 Binary files a/sound/AI/aliens.ogg and b/sound/AI/aliens.ogg differ diff --git a/sound/AI/commandreport.ogg b/sound/AI/commandreport.ogg index 82e4ca42..36921404 100644 Binary files a/sound/AI/commandreport.ogg and b/sound/AI/commandreport.ogg differ diff --git a/sound/AI/granomalies.ogg b/sound/AI/granomalies.ogg index 89b368d5..89a776c3 100644 Binary files a/sound/AI/granomalies.ogg and b/sound/AI/granomalies.ogg differ diff --git a/sound/AI/intercept.ogg b/sound/AI/intercept.ogg index 3569a07d..c0a3c6c7 100644 Binary files a/sound/AI/intercept.ogg and b/sound/AI/intercept.ogg differ diff --git a/sound/AI/ionstorm.ogg b/sound/AI/ionstorm.ogg index 9f39713d..4bb414e5 100644 Binary files a/sound/AI/ionstorm.ogg and b/sound/AI/ionstorm.ogg differ diff --git a/sound/AI/meteors.ogg b/sound/AI/meteors.ogg index 8f1c3aea..4e7cdd11 100644 Binary files a/sound/AI/meteors.ogg and b/sound/AI/meteors.ogg differ diff --git a/sound/AI/newAI.ogg b/sound/AI/newAI.ogg index 35aba345..d21967d0 100644 Binary files a/sound/AI/newAI.ogg and b/sound/AI/newAI.ogg differ diff --git a/sound/AI/outbreak5.ogg b/sound/AI/outbreak5.ogg index 39c79c92..fbdb8eed 100644 Binary files a/sound/AI/outbreak5.ogg and b/sound/AI/outbreak5.ogg differ diff --git a/sound/AI/outbreak7.ogg b/sound/AI/outbreak7.ogg index f21d4fca..f35e65be 100644 Binary files a/sound/AI/outbreak7.ogg and b/sound/AI/outbreak7.ogg differ diff --git a/sound/AI/poweroff.ogg b/sound/AI/poweroff.ogg index 1c6377c9..f445f195 100644 Binary files a/sound/AI/poweroff.ogg and b/sound/AI/poweroff.ogg differ diff --git a/sound/AI/poweron.ogg b/sound/AI/poweron.ogg index 9d18797d..8cc3058c 100644 Binary files a/sound/AI/poweron.ogg and b/sound/AI/poweron.ogg differ diff --git a/sound/AI/radiation.ogg b/sound/AI/radiation.ogg index ef395af3..18e112a7 100644 Binary files a/sound/AI/radiation.ogg and b/sound/AI/radiation.ogg differ diff --git a/sound/AI/shuttlecalled.ogg b/sound/AI/shuttlecalled.ogg index 716bf824..da5a5e21 100644 Binary files a/sound/AI/shuttlecalled.ogg and b/sound/AI/shuttlecalled.ogg differ diff --git a/sound/AI/shuttledock.ogg b/sound/AI/shuttledock.ogg index 0f70bebc..3c035c59 100644 Binary files a/sound/AI/shuttledock.ogg and b/sound/AI/shuttledock.ogg differ diff --git a/sound/AI/shuttlerecalled.ogg b/sound/AI/shuttlerecalled.ogg index 5f6db404..35299087 100644 Binary files a/sound/AI/shuttlerecalled.ogg and b/sound/AI/shuttlerecalled.ogg differ diff --git a/sound/AI/spanomalies.ogg b/sound/AI/spanomalies.ogg index 7680726f..e5ababea 100644 Binary files a/sound/AI/spanomalies.ogg and b/sound/AI/spanomalies.ogg differ diff --git a/sound/AI/welcome.ogg b/sound/AI/welcome.ogg index c7013dcb..2224cabb 100644 Binary files a/sound/AI/welcome.ogg and b/sound/AI/welcome.ogg differ