I don't think that will work in this case, because I could have more than two entities that I need to sort. So assuming a case with 3, I need to have a way to say "render this one, THEN this one, THEN this one".
I'm not entirely opposed to using the z-coordinate for this sorting, but the problem is that I am using transparent sprites and the engine seems to get confused unless the difference in z-coordinates between entities is at least 3 pixels. I need it to correctly render these three entities:
ent_create("player1.png", vector(0,0,0.1), NULL);
ent_create("player2.png", vector(0,0,0.2), NULL);
ent_create("player3.png", vector(0,0,0.3), NULL);
Any help is very much appreciated.