fix bug with 24 heures mode

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

Former-commit-id: bffdba0ad7e69eb048d9f723d3e64dc1bee659f1
Former-commit-id: 6f2b5c193ba0e160040c0b8e9031c694e8f12f39
This commit is contained in:
torcs-ng 2012-07-31 18:02:22 +00:00
parent 0eaa859bb3
commit f95e0f6f92
2 changed files with 8 additions and 8 deletions

View file

@ -335,14 +335,14 @@ typedef struct RmInfo
#define RM_VAL_TIME_DUSK "dusk" #define RM_VAL_TIME_DUSK "dusk"
#define RM_VAL_TIME_NIGHT "night" #define RM_VAL_TIME_NIGHT "night"
#define RM_VAL_TIME_NOW "now" #define RM_VAL_TIME_NOW "now"
#define RM_VAL_TIME_REAL "real"
#define RM_VAL_TIME_TRACK "from track" #define RM_VAL_TIME_TRACK "from track"
#define RM_VAL_TIME_RANDOM "random" #define RM_VAL_TIME_RANDOM "random"
#define RM_VAL_TIME_24HR "24 hour" #define RM_VAL_TIME_24HR "24 hour"
#define RM_VAL_TIME_REAL "real"
#define RM_VALS_TIME { RM_VAL_TIME_DAWN, RM_VAL_TIME_MORNING, RM_VAL_TIME_NOON, \ #define RM_VALS_TIME { RM_VAL_TIME_DAWN, RM_VAL_TIME_MORNING, RM_VAL_TIME_NOON, \
RM_VAL_TIME_AFTERNOON, RM_VAL_TIME_DUSK, RM_VAL_TIME_NIGHT, \ RM_VAL_TIME_AFTERNOON, RM_VAL_TIME_DUSK, RM_VAL_TIME_NIGHT, \
RM_VAL_TIME_NOW, RM_VAL_TIME_REAL, RM_VAL_TIME_TRACK, RM_VAL_TIME_RANDOM, \ RM_VAL_TIME_NOW, RM_VAL_TIME_TRACK, RM_VAL_TIME_RANDOM, \
RM_VAL_TIME_24HR} RM_VAL_TIME_24HR, RM_VAL_TIME_REAL}
// Indices for RM_VALS_TIME. // Indices for RM_VALS_TIME.
#define RM_IND_TIME_DAWN 0 #define RM_IND_TIME_DAWN 0
@ -352,10 +352,10 @@ typedef struct RmInfo
#define RM_IND_TIME_DUSK 4 #define RM_IND_TIME_DUSK 4
#define RM_IND_TIME_NIGHT 5 #define RM_IND_TIME_NIGHT 5
#define RM_IND_TIME_NOW 6 #define RM_IND_TIME_NOW 6
#define RM_IND_TIME_REAL 7 #define RM_IND_TIME_TRACK 7
#define RM_IND_TIME_TRACK 8 #define RM_IND_TIME_RANDOM 8
#define RM_IND_TIME_RANDOM 9 #define RM_IND_TIME_24HR 9
#define RM_IND_TIME_24HR 10 #define RM_IND_TIME_REAL 10
#define RM_VAL_CLOUDS_NONE "no cloud" #define RM_VAL_CLOUDS_NONE "no cloud"
#define RM_VAL_CLOUDS_FEW "few clouds" #define RM_VAL_CLOUDS_FEW "few clouds"

View file

@ -233,7 +233,7 @@ reTrackInitTimeOfDay(void)
case RM_IND_TIME_NIGHT: case RM_IND_TIME_NIGHT:
trackLocal->timeofday = 0 * 3600 + 0 * 60 + 0; // Midnight = 00:00:00 trackLocal->timeofday = 0 * 3600 + 0 * 60 + 0; // Midnight = 00:00:00
break; break;
case RM_IND_TIME_REAL:
case RM_IND_TIME_NOW: case RM_IND_TIME_NOW:
{ {
time_t t = time(0); time_t t = time(0);