@@ -195,11 +195,10 @@ export const ACTION_DEFINITIONS: Record<schema.Action, typeof Action<ActionUnion
195195 if ( target . beingCarried ) {
196196 // drop the target
197197 // const carrier = round.bodies.getById(target.carrierRobot!)
198- if ( target . carrierRobot !== undefined ) {
198+ if ( target . carrierRobot !== undefined && round . bodies . hasId ( target . carrierRobot ) ) {
199199 const carrier = round . bodies . getById ( target . carrierRobot )
200200 carrier . carriedRobot = undefined
201201 }
202- target . size = 1
203202 target . beingCarried = false
204203 target . carrierRobot = undefined
205204 } else {
@@ -210,8 +209,7 @@ export const ACTION_DEFINITIONS: Record<schema.Action, typeof Action<ActionUnion
210209 target . beingCarried = true
211210
212211 target . lastPos = { ...target . pos }
213- // target.pos = { x: src.pos.x + RatNapAction.OFFSET.x, y: src.pos.y + RatNapAction.OFFSET.y }
214- target . size = 0.6
212+ // target.pos = { x: src.pos.x + RatNapAction.OFFSET.x, y: src.pos.y + RatNapAction.OFFSET.y }
215213 }
216214 }
217215 draw ( match : Match , ctx : CanvasRenderingContext2D ) : void {
@@ -576,7 +574,6 @@ export const ACTION_DEFINITIONS: Record<schema.Action, typeof Action<ActionUnion
576574 carrier . carriedRobot = undefined
577575 }
578576 body . carrierRobot = undefined
579- body . beingCarried = false
580577 body . size = 1
581578 // body.pos = { ...endLoc }
582579 }
0 commit comments