This commit is contained in:
silicons
2021-01-08 18:59:26 -08:00
parent 849e9405fd
commit bffc43e95e
5 changed files with 25 additions and 7 deletions
+14
View File
@@ -163,5 +163,19 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
else if(!HAS_TRAIT(x, TRAIT_KEEP_TOGETHER))\
x.appearance_flags &= ~KEEP_TOGETHER
//dir macros
///Returns true if the dir is diagonal, false otherwise
#define ISDIAGONALDIR(d) (d&(d-1))
///True if the dir is north or south, false therwise
#define NSCOMPONENT(d) (d&(NORTH|SOUTH))
///True if the dir is east/west, false otherwise
#define EWCOMPONENT(d) (d&(EAST|WEST))
///Flips the dir for north/south directions
#define NSDIRFLIP(d) (d^(NORTH|SOUTH))
///Flips the dir for east/west directions
#define EWDIRFLIP(d) (d^(EAST|WEST))
///Turns the dir by 180 degrees
#define DIRFLIP(d) turn(d, 180)
/// 33554431 (2^24 - 1) is the maximum value our bitflags can reach.
#define MAX_BITFLAG_DIGITS 8
+4 -1
View File
@@ -36,6 +36,9 @@
if(del_on_unbuckle_all && !AM.has_buckled_mobs())
qdel(src)
/datum/component/riding/proc/vehicle_mob_buckle(datum/source, mob/living/M)
return
/datum/component/riding/proc/handle_vehicle_layer(dir)
var/atom/movable/AM = parent
var/static/list/defaults = list(TEXT_NORTH = OBJ_LAYER, TEXT_SOUTH = ABOVE_MOB_LAYER, TEXT_EAST = ABOVE_MOB_LAYER, TEXT_WEST = ABOVE_MOB_LAYER)
@@ -55,7 +58,7 @@
var/atom/movable/AM = parent
if (isnull(dir))
dir = AM.dir
movable_parent.set_glide_size(DELAY_TO_GLIDE_SIZE(vehicle_move_delay))
AM.set_glide_size(DELAY_TO_GLIDE_SIZE(vehicle_move_delay))
for(var/i in AM.buckled_mobs)
ride_check(i)
handle_vehicle_offsets(dir)
+1 -1
View File
@@ -73,7 +73,7 @@
return FALSE
//We are now going to move
var/add_delay = mob.movement_delay()
mob.set_glide_size(DELAY_TO_GLIDE_SIZE(add_delay * ( (NSCOMPONENT(direct) && EWCOMPONENT(direct)) ? 2 : 1 ) )) // set it now in case of pulled objects
mob.set_glide_size(DELAY_TO_GLIDE_SIZE(add_delay * ( (NSCOMPONENT(direction) && EWCOMPONENT(direction)) ? 2 : 1 ) )) // set it now in case of pulled objects
if(old_move_delay + (add_delay*MOVEMENT_DELAY_BUFFER_DELTA) + MOVEMENT_DELAY_BUFFER > world.time)
move_delay = old_move_delay
else
+4 -4
View File
@@ -471,10 +471,10 @@
if(paused || !isturf(loc))
return
var/required_pixels = (pixels_per_second * ds) + pixels_tick_leftover
var/required_pixels = (pixels_per_second * wait) + pixels_tick_leftover
if(required_pixels >= pixel_increment_amount)
pixels_tick_leftover = MODULUS(required_pixels, pixel_increment_amount)
pixel_move(FLOOR(required_pixels / pixel_increment_amount, 1), FALSE, ds, SSprojectiles.global_projectile_speed_multiplier)
pixel_move(FLOOR(required_pixels / pixel_increment_amount, 1), FALSE, wait, SSprojectiles.global_projectile_speed_multiplier)
else
pixels_tick_leftover = required_pixels
@@ -602,7 +602,7 @@
* Trajectory multiplier directly modifies the factor of pixel_increment_amount to go per time.
* It's complicated, so probably just don't mess with this unless you know what you're doing.
*/
/obj/item/projectile/proc/pixel_move(times, hitscanning = FALSE, deciseconds_equivalent = world.tick_lag, trajectory_multiplier = 1, allow_animation = TRUE)
/obj/item/projectile/proc/pixel_move(times, hitscanning = FALSE, seconds_equivalent = world.tick_lag * 0.1, trajectory_multiplier = 1, allow_animation = TRUE)
if(!loc || !trajectory)
return
if(!nondirectional_sprite && !hitscanning)
@@ -619,7 +619,7 @@
if(homing_target)
// No datum/points, too expensive.
var/angle = closer_angle_difference(Angle, get_projectile_angle(src, homing_target))
var/max_turn = homing_turn_speed * deciseconds_equivalent * 0.1
var/max_turn = homing_turn_speed * seconds_equivalent
setAngle(Angle + clamp(angle, -max_turn, max_turn))
// HOMING END
trajectory.increment(trajectory_multiplier)
+2 -1
View File
@@ -73,6 +73,7 @@
/obj/structure/disposalholder/proc/move()
set waitfor = FALSE
var/obj/structure/disposalpipe/last
var/ticks = 1
while(active)
var/obj/structure/disposalpipe/curr = loc
last = curr
@@ -81,7 +82,7 @@
if(!curr && active)
last.expel(src, loc, dir)
stoplag()
ticks = stoplag()
if(!(count--))
active = FALSE