Fixed Kilo2008 not building under Ruin'dows after r5302

Fixed game crash at Simplix and USR load-time when data not installed for some driver sets (useful when using a light/partial source tree)

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5322 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 18f3b51c3cdec30e559f1f84e52939b37a559a9b
Former-commit-id: 296c794f4c960266ba0b94dee841c49ba30e1a84
This commit is contained in:
pouillot 2013-03-16 10:28:12 +00:00
parent d2919b6748
commit 1a05db2e08
3 changed files with 13 additions and 12 deletions

View file

@ -159,6 +159,7 @@ extern "C" int moduleWelcome(const tModWelcomeIn* welcomeIn,
} else { // if robot settings XML could not be read
// For schismatic robots NBBOTS is unknown! Handle error here
NBBOTS = 0;
// But this is not considered a real failure of moduleWelcome !
} // if pRobotSettings
setupKilo2008();
@ -226,9 +227,9 @@ extern "C" int kilo2008(tModInfo *modInfo) {
// Module exit point (TORCS backward compatibility scheme).
extern "C" int kiloShutdown() {
extern "C" int kilo2008Shut() {
return moduleTerminate();
} // kiloShutdown
} // kilo2008Shut
// Module interface initialization.

View file

@ -502,8 +502,7 @@ int moduleWelcomeV1_00
GetLocalDir(),GetDataDir(),RobPathXMLRel);
NBBOTS = 0;
welcomeOut->maxNbItf = NBBOTS;
return -1;
// But this is not considered a real failure of moduleWelcome !
}
// Handle additional settings for wellknown identities

View file

@ -333,24 +333,25 @@ extern "C" int moduleWelcome(const tModWelcomeIn* welcomeIn,
} else {
// For schismatic robots NBBOTS is unknown!
// Handle error here
NBBOTS = 1;
NBBOTS = 0;
// But this is not considered a real failure of moduleWelcome !
}
GfOut("NBBOTS: %d (of %d)\n", NBBOTS, MAXNBBOTS);
if (strncmp(robot_name, "usr_trb1", strlen("usr_trb1")) == 0)
SetupUSR_trb1();
SetupUSR_trb1();
else if (strncmp(robot_name,"usr_sc", strlen("usr_sc")) == 0)
SetupUSR_sc();
SetupUSR_sc();
else if (strncmp(robot_name,"usr_ls1", strlen("usr_ls1")) == 0)
SetupUSR_ls1();
SetupUSR_ls1();
else if (strncmp(robot_name,"usr_ls2", strlen("usr_ls2")) == 0)
SetupUSR_ls2();
SetupUSR_ls2();
else if (strncmp(robot_name,"usr_36GP", strlen("usr_36GP")) == 0)
SetupUSR_36GP();
SetupUSR_36GP();
else if (strncmp(robot_name,"usr_rs", strlen("usr_rs")) == 0)
SetupUSR_rs();
SetupUSR_rs();
else if (strncmp(robot_name,"usr_lp1", strlen("usr_lp1")) == 0)
SetupUSR_lp1();
SetupUSR_lp1();
// Set max nb of interfaces to return.
welcomeOut->maxNbItf = NBBOTS;