mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Assorted performance improvements (#25649)
* Improved efficiency of playsound. * Improve performance of turf/Enter * Improve performace of thrown objects. * Improved performance of /atom/movable/CanPass. * Improved pipeline destruction performance. * Apply suggestions from code review Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Signed-off-by: Charlie Nolan <funnyman3595@gmail.com> --------- Signed-off-by: Charlie Nolan <funnyman3595@gmail.com> Co-authored-by: FunnyMan3595 (Charlie Nolan) <funnyman@google.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
This commit is contained in:
@@ -243,13 +243,9 @@ SUBSYSTEM_DEF(throwing)
|
||||
return
|
||||
thrownthing.throwing = null
|
||||
if(!hit)
|
||||
for(var/atom/movable/obstacle as anything in get_turf(thrownthing)) //looking for our target on the turf we land on.
|
||||
if(obstacle == target)
|
||||
hit = TRUE
|
||||
thrownthing.throw_impact(obstacle, src)
|
||||
if(QDELETED(thrownthing)) //throw_impact can delete things, such as glasses smashing
|
||||
return //deletion should already be handled by on_thrownthing_qdel()
|
||||
break
|
||||
if(get_turf(target) == get_turf(thrownthing))
|
||||
hit = TRUE
|
||||
thrownthing.throw_impact(target, src)
|
||||
if(!hit)
|
||||
thrownthing.throw_impact(get_turf(thrownthing), src) // we haven't hit something yet and we still must, let's hit the ground.
|
||||
if(QDELETED(thrownthing)) //throw_impact can delete things, such as glasses smashing
|
||||
|
||||
Reference in New Issue
Block a user