@@ -161,27 +161,20 @@ void Player_update1 ( OBJECT *obj )
161
161
player1 -> rot = - MAX_ROT ;
162
162
}
163
163
164
- if ( (gv -> key_LEFT1 == FALSE) && (gv -> key_RIGHT1 == FALSE) )
164
+ if ( (gv -> key_LEFT1 == FALSE) && (gv -> key_RIGHT1 == FALSE) && \
165
+ player1 -> rot )
165
166
{
166
- /* please re-do this major hackyness */
167
- if ( ( player1 -> rot < -0.03 ) ||
168
- ( player1 -> rot > 0.03 ) )
167
+ if (player1 -> rot > 0 )
169
168
{
170
- if ( player1 -> rot < -0.03 )
171
- {
172
- player1 -> rot += ROT_Z * gv -> fadjust ;
173
- if ( player1 -> rot > 0.0 )
174
- player1 -> rot = 0.0 ;
175
- }
176
- else
177
- {
178
- if ( player1 -> rot > 0.03 )
179
- {
180
- player1 -> rot -= ROT_Z * gv -> fadjust ;
181
- if ( player1 -> rot < 0.0 )
182
- player1 -> rot = 0.0 ;
183
- }
184
- }
169
+ player1 -> rot -= ROT_Z * gv -> fadjust ;
170
+ if (player1 -> rot < 0 )
171
+ player1 -> rot = 0 ;
172
+ }
173
+ else
174
+ {
175
+ player1 -> rot += ROT_Z * gv -> fadjust ;
176
+ if (player1 -> rot > 0 )
177
+ player1 -> rot = 0 ;
185
178
}
186
179
}
187
180
@@ -239,27 +232,20 @@ void Player_update2 ( OBJECT *obj )
239
232
player2 -> rot = - MAX_ROT ;
240
233
}
241
234
242
- if ( (gv -> key_LEFT2 == FALSE) && (gv -> key_RIGHT2 == FALSE) )
235
+ if ( (gv -> key_LEFT2 == FALSE) && (gv -> key_RIGHT2 == FALSE) && \
236
+ player2 -> rot )
243
237
{
244
- /* please re-do this major hackyness */
245
- if ( ( player2 -> rot < -0.03 ) || \
246
- ( player2 -> rot > 0.03 ) )
238
+ if (player2 -> rot > 0 )
247
239
{
248
- if ( player2 -> rot < -0.03 )
249
- {
250
- player2 -> rot += ROT_Z * gv -> fadjust ;
251
- if ( player2 -> rot > 0.0 )
252
- player2 -> rot = 0.0 ;
253
- }
254
- else
255
- {
256
- if ( player2 -> rot > 0.03 )
257
- {
258
- player2 -> rot -= ROT_Z * gv -> fadjust ;
259
- if ( player2 -> rot < 0.0 )
260
- player2 -> rot = 0.0 ;
261
- }
262
- }
240
+ player2 -> rot -= ROT_Z * gv -> fadjust ;
241
+ if (player2 -> rot < 0 )
242
+ player2 -> rot = 0 ;
243
+ }
244
+ else
245
+ {
246
+ player2 -> rot += ROT_Z * gv -> fadjust ;
247
+ if (player2 -> rot > 0 )
248
+ player2 -> rot = 0 ;
263
249
}
264
250
}
265
251
0 commit comments