Skip to content

Commit

Permalink
fix pbing downed target
Browse files Browse the repository at this point in the history
  • Loading branch information
BraveMole authored and Bizzonium committed Aug 20, 2022
1 parent 11f3fcd commit f95282d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#define DAMAGE_REDUCTION_COEFFICIENT(armor) (0.1/((armor*armor*0.0001)+0.1)) //Armor offers diminishing returns.

#define PROJECTILE_HIT_CHECK(thing_to_hit, projectile, cardinal_move, uncrossing) (!(thing_to_hit.resistance_flags & PROJECTILE_IMMUNE) && thing_to_hit.density && thing_to_hit.projectile_hit(projectile, cardinal_move, uncrossing))
#define PROJECTILE_HIT_CHECK(thing_to_hit, projectile, cardinal_move, uncrossing) (!(thing_to_hit.resistance_flags & PROJECTILE_IMMUNE) && thing_to_hit.projectile_hit(projectile, cardinal_move, uncrossing))

//The actual bullet objects.
/obj/projectile
Expand Down Expand Up @@ -636,6 +636,8 @@ So if we are on the 32th absolute pixel coordinate we are on tile 1, but if we a


/obj/projectile_hit(obj/projectile/proj, cardinal_move, uncrossing)
if(!density && !(obj_flags & PROJ_IGNORE_DENSITY)) //structure is passable
return FALSE
if(src == proj.original_target) //clicking on the structure itself hits the structure
return TRUE
if(!throwpass)
Expand Down

0 comments on commit f95282d

Please sign in to comment.