mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 02:24:05 +09:00
larger dropped item pickup range
This commit is contained in:
@@ -179,9 +179,7 @@ object WorldSimulator {
|
|||||||
val actor = result.get()
|
val actor = result.get()
|
||||||
// if hitbox overlaps, pick up
|
// if hitbox overlaps, pick up
|
||||||
val s = actor.scale
|
val s = actor.scale
|
||||||
val w = actor.baseHitboxW * s
|
val pickupDistSqr = (96f * s).sqr()// TODO refer to the actorValue
|
||||||
val h = actor.baseHitboxH * s
|
|
||||||
val pickupDistSqr = w*w + h*h// TODO refer to the actorValue
|
|
||||||
// println("${result.distance}\pickupDistSqr")
|
// println("${result.distance}\pickupDistSqr")
|
||||||
if (result.distance < pickupDistSqr) {
|
if (result.distance < pickupDistSqr) {
|
||||||
droppedItem.onItemPickup(actor)
|
droppedItem.onItemPickup(actor)
|
||||||
|
|||||||
Reference in New Issue
Block a user