d k daunkey kaung
This commit is contained in:
@@ -142,7 +142,7 @@
|
||||
if(fire_select_modes.len > 1)
|
||||
firemode_action = new(src)
|
||||
firemode_action.button_icon_state = "fireselect_[fire_select]"
|
||||
firemode_action.UpdateButtonIcon()
|
||||
firemode_action.UpdateButtons()
|
||||
|
||||
/obj/item/gun/ComponentInitialize()
|
||||
. = ..()
|
||||
@@ -219,7 +219,7 @@
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, TRUE)
|
||||
update_appearance()
|
||||
firemode_action.button_icon_state = "fireselect_[fire_select]"
|
||||
firemode_action.UpdateButtonIcon()
|
||||
firemode_action.UpdateButtons()
|
||||
return TRUE
|
||||
|
||||
/obj/item/gun/equipped(mob/living/user, slot)
|
||||
@@ -670,7 +670,7 @@
|
||||
update_icon()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
A.UpdateButtons()
|
||||
|
||||
/obj/item/gun/update_overlays()
|
||||
. = ..()
|
||||
|
||||
@@ -200,7 +200,9 @@
|
||||
else
|
||||
P.color = rgb(0, 255, 0)
|
||||
var/turf/curloc = get_turf(src)
|
||||
var/turf/targloc = get_turf(current_user.client.mouseObject)
|
||||
|
||||
var/atom/target_atom = current_user.client.mouse_object_ref?.resolve()
|
||||
var/turf/targloc = get_turf(target_atom)
|
||||
if(!istype(targloc))
|
||||
if(!istype(curloc))
|
||||
return
|
||||
@@ -293,7 +295,9 @@
|
||||
process_aim()
|
||||
if(fire_check() && can_trigger_gun(M))
|
||||
sync_ammo()
|
||||
do_fire(M.client.mouseObject, M, FALSE, M.client.mouseParams, M.zone_selected)
|
||||
var/atom/target = M.client.mouse_object_ref?.resolve()
|
||||
if(target)
|
||||
afterattack(target, M, FALSE, M.client.mouseParams)
|
||||
stop_aiming()
|
||||
QDEL_LIST(current_tracers)
|
||||
return ..()
|
||||
|
||||
@@ -939,12 +939,10 @@
|
||||
var/y = text2num(screen_loc_Y[1]) * 32 + text2num(screen_loc_Y[2]) - 32
|
||||
|
||||
//Calculate the "resolution" of screen based on client's view and world's icon size. This will work if the user can view more tiles than average.
|
||||
var/list/screenview = getviewsize(user.client.view)
|
||||
var/screenviewX = screenview[1] * world.icon_size
|
||||
var/screenviewY = screenview[2] * world.icon_size
|
||||
var/list/screenview = view_to_pixels(user.client.view)
|
||||
|
||||
var/ox = round(screenviewX/2) - user.client.pixel_x //"origin" x
|
||||
var/oy = round(screenviewY/2) - user.client.pixel_y //"origin" y
|
||||
var/ox = round(screenview[1] / 2) - user.client.pixel_x //"origin" x
|
||||
var/oy = round(screenview[2] / 2) - user.client.pixel_y //"origin" y
|
||||
angle = arctan(y - oy, x - ox)
|
||||
return list(angle, p_x, p_y)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user