|
126 | 126 | kill_count = 7
|
127 | 127 | grillepasschance = 0
|
128 | 128 | var/obj/item/weapon/boomerang/boomerang
|
| 129 | + var/list/hit_atoms = list() |
129 | 130 |
|
130 | 131 | /obj/item/projectile/boomerang/to_bump(var/atom/A)
|
131 |
| - if (boomerang) |
132 |
| - boomerang.throw_impact(A,boomerang.throw_speed*boomerang.throw_mult,boomerang.originator) |
133 |
| - if (boomerang.loc != src)//boomerang got grabbed most likely |
134 |
| - boomerang.originator = null |
135 |
| - boomerang = null |
136 |
| - qdel(src) |
137 |
| - return |
138 |
| - else if (iscarbon(A)) |
139 |
| - boomerang.apply_status_effects(A) |
140 |
| - forceMove(A.loc) |
| 132 | + if (!(A in hit_atoms)) |
| 133 | + hit_atoms += A |
| 134 | + if (boomerang) |
| 135 | + boomerang.throw_impact(A,boomerang.throw_speed*boomerang.throw_mult,boomerang.originator) |
| 136 | + if (boomerang.loc != src)//boomerang got grabbed most likely |
| 137 | + boomerang.originator = null |
| 138 | + boomerang = null |
| 139 | + qdel(src) |
| 140 | + return |
| 141 | + else if (iscarbon(A)) |
| 142 | + boomerang.apply_status_effects(A) |
| 143 | + forceMove(A.loc) |
| 144 | + A.Bumped(boomerang) |
| 145 | + bumped = TRUE |
| 146 | + bullet_die() |
| 147 | + return |
141 | 148 | A.Bumped(boomerang)
|
142 |
| - bumped = TRUE |
143 |
| - bullet_die() |
144 |
| - return |
145 |
| - A.Bumped(boomerang) |
146 | 149 | return ..(A)
|
147 | 150 |
|
148 | 151 | /obj/item/projectile/boomerang/OnDeath()
|
|
195 | 198 | Tr.refresh = projectile_speed
|
196 | 199 | Tr.luminosity = luminosity
|
197 | 200 | Tr.boomerang = boomerang
|
| 201 | + Tr.hit_atoms = hit_atoms.Copy() |
198 | 202 | boomerang.forceMove(Tr)
|
199 | 203 | boomerang = null
|
200 | 204 |
|
|
208 | 212 | density = 1
|
209 | 213 | pass_flags = PASSTABLE | PASSRAILING
|
210 | 214 | var/obj/item/weapon/boomerang/boomerang
|
| 215 | + var/list/hit_atoms = list() |
211 | 216 |
|
212 | 217 | /obj/effect/tracker/boomerang/Destroy()
|
213 | 218 | var/turf/T = get_turf(src)
|
|
233 | 238 |
|
234 | 239 | /obj/effect/tracker/boomerang/proc/make_contact(var/atom/Obstacle)
|
235 | 240 | if (boomerang)
|
236 |
| - if (Obstacle == boomerang.originator) |
237 |
| - if (on_expire(FALSE)) |
| 241 | + if (!(Obstacle in hit_atoms)) |
| 242 | + hit_atoms += Obstacle |
| 243 | + if (Obstacle == boomerang.originator) |
| 244 | + if (on_expire(FALSE)) |
| 245 | + qdel(src) |
| 246 | + return TRUE |
| 247 | + boomerang.throw_impact(Obstacle,boomerang.throw_speed*boomerang.throw_mult,boomerang.originator) |
| 248 | + if (boomerang.loc != src)//boomerang got grabbed most likely |
| 249 | + boomerang.originator = null |
| 250 | + boomerang = null |
| 251 | + qdel(src) |
| 252 | + return TRUE |
| 253 | + else if (iscarbon(Obstacle)) |
| 254 | + boomerang.apply_status_effects(Obstacle) |
| 255 | + return FALSE |
| 256 | + Obstacle.Bumped(boomerang) |
| 257 | + if (!ismob(Obstacle)) |
| 258 | + on_expire(TRUE) |
238 | 259 | qdel(src)
|
239 | 260 | return TRUE
|
240 |
| - boomerang.throw_impact(Obstacle,boomerang.throw_speed*boomerang.throw_mult,boomerang.originator) |
241 |
| - if (boomerang.loc != src)//boomerang got grabbed most likely |
242 |
| - boomerang.originator = null |
243 |
| - boomerang = null |
244 |
| - qdel(src) |
245 |
| - return TRUE |
246 |
| - else if (iscarbon(Obstacle)) |
247 |
| - boomerang.apply_status_effects(Obstacle) |
248 |
| - return FALSE |
249 |
| - Obstacle.Bumped(boomerang) |
250 |
| - if (!ismob(Obstacle)) |
251 |
| - on_expire(TRUE) |
252 |
| - qdel(src) |
253 |
| - return TRUE |
254 | 261 | return FALSE
|
255 | 262 | else
|
256 | 263 | qdel(src)
|
|
0 commit comments