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

Comparing deliantra/server/server/build_map.C (file contents):
Revision 1.9 by elmex, Mon Dec 4 15:15:34 2006 UTC vs.
Revision 1.10 by elmex, Mon Dec 4 15:48:13 2006 UTC

214{ 214{
215 object *wall; 215 object *wall;
216 216
217 wall = GET_MAP_OB (map, x, y); 217 wall = GET_MAP_OB (map, x, y);
218 while (wall && (WALL != wall->type)) 218 while (wall && (WALL != wall->type))
219 {
220 wall = wall->above; 219 wall = wall->above;
221 }
222 220
223 return wall; 221 return wall;
224} 222}
225 223
226/** 224/**
254 252
255 /* Find base name */ 253 /* Find base name */
256 strcpy (archetype, wall->arch->name); 254 strcpy (archetype, wall->arch->name);
257 underscore = strchr (archetype, '_'); 255 underscore = strchr (archetype, '_');
258 256
257 /* search for the first _ before a number */
258 while (underscore && !isdigit (*(underscore + 1)))
259 underscore = strchr (underscore + 1, '_');
260
259 if (!underscore || (!isdigit (*(underscore + 1)))) 261 if (!underscore || !isdigit (*(underscore + 1)))
260 /* Not in a format we can change, bail out */ 262 /* Not in a format we can change, bail out */
261 return; 263 return;
262 264
263 underscore++; 265 underscore++;
264 *underscore = '\0'; 266 *underscore = '\0';

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines