Re: Breaking the 10-limit : Problems/Questions for Windows build

Annick et Jean-Philippe <[email protected]>
Newsgroups gmane.games.torcs.devel
Message-ID <[email protected]>
Hi, Mart, and all.

This is a new version of the second half
of the "no maximum number of interfaces for Torcs modules" patch.

It fixes the issues you detected in linux/windowsModLoad function :

- if the module is already present in the modlist, it is not reloaded,
   BUT the associated modlist item is moved to the head of the list
   (raceinit.cpp needs that, and the lack of it in previous version
    DID really lead to bad car<->robot assignements in certain cases
    like the following racing driver list: bt 1, inferno 2, bt 4
    => inferno 4 robot/car used in place of bt 2)
   Moreover, even if linux/windowsModInfo is never used, I made the same fix
   in it and also removed the priority sorting while adding the modinfo item
   (this was a bug, wasn't it ?), to be fully consistent.

- added documentation about the fact that modules are not reloaded
   if already present in the list WITH EQUAL SOPATH, but are reloaded
   each time a different sopath is used for the associated library
   (ex: relative and absolute one). As far as I can see, this is sufficient
   in current torcs code to avoid loading twice the same module ...

About the calloc check (does it return 0 ?), I did not change anything,
but I'm open to any suggestion.

Regards,

Jean-Philippe.

PS: Tested on Linux Mandriva 2008.0 GCC 4.2.2 rc x86_64
and Windows XP SP2 VC6 SP6

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

_______________________________________________
Torcs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/torcs-devel
noMaxModuleInterfaces.half2.patch.bz2 (application/x-bzip, 13.9 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.