diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 54a4f5f52ec..ece685d28cc 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1538,4 +1538,19 @@ Standard way to write links -Sayu if(covered_locations & FOOT_RIGHT) return 0 - return 1 \ No newline at end of file + return 1 + +proc/check_target_facings(mob/living/initator, mob/living/target) + /*This can be used to add additional effects on interactions between mobs depending on how the mobs are facing each other, such as adding a crit damage to blows to the back of a guy's head. + Given how click code currently works (Nov '13), the initiating mob will be facing the target mob most of the time + That said, this proc should not be used if the change facing proc of the click code is overriden at the same time*/ + if(!!isliving(target) || target.lying || istype(target, /mob/living/silicon/pai)) + //Make sure we are not doing this for things that can't have a logical direction to the players given that the target would be on their side + return + + if(initator.dir == target.dir) //mobs are facing the same direction + return 1 + if(initator.dir + 4 == target.dir || initator.dir - 4 == target.dir) //mobs are facing each other + return 2 + if(initator.dir + 2 == target.dir || initator.dir - 2 == target.dir || initator.dir + 6 == target.dir || initator.dir - 6 == target.dir) //Initating mob is looking at the target, while the target mob is looking in a direction perpendicular to the 1st + return 3 diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 2afec0d1f9d..75f0388981c 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -193,6 +193,10 @@ playsound(user, fire_sound, 10, 1) else playsound(user, fire_sound, 50, 1) + if(istype(in_chamber, /obj/item/projectile/beam/lastertag)) + user.show_message("You feel rather silly, trying to commit suicide with a toy.") + mouthshoot = 0 + return in_chamber.on_hit(M) if (!in_chamber.nodamage) user.apply_damage(in_chamber.damage*2.5, in_chamber.damage_type, "head", used_weapon = "Point blank shot in the mouth with \a [in_chamber]")