Re: Using Torcs Championship Server in text mode
Tambet Matiisen <[email protected]> Wed, 6 Apr 2016 14:33:37 +0300
| Newsgroups | gmane.games.torcs.general |
|---|---|
| Message-ID | <[email protected]> |
Thanks for following up!
I made some experiments myself and was able to get text mode working
with following modifications:
src/libs/raceengineclient/racestate.cpp line 117 comment out following
line:
//GfuiScreenActivate(ReInfo->_reGameScreen);
src/linux/main.cpp line 173 add infinite loop around ReRunRaceOnConsole():
while (true) {
ReRunRaceOnConsole(raceconfig);
}
Probably it will break the GUI mode, but it's enough for me at the moment.
Keep in mind, that these are changes in 1.3.4 after applying SCR server
patch 2.1.
Tambet
On 6.04.2016 13:55, Arnaud Ceyrolle wrote:
>
> Hmmmm, it seems your modification is the same !
>
> Prehaps you meant == 1
>
> --
> Arnaud (mobile)
>
> Le 6 avr. 2016 04:45, "David Savinkoff" <[email protected]
> <mailto:[email protected]>> a écrit :
>
> ----- 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.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Torcs-users mailing list
> [email protected]
> <mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/torcs-users
>
>
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> Torcs-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/torcs-users
------------------------------------------------------------------------------
_______________________________________________
Torcs-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/torcs-users