if (priority > 0) { return false; } else if (priority < 0) { return true; } else {  if (entity->type() == GROUND && next->type() != GROUND) { return true; } if (entity->type() == next->type()) {  if (next->prioritySolver() < entity->prioritySolver()) { return true; } } return false;
if (entity->priority() != next->priority()) { return entity->priority() < next->priority();
inline bool insertBefore(cEntity *entity, cEntity *next) {	// Do in-cell sorting	int priority = entity->priority() - next->priority();	if (priority > 0) {		return false; // Our priority is higher than the next tile	} else if (priority < 0) {		return true; // Our priority is smaller, so sort before us.	} else {		// Ground tiles loose		if (entity->type() == GROUND && next->type() != GROUND) {			return true;		}		if (entity->type() == next->type()) {			// Use the problem solver priority			if (next->prioritySolver() < entity->prioritySolver()) {				return true;			}		}		return false; // If the priority is the same, tiles that come later, draw later	}}