@@ -226,25 +226,37 @@ function movedown(%val)
226
226
function turnLeft( % val )
227
227
{
228
228
setMvExtras ( ) ;
229
- $mvYawRightSpeed = % val ? $Pref ::Input ::KeyboardTurnSpeed : 0 ;
229
+ $mvDeviceIsKeyboardMouse = false;
230
+ $mvAutoCenterCamera = $pref ::Input ::AutoCenterCamera ;
231
+ % scale = ( ServerConnection . gameState $= "wait ") ? - 0.1 : 3.14 * 100 ;
232
+ $mvYawRightSpeed = % val ? $Pref ::Input ::KeyboardTurnSpeed * % scale : 0 ;
230
233
}
231
234
232
235
function turnRight ( % val )
233
236
{
234
237
setMvExtras ( ) ;
235
- $mvYawLeftSpeed = % val ? $Pref ::Input ::KeyboardTurnSpeed : 0 ;
238
+ $mvDeviceIsKeyboardMouse = false ;
239
+ $mvAutoCenterCamera = $pref ::Input ::AutoCenterCamera ;
240
+ % scale = ( ServerConnection . gameState $= "wait" ) ? - 0.1 : 3.14 * 100 ;
241
+ $mvYawLeftSpeed = % val ? $Pref ::Input ::KeyboardTurnSpeed * % scale : 0 ;
236
242
}
237
243
238
244
function panUp ( % val )
239
245
{
240
246
setMvExtras ( ) ;
241
- $mvPitchDownSpeed = % val ? $Pref ::Input ::KeyboardTurnSpeed : 0 ;
247
+ $mvDeviceIsKeyboardMouse = false ;
248
+ $mvAutoCenterCamera = $pref ::Input ::AutoCenterCamera ;
249
+ % scale = ( ServerConnection . gameState $= "wait" ) ? - 0.1 : 3.14 * 100 ;
250
+ $mvPitchDownSpeed = % val ? $Pref ::Input ::KeyboardTurnSpeed * % scale : 0 ;
242
251
}
243
252
244
253
function panDown ( % val )
245
254
{
246
255
setMvExtras ( ) ;
247
- $mvPitchUpSpeed = % val ? $Pref ::Input ::KeyboardTurnSpeed : 0 ;
256
+ $mvDeviceIsKeyboardMouse = false ;
257
+ $mvAutoCenterCamera = $pref ::Input ::AutoCenterCamera ;
258
+ % scale = ( ServerConnection . gameState $= "wait" ) ? - 0.1 : 3.14 * 100 ;
259
+ $mvPitchUpSpeed = % val ? $Pref ::Input ::KeyboardTurnSpeed * % scale : 0 ;
248
260
}
249
261
250
262
function getMouseAdjustAmount ( % val )
@@ -372,6 +384,19 @@ function centercam(%val)
372
384
$mvTriggerCount3 ++ ;
373
385
}
374
386
387
+ function restartLevelBind ( % val )
388
+ {
389
+ if ( % val )
390
+ {
391
+ if ( ! ServerConnection . isMultiplayer && ServerConnection . gameState ! $= "wait" )
392
+ {
393
+ if ( $GameEndNoAllowPause )
394
+ return ;
395
+ restartLevel ( ) ;
396
+ }
397
+ }
398
+ }
399
+
375
400
function cycleDebugPredTiles ( )
376
401
{
377
402
$curTile ++ ;
@@ -645,6 +670,19 @@ function clearInputs()
645
670
moveMap . bind ( keyboard , "ENTER" , GlobalChat ) ;
646
671
//moveMap.bind(keyboard, "y", TeamChat);
647
672
673
+ // Extra binds
674
+ // ------------
675
+ moveMap . bind ( keyboard , q , mouseFire ) ;
676
+ moveMap . bind ( keyboard , e , altTrigger ) ;
677
+
678
+ moveMap . bind ( keyboard , left , turnLeft ) ;
679
+ moveMap . bind ( keyboard , right , turnRight ) ;
680
+ moveMap . bind ( keyboard , up , panUp ) ;
681
+ moveMap . bind ( keyboard , down , panDown ) ;
682
+
683
+ moveMap . bind ( keyboard , r , restartLevelBind ) ;
684
+ // ------------
685
+
648
686
// mouse
649
687
moveMap . bind ( mouse , button0 , mouseFire ) ;
650
688
moveMap . bind ( mouse , button1 , altTrigger ) ;
0 commit comments