Merged duplicate code

The case for object1 being a group or emitter was the same, so I consolidated the their cases to line 582.