Rev 24 | Rev 29 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 24 | Rev 25 | ||
---|---|---|---|
Line 218... | Line 218... | ||
218 | for (viewer_index = 0; viewer_index < 2; viewer_index++) |
218 | for (viewer_index = 0; viewer_index < 2; viewer_index++) |
219 | if ((the_board.players[viewer_index].type == PLAYER_COMPUTER) |
219 | if ((the_board.players[viewer_index].type == PLAYER_COMPUTER) |
220 | || (the_board.players[viewer_index].type == PLAYER_INTERNET) |
220 | || (the_board.players[viewer_index].type == PLAYER_INTERNET) |
221 | || (viewer_index == current_viewer)) |
221 | || (viewer_index == current_viewer)) |
222 | { |
222 | { |
223 | the_board.players[viewer_index].view_pitch = 89. |
223 | the_board.players[viewer_index].view_pitch = 89.99f; |
224 | the_board.players[viewer_index].view_yaw = (current_viewer == COLOR_BLACK ? 90.0f : -90.0f); |
224 | the_board.players[viewer_index].view_yaw = (current_viewer == COLOR_BLACK ? 90.0f : -90.0f); |
225 | the_board.players[viewer_index].view_distance = 58.0f; |
225 | the_board.players[viewer_index].view_distance = 58.0f; |
226 | } |
226 | } |
227 | } |
227 | } |
228 | 228 | ||
Line 820... | Line 820... | ||
820 | || (viewer_index == current_viewer)) |
820 | || (viewer_index == current_viewer)) |
821 | { |
821 | { |
822 | the_board.players[viewer_index].view_pitch += (gui_y - prevgui_y) * 0.3f; |
822 | the_board.players[viewer_index].view_pitch += (gui_y - prevgui_y) * 0.3f; |
823 | if (the_board.players[viewer_index].view_pitch < 10.0f) |
823 | if (the_board.players[viewer_index].view_pitch < 10.0f) |
824 | the_board.players[viewer_index].view_pitch = 10.0f; // wrap angles around so that they |
824 | the_board.players[viewer_index].view_pitch = 10.0f; // wrap angles around so that they |
825 | if (the_board.players[viewer_index].view_pitch > 89. |
825 | if (the_board.players[viewer_index].view_pitch > 89.99f) |
826 | the_board.players[viewer_index].view_pitch = 89. |
826 | the_board.players[viewer_index].view_pitch = 89.99f; // stay in the [10, 89.99] bounds |
827 | 827 | ||
828 | the_board.players[viewer_index].view_yaw += (gui_x - prevgui_x) * 0.3f; |
828 | the_board.players[viewer_index].view_yaw += (gui_x - prevgui_x) * 0.3f; |
829 | the_board.players[viewer_index].view_yaw = WrapAngle (the_board.players[viewer_index].view_yaw); |
829 | the_board.players[viewer_index].view_yaw = WrapAngle (the_board.players[viewer_index].view_yaw); |
830 | 830 | ||
831 | // save these as the new custom angles |
831 | // save these as the new custom angles |