Conflict Resolution

This commit is contained in:
Unknown
2019-03-28 21:04:21 -04:00
parent 38c4b88ded
commit 2dbf8499f4
2 changed files with 21 additions and 122 deletions

View File

@@ -28,68 +28,6 @@
QDEL_NULL(shadow)
return ..()
<<<<<<< HEAD
/obj/item/projectile/arc/Bump(atom/A, forced=0)
return 0
// if(get_turf(src) != original)
// return 0
// else
// return ..()
// This is a test projectile in the sense that its testing the code to make sure it works,
// as opposed to a 'can I hit this thing' projectile.
/obj/item/projectile/arc/test/on_impact(turf/T)
new /obj/effect/explosion(T)
return ..()
/obj/item/projectile/arc/old_style_target(target, source)
var/source_loc = get_turf(source) || get_turf(src)
var/expected_distance = get_dist(target, source_loc)
range = expected_distance // So the projectile "hits the ground."
target_distance = expected_distance
fired_dir = get_dir(source_loc, target)
..()
if(fired_dir & EAST)
transform = turn(transform, -45)
else if(fired_dir & WEST)
transform = turn(transform, 45)
/obj/item/projectile/arc/on_range()
on_impact(loc)
return ..()
// Visuals.
/obj/item/projectile/arc/after_move()
if(QDELETED(src))
return
// Handle projectile turning in flight.
// This won't turn if fired north/south, as it looks weird.
var/turn_per_step = 90 / target_distance
if(fired_dir & EAST)
transform = turn(transform, turn_per_step)
else if(fired_dir & WEST)
transform = turn(transform, -turn_per_step)
// Now for the fake height.
// We need to know how far along our "arc" we are.
var/arc_progress = get_dist(src, original)
var/arc_max_height = (target_distance * world.icon_size) / 2 // TODO: Real math.
// var/arc_center = target_distance / 2
// var/projectile_position = abs(arc_progress - arc_center)
// var/height_multiplier = projectile_position / arc_center
// height_multiplier = abs(height_multiplier - 1)
// height_multiplier = height_multiplier ** 2
// animate(src, pixel_z = arc_max_height * height_multiplier, time = step_delay)
var/projectile_position = arc_progress / target_distance
var/sine_position = projectile_position * 180
var/pixel_z_position = arc_max_height * sin(sine_position)
animate(src, pixel_z = pixel_z_position, time = speed)
// Update our shadow.
shadow.forceMove(loc)
=======
/obj/item/projectile/arc/proc/calculate_initial_pixel_distance(atom/user, atom/target)
var/datum/point/A = new(user)
@@ -160,7 +98,6 @@
shadow.pixel_x = pixel_x
shadow.pixel_y = pixel_y + visual_y_offset
>>>>>>> f083fba... Merge pull request #5977 from Neerti/btw_i_use_fixed_arc
/obj/effect/projectile_shadow
name = "shadow"