The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 752 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(959) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(959) : eval()'d code 34 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5308 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5308 errorHandler->error
/global.php 1024 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1429 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 1 - Line: 866 - File: inc/class_parser.php PHP 8.1.27 (Linux)
File Line Function
/inc/class_parser.php 866 errorHandler->error
/inc/class_parser.php 938 postParser->mycode_parse_post_quotes
[PHP] postParser->mycode_parse_post_quotes_callback1
/inc/class_parser.php 816 preg_replace_callback
/inc/class_parser.php 451 postParser->mycode_parse_quotes
/inc/class_parser.php 201 postParser->parse_mycode
/printthread.php 179 postParser->parse_message
Warning [2] Undefined array key 1 - Line: 885 - File: inc/class_parser.php PHP 8.1.27 (Linux)
File Line Function
/inc/class_parser.php 885 errorHandler->error
/inc/class_parser.php 938 postParser->mycode_parse_post_quotes
[PHP] postParser->mycode_parse_post_quotes_callback1
/inc/class_parser.php 816 preg_replace_callback
/inc/class_parser.php 451 postParser->mycode_parse_quotes
/inc/class_parser.php 201 postParser->parse_mycode
/printthread.php 179 postParser->parse_message
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Forums
another improvement for poor keyboard players - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4)
+--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9)
+--- Thread: another improvement for poor keyboard players (/showthread.php?tid=34)



another improvement for poor keyboard players - [The_Real_Neo] - 07-15-2005

Hi there, I'm back with another little function very usefull for keyboard players : THE AUTO CLUTCH...The problem is that with a keyboard, you can't brake, control the car, engage a lower gear and engage the clutch in the same time so, these little adds can simulate an auto clutch which simply reengage the clutch after a gear change...so first, we create a variable which will be true when the auto clutch system is activated.in vamosworld.h :<pre>private bool auto_clutch;</pre>we deactivate it by default : (in vamosworld.cc at the begining of the constructor)<pre>auto_clutch = false;</pre>ok now the main part of this function, we got to reengage the clutch after having changing the gear. Go in vamosworld.cc in DoOp and change the code like this :<pre> ... else if (dofunction == "disengage_shift_up") { world-&gt;focused_car ()-&gt;car-&gt;disengage_clutch (0.2); world-&gt;focused_car ()-&gt;car-&gt;shift_up (); if (auto_clutch) { DoOp("engage", 0, 0, false, 0, 0); } } else if (dofunction == "disengage_shift_down") { world-&gt;focused_car ()-&gt;car-&gt;disengage_clutch (0.2); world-&gt;focused_car ()-&gt;car-&gt;shift_down (); if (auto_clutch) { DoOp("engage", 0, 0, false, 0, 0); } } ...</pre>ok now it can be usefull to be able to activate it thru the Option menu. First we will create the function called by the menu item like this (in vamosworld.cc : end of file)<pre>void VAMOSWORLD::ToggleAutoClutch(){ auto_clutch = !auto_clutch;}</pre>we got to declare the function, so in vamosworld.h :<pre>public ToggleAutoClutch();</pre>Now we got to link the menu item and the function, it can be done like this (in menu.cc : Go) :<pre> ... else if (curmenu == "HUDToggle") { //ToggleFPSDisplay(); world.ToggleHUD(); Go("Options"); } else if (curmenu == "ClutchToggle") { world.ToggleAutoClutch(); Go("Options"); } else { ...</pre>and we can now create the menu item, to do it, simply go to runtime/list/menu and in the Option file, add (before the "back to main menu" button) :<pre>Toggle Auto-clutchClutchToglle !</pre>ehe there we are ! there's a last problem, the player has to know when the auto clutch is activated, let's go in vamosworld.cc : DrawHud and we add this at the end of th function :<pre>if (world-&gt;auto_clutch) { cy += 0.01; sprintf(tempchar, "auto clutch engaged"); font.Print(cx, cy, tempchar, 1, 5, 1, 0, 0, 0); cy += 0.02;}</pre>now, rebuild with make, copy src/vdrift in runtime/ and enjoy it poor keyboard player SmileI don't know if this little add respect the game spirit but it really really helps the keyboard players so why not this in the next release ?


another improvement for poor keyboard players - joevenzon - 07-16-2005

Yeah, I'll put it (or something very similar) into the next release. Keyboard improvements are top priority.I'm also planning to add speed-sensitive turning as well as intelligent acceleration and braking that attempts to avoid excessive wheelspin or locking the brakes.


another improvement for poor keyboard players - joevenzon - 07-17-2005

Okay, keyboard controls can now be set up to trigger when the key goes down or up. For the next VDrift release, disengage shift up is PAGEDOWN and disengage shift down is DELETE, like it is now. The difference is that PAGEDOWN and DELETE are also bound to engage (on key up). So when you want to shift up, you press PAGEDOWN which shifts the gear up and disengages the clutch, then when you release the PAGEDOWN key the clutch re-engages.


another improvement for poor keyboard players - thelusiv - 07-17-2005

joevenzon Wrote:So when you want to shift up, you press PAGEDOWN which shifts the gear up and disengages the clutch, then when you release the PAGEDOWN key the clutch re-engages.
So is clutch engage assigned as 2 key up entries in the control options, or is it hard-coded to re-engage on the up event of the shifter keys? Sorry if my workding is confusing...


another improvement for poor keyboard players - joevenzon - 07-18-2005

assigned as 2 key entries


another improvement for poor keyboard players - [The_Real_Neo] - 07-18-2005

great solution, nice work