Skip to content

Commit

Permalink
fix(radiation): add distance check
Browse files Browse the repository at this point in the history
PR #10740
- Добавил проверку на расстояние от источника.
  • Loading branch information
intercepti0n authored Oct 19, 2023
1 parent 13ac605 commit 85b2c3f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/controllers/subsystems/radiation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ SUBSYSTEM_DEF(radiation)
if(source_turf.z != T.z)
continue // Radiation is not multi-z

var/E = source.info.energy / RADIATION_DISTANCE_MULT(get_dist(T, source_turf))
var/dist = get_dist(T, source_turf)
if(dist > source.range)
continue

var/E = source.info.energy / RADIATION_DISTANCE_MULT(dist)

if(isobj(source.holder))
var/obj/current_obj = source.holder
Expand Down

0 comments on commit 85b2c3f

Please sign in to comment.