Re: Using Torcs Championship Server in text mode
David Savinkoff <[email protected]> Tue, 5 Apr 2016 20:45:18 -0600 (MDT)
| Newsgroups | gmane.games.torcs.general |
|---|---|
| Message-ID | <886709732.30221957.1459910718349.JavaMail.zimbra@mailid.telus.net> |
----- Tambet Matiisen wrote: > Hi everyone! > > I'm not sure if this is the right place to ask, but I'll do it anyway > :). I'm trying to run Torcs 1.3.4 with Championship Server patch in text > mode. The manual (http://arxiv.org/pdf/1304.1672v2.pdf) suggests > something like this: > > torcs -r ~/.torcs/config/raceman/quickrace.xml > > It all appears to run fine, until I ask for restart, in which case it > crashes with following error: > > Waiting for request on port 3001 > ******* RESTARTING ***** > freeglut ERROR: Function <glutKeyboardFunc> called without first > calling 'glutInit'. > > It can be easily reproduced with the client coming with SCR patch - from > scr-client-app folder run > > ./client maxSteps:100 > > I guess the restarting code assumes graphical mode, which is weird, glutKeyboardFunc() is a non graphical gl-ut-ility for reading the keyboard. > because one would think that restarting would be especially useful in > text mode. Do you think it would be easy to fix? I have some rusty > knowledge of C/C++, but the codebase it too big to grasp in short time. > > Thanks! > Tambet > Open patch.dat with a text editor (gvim works) and search for: RestartRaceHookInit RestartRaceHookInit() is prevented from executing because of: if (RESTART!=1) Modify torcs/src/libs/raceengineclient/racemain.cpp by modifying if (RESTART!=1) then do a make in the torcs directory ... and whatever else was required rebuild the code. Disclaimer: This is my best guess. ------------------------------------------------------------------------------