| 793 | } |
| 794 | |
| 795 | int SimplifyVertexSlow(int x, int z, float delta) { |
| 796 | vector *eye = TS_View_position; |
| 797 | g3Point p1, p2; |
| 798 | |
| 799 | p1.p3_codes = 0; |
| 800 | GetPreRotatedPoint(&p1, x, z, Terrain_seg[z * TERRAIN_WIDTH + x].ypos); |
| 801 | |
| 802 | p2.p3_codes = 0; |
| 803 | GetSpecialRotatedPoint(&p2, x, z, Terrain_seg[z * TERRAIN_WIDTH + x].y + delta); |
| 804 | |
| 805 | g3_ProjectPoint(&p1); |
| 806 | g3_ProjectPoint(&p2); |
| 807 | |
| 808 | float len = ((p1.p3_sx - p2.p3_sx) * (p1.p3_sx - p2.p3_sx)) + ((p1.p3_sy - p2.p3_sy) * (p1.p3_sy - p2.p3_sy)); |
| 809 | |
| 810 | #ifndef NEWEDITOR |
| 811 | if (len < (Detail_settings.Pixel_error * Detail_settings.Pixel_error)) |
| 812 | #else |
| 813 | if (len < (10.0f * 10.0f)) |
| 814 | #endif |
| 815 | return 1; |
| 816 | |
| 817 | return 0; |
| 818 | } |
| 819 | |
| 820 | int SimplifyVertex(int x, int z, float delta) { |
| 821 | vector *eye = TS_View_position; |
nothing calls this directly
no test coverage detected