… | |
… | |
80 | DEATH_PENALTY_RATIO, |
80 | DEATH_PENALTY_RATIO, |
81 | DEATH_PENALTY_LEVEL, |
81 | DEATH_PENALTY_LEVEL, |
82 | BALANCED_STAT_LOSS, |
82 | BALANCED_STAT_LOSS, |
83 | NOT_PERMADETH, |
83 | NOT_PERMADETH, |
84 | SIMPLE_EXP, |
84 | SIMPLE_EXP, |
85 | RESET_LOCATION_TIME, |
|
|
86 | SET_TITLE, |
85 | SET_TITLE, |
87 | RESURRECTION, |
86 | RESURRECTION, |
88 | SEARCH_ITEMS, |
87 | SEARCH_ITEMS, |
89 | SPELL_ENCUMBRANCE, |
88 | SPELL_ENCUMBRANCE, |
90 | SPELL_FAILURE_EFFECTS, |
89 | SPELL_FAILURE_EFFECTS, |
… | |
… | |
198 | cp = getenv ("CROSSFIRE_TMPDIR"); |
197 | cp = getenv ("CROSSFIRE_TMPDIR"); |
199 | if (cp) |
198 | if (cp) |
200 | settings.tmpdir = cp; |
199 | settings.tmpdir = cp; |
201 | } |
200 | } |
202 | |
201 | |
203 | |
|
|
204 | /* |
202 | /* |
205 | * Initialises all global variables. |
203 | * Initialises all global variables. |
206 | * Might use environment-variables as default for some of them. |
204 | * Might use environment-variables as default for some of them. |
207 | */ |
205 | */ |
208 | |
|
|
209 | void |
206 | void |
210 | init_globals (void) |
207 | init_globals (void) |
211 | { |
208 | { |
212 | if (settings.logfilename[0] == 0) |
209 | if (settings.logfilename[0] == 0) |
213 | logfile = stderr; |
210 | logfile = stderr; |
… | |
… | |
250 | |
247 | |
251 | /* |
248 | /* |
252 | * Write out the current time to the file so time does not |
249 | * Write out the current time to the file so time does not |
253 | * reset every time the server reboots. |
250 | * reset every time the server reboots. |
254 | */ |
251 | */ |
255 | |
|
|
256 | void |
252 | void |
257 | write_todclock (void) |
253 | write_todclock (void) |
258 | { |
254 | { |
259 | char filename[MAX_BUF]; |
255 | char filename[MAX_BUF]; |
260 | FILE *fp; |
256 | FILE *fp; |
… | |
… | |
271 | |
267 | |
272 | /* |
268 | /* |
273 | * initialises the gametime and TOD counters |
269 | * initialises the gametime and TOD counters |
274 | * Called by init_library(). |
270 | * Called by init_library(). |
275 | */ |
271 | */ |
276 | |
|
|
277 | void |
272 | void |
278 | init_clocks (void) |
273 | init_clocks (void) |
279 | { |
274 | { |
280 | char filename[MAX_BUF]; |
275 | char filename[MAX_BUF]; |
281 | FILE *fp; |
276 | FILE *fp; |
… | |
… | |
293 | LOG (llevError, "Can't open %s.\n", filename); |
288 | LOG (llevError, "Can't open %s.\n", filename); |
294 | todtick = 0; |
289 | todtick = 0; |
295 | write_todclock (); |
290 | write_todclock (); |
296 | return; |
291 | return; |
297 | } |
292 | } |
|
|
293 | |
298 | fscanf (fp, "%lu", &todtick); |
294 | fscanf (fp, "%lu", &todtick); |
299 | LOG (llevDebug, "todtick=%lu\n", todtick); |
295 | LOG (llevDebug, "todtick=%lu\n", todtick); |
300 | fclose (fp); |
296 | fclose (fp); |
301 | } |
297 | } |
302 | |
298 | |