Rev 140 | Rev 172 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 140 | Rev 171 | ||
---|---|---|---|
Line 45... | Line 45... | ||
45 | // reset all selection and hovering information |
45 | // reset all selection and hovering information |
46 | Board_SetSelectedAndHovered (board, -1, -1, -1, -1); |
46 | Board_SetSelectedAndHovered (board, -1, -1, -1, -1); |
47 | 47 | ||
48 | // notify that board was just set up |
48 | // notify that board was just set up |
49 | board->was_setup = true; |
49 | board->was_setup = true; |
- | 50 | board->players[COLOR_WHITE].should_wakeup = true; |
|
50 | board-> |
51 | board->players[COLOR_BLACK].should_wakeup = true; |
51 | board->reevaluate = true; |
52 | board->reevaluate = true; |
52 | 53 | ||
53 | return (is_success); // finished |
54 | return (is_success); // finished |
54 | } |
55 | } |
55 | 56 | ||
Line 122... | Line 123... | ||
122 | // reset all selection and hovering information |
123 | // reset all selection and hovering information |
123 | Board_SetSelectedAndHovered (board, -1, -1, -1, -1); |
124 | Board_SetSelectedAndHovered (board, -1, -1, -1, -1); |
124 | 125 | ||
125 | // notify that board was just set up |
126 | // notify that board was just set up |
126 | board->was_setup = true; |
127 | board->was_setup = true; |
- | 128 | board->players[COLOR_WHITE].should_wakeup = true; |
|
127 | board-> |
129 | board->players[COLOR_BLACK].should_wakeup = true; |
128 | 130 | ||
129 | return (is_success); // finished |
131 | return (is_success); // finished |
130 | } |
132 | } |
131 | 133 | ||
132 | 134 | ||
Line 147... | Line 149... | ||
147 | Board_SwapSides (board); // if so, swap board sides |
149 | Board_SwapSides (board); // if so, swap board sides |
148 | board->want_playerswap = false; // don't do this all day long |
150 | board->want_playerswap = false; // don't do this all day long |
149 | do_update |= true; // and update the scene |
151 | do_update |= true; // and update the scene |
150 | } |
152 | } |
151 | 153 | ||
152 | // clear board |
154 | // clear board setup notification |
153 | board->was_setup = false; |
155 | board->was_setup = false; |
154 | board->has_playerchanged = false; |
- | |
155 | 156 | ||
156 | return (do_update); // finished, return whether we update the scene or not |
157 | return (do_update); // finished, return whether we update the scene or not |
157 | } |
158 | } |
158 | 159 | ||
159 | 160 | ||
Line 183... | Line 184... | ||
183 | 184 | ||
184 | // turn their point of view 180 degrees |
185 | // turn their point of view 180 degrees |
185 | board->players[COLOR_BLACK].view_yaw = WrapAngle (board->players[COLOR_BLACK].view_yaw + 180.0f); |
186 | board->players[COLOR_BLACK].view_yaw = WrapAngle (board->players[COLOR_BLACK].view_yaw + 180.0f); |
186 | board->players[COLOR_WHITE].view_yaw = WrapAngle (board->players[COLOR_WHITE].view_yaw + 180.0f); |
187 | board->players[COLOR_WHITE].view_yaw = WrapAngle (board->players[COLOR_WHITE].view_yaw + 180.0f); |
187 | 188 | ||
188 | // now unlock all the players' buffers |
189 | // now unlock all the players' buffers and have them sleep for 2 seconds |
189 | board->players[COLOR_BLACK].sendbuffer_locked = false; |
190 | board->players[COLOR_BLACK].sendbuffer_locked = false; |
190 | board->players[COLOR_WHITE].sendbuffer_locked = false; |
191 | board->players[COLOR_WHITE].sendbuffer_locked = false; |
- | 192 | board->players[COLOR_BLACK].sleep_time = current_time + 2.0f; |
|
- | 193 | board->players[COLOR_WHITE].sleep_time = current_time + 2.0f; |
|
191 | 194 | ||
192 | board->reevaluate = true; // remember to reevaluate this board |
195 | board->reevaluate = true; // remember to reevaluate this board |
193 | 196 | ||
194 | return; // finished |
197 | return; // finished |
195 | } |
198 | } |