ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/init.C
(Generate patch)

Comparing deliantra/server/common/init.C (file contents):
Revision 1.31 by root, Thu Apr 12 14:18:04 2007 UTC vs.
Revision 1.34 by root, Thu May 17 13:24:54 2007 UTC

72 DATADIR, 72 DATADIR,
73 LOCALDIR, 73 LOCALDIR,
74 PLAYERDIR, MAPDIR, ARCHETYPES, REGIONS, TREASURES, 74 PLAYERDIR, MAPDIR, ARCHETYPES, REGIONS, TREASURES,
75 UNIQUE_DIR, TEMPLATE_DIR, 75 UNIQUE_DIR, TEMPLATE_DIR,
76 TMPDIR, 76 TMPDIR,
77 PK_LUCK_PENALTY,
77 STAT_LOSS_ON_DEATH, 78 STAT_LOSS_ON_DEATH,
78 PK_LUCK_PENALTY,
79 PERMANENT_EXPERIENCE_RATIO, 79 PERMANENT_EXPERIENCE_RATIO,
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,
85 SET_TITLE, 85 SET_TITLE,
86 RESURRECTION, 86 RESURRECTION,
87 SEARCH_ITEMS, 87 SEARCH_ITEMS,
88 SPELL_ENCUMBRANCE, 88 SPELL_ENCUMBRANCE,
89 SPELL_FAILURE_EFFECTS, 89 SPELL_FAILURE_EFFECTS,
90 SET_FRIENDLY_FIRE,
90 CASTING_TIME, 91 CASTING_TIME,
91 REAL_WIZ, 92 REAL_WIZ,
92 EXPLORE_MODE, 93 EXPLORE_MODE,
93 SPELLPOINT_LEVEL_DEPEND, 94 SPELLPOINT_LEVEL_DEPEND,
94 SET_FRIENDLY_FIRE,
95 MOTD, 95 MOTD,
96 "rules", 96 "rules",
97 "news", 97 "news",
98 "", /* DM_MAIL */ 98 "", /* DM_MAIL */
99 0, 0, 0, 0, 0, 0, 0, 0, /* worldmap settings */ 99 0, 0, 0, 0, 0, 0, 0, 0, /* worldmap settings */
148void 148void
149init_library (void) 149init_library (void)
150{ 150{
151 init_globals (); 151 init_globals ();
152 init_block (); 152 init_block ();
153 init_archetypes (); /* Reads all archetypes from file */
154 init_dynamic (); 153 init_dynamic ();
155 init_attackmess (); 154 init_attackmess ();
156 init_experience (); 155 init_experience ();
157} 156}
158 157
159
160/* init_environ initialises values from the environmental variables. 158/* init_environ initialises values from the environmental variables.
161 * it needs to be called very early, since command line options should 159 * it needs to be called very early, since command line options should
162 * overwrite these if specified. 160 * overwrite these if specified.
163 */ 161 */
164void 162void
167 char *cp; 165 char *cp;
168 166
169 cp = getenv ("CROSSFIRE_LIBDIR"); 167 cp = getenv ("CROSSFIRE_LIBDIR");
170 if (cp) 168 if (cp)
171 settings.datadir = cp; 169 settings.datadir = cp;
170
172 cp = getenv ("CROSSFIRE_LOCALDIR"); 171 cp = getenv ("CROSSFIRE_LOCALDIR");
173 if (cp) 172 if (cp)
174 settings.localdir = cp; 173 settings.localdir = cp;
174
175 cp = getenv ("CROSSFIRE_PLAYERDIR"); 175 cp = getenv ("CROSSFIRE_PLAYERDIR");
176 if (cp) 176 if (cp)
177 settings.playerdir = cp; 177 settings.playerdir = cp;
178
178 cp = getenv ("CROSSFIRE_MAPDIR"); 179 cp = getenv ("CROSSFIRE_MAPDIR");
179 if (cp) 180 if (cp)
180 settings.mapdir = cp; 181 settings.mapdir = cp;
182
181 cp = getenv ("CROSSFIRE_ARCHETYPES"); 183 cp = getenv ("CROSSFIRE_ARCHETYPES");
182 if (cp) 184 if (cp)
183 settings.archetypes = cp; 185 settings.archetypes = cp;
186
184 cp = getenv ("CROSSFIRE_TREASURES"); 187 cp = getenv ("CROSSFIRE_TREASURES");
185 if (cp) 188 if (cp)
186 settings.treasures = cp; 189 settings.treasures = cp;
190
187 cp = getenv ("CROSSFIRE_UNIQUEDIR"); 191 cp = getenv ("CROSSFIRE_UNIQUEDIR");
188 if (cp) 192 if (cp)
189 settings.uniquedir = cp; 193 settings.uniquedir = cp;
194
190 cp = getenv ("CROSSFIRE_TEMPLATEDIR"); 195 cp = getenv ("CROSSFIRE_TEMPLATEDIR");
191 if (cp) 196 if (cp)
192 settings.templatedir = cp; 197 settings.templatedir = cp;
198
193 cp = getenv ("CROSSFIRE_TMPDIR"); 199 cp = getenv ("CROSSFIRE_TMPDIR");
194 if (cp) 200 if (cp)
195 settings.tmpdir = cp; 201 settings.tmpdir = cp;
196} 202}
197 203
233 } 239 }
234 240
235 at = at->next; 241 at = at->next;
236 } 242 }
237 243
238 LOG (llevDebug, "You Need a archetype called 'map' and it have to contain start map\n"); 244 LOG (llevDebug, "You need an archetype of type 'map' and it has to contain the player start map\n");
239 exit (-1); 245 exit (-1);
240} 246}
241 247
242/* 248/*
243 * initialises the attack messages. 249 * initialises the attack messages.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines