Out of view eggs are now displayed in an icon - #5742
Conversation
|
Just checked the forums and saw that the Evolution assets were released the same day the pull request was made, oops! Anyways I just tested it and it works as expected. Eggs off the minimap display in an icon frame and the farther the egg the smaller it is. |
| float map_half_width = m_map_width*0.5f; | ||
| float map_half_height = m_map_height*0.5f; | ||
| //uses posy to get posx if the slope of the points is higher than the map's | ||
| if (abs((draw_at.getY() - m_map_height*0.5f)/((draw_at.getX() - m_map_width*0.5f))) > |
There was a problem hiding this comment.
The purpose and working (why are the formulas like that?) of this if/else isn't clear at first glance and the comment doesn't do a very good job at clarifying it.
I suppose this is related to the fact that even if say the X value is within bounds, if the Y value is out of bounds, the X value is actually getting changed too when projecting the out-of-map position to a map-border position?
| lower_y -(int)(positionY-((scaler)*m_minimap_player_size/2.5f))); | ||
| draw2DImage(m_egg, position, source, NULL, NULL, true); | ||
| } | ||
| else |
There was a problem hiding this comment.
In the case the egg is not out of the map, you essentially do the same final drawing operation, it's just that the scaling value is 1.0 and positionX / positionY are different than the draw_at getX/getY. I would take these final operation fully entirely out of the if/else, have the scaling variable and positionX/positionY defined/set before the if, and modified within the if in case the egg is out of the map.

Whenever an egg is outside of the map, it uses a frame to point towards the location of the egg (the same one from soccer game mode). The egg inside of the frame also gets smaller the farther away it is.
(This should hopefully work? I used the main branch for testing and it works well. I wasn't able to test it in the actual BalanceSTK2 branch due to assets being missing, but it was able to compile. So unless a change occurred to how players are rendered on the map it should work the same)
Agreement