diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index 676b7d1c25..4563bf989e 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -4,7 +4,7 @@ #define TRANSITIONEDGE 7 // Distance from edge to move to another z-level. -// Invisibility constants. +// Invisibility constants. These should only be used for TRUE invisibility, AKA nothing living players touch #define INVISIBILITY_LIGHTING 20 #define INVISIBILITY_LEVEL_ONE 35 #define INVISIBILITY_LEVEL_TWO 45 @@ -21,6 +21,9 @@ #define SEE_INVISIBLE_MINIMUM 5 #define INVISIBILITY_MAXIMUM 100 +// Pseudo-Invis, like Ninja, Ling, Etc. +#define EFFECTIVE_INVIS 50 // Below this, can't be examined, may as well be invisible to the game + // For the client FPS pref and anywhere else #define MAX_CLIENT_FPS 200 diff --git a/code/modules/artifice/deadringer.dm b/code/modules/artifice/deadringer.dm index 99061b6624..e12c0b0045 100644 --- a/code/modules/artifice/deadringer.dm +++ b/code/modules/artifice/deadringer.dm @@ -23,7 +23,6 @@ processing_objects -= src ..() - /obj/item/weapon/deadringer/dropped() if(timer > 20) uncloak() @@ -50,7 +49,6 @@ activated = 0 return - /obj/item/weapon/deadringer/process() if(activated) if (ismob(src.loc)) @@ -77,13 +75,11 @@ icon_state = "deadringer" return - /obj/item/weapon/deadringer/proc/deathprevent() for(var/mob/living/simple_animal/D in oviewers(7, src)) D.LoseTarget() watchowner.emote("deathgasp") - watchowner.invisibility = 85 - watchowner.alpha = 127 + watchowner.alpha = 15 makeacorpse(watchowner) for(var/mob/living/simple_animal/D in oviewers(7, src)) D.LoseTarget() @@ -91,7 +87,6 @@ /obj/item/weapon/deadringer/proc/uncloak() if(watchowner) - watchowner.invisibility = 0 watchowner.alpha = 255 playsound(get_turf(src), 'sound/effects/uncloak.ogg', 35, 1, -1) return @@ -180,5 +175,3 @@ var/obj/item/organ/internal/G = I G.Destroy() return - - diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index b860d2b855..04fff68e53 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -2,7 +2,7 @@ var/skip_gear = 0 var/skip_body = 0 - if(alpha <= 50) + if(alpha <= EFFECTIVE_INVIS) src.loc.examine(user) return diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 6eb4f22164..72a42d0b3e 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -796,8 +796,6 @@ var/mob/living/L = target_mob if(L.stat != DEAD) return 1 - if(L.invisibility < INVISIBILITY_LEVEL_ONE) - return 1 if (istype(target_mob,/obj/mecha)) var/obj/mecha/M = target_mob if (M.occupant) @@ -917,7 +915,7 @@ continue else if(L in friends) continue - else if(L.invisibility >= INVISIBILITY_LEVEL_ONE) + else if(L.alpha <= EFFECTIVE_INVIS) continue else if(!SA_attackable(L)) continue @@ -1246,7 +1244,7 @@ ai_log("AttackTarget() Bailing because we're disabled",2) LoseTarget() return 0 - if(!target_mob || !SA_attackable(target_mob) || (target_mob.invisibility >= INVISIBILITY_LEVEL_ONE)) //if the target went invisible, you can't follow it + if(!target_mob || !SA_attackable(target_mob) || (target_mob.alpha <= EFFECTIVE_INVIS)) //if the target went invisible, you can't follow it LoseTarget() return 0 if(!(target_mob in ListTargets(view_range)))