ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/Client.xs
(Generate patch)

Comparing deliantra/Deliantra-Client/Client.xs (file contents):
Revision 1.145 by root, Fri Aug 18 03:19:58 2006 UTC vs.
Revision 1.146 by root, Sat Aug 19 02:49:53 2006 UTC

294static void 294static void
295map_blank (CFPlus__Map self, int x0, int y0, int w, int h) 295map_blank (CFPlus__Map self, int x0, int y0, int w, int h)
296{ 296{
297 int x, y; 297 int x, y;
298 maprow *row; 298 maprow *row;
299 mapcell *cell;
299 300
300 for (y = y0; y < y0 + h; y++) 301 for (y = y0; y < y0 + h; y++)
301 if (y >= 0) 302 if (y >= 0)
302 { 303 {
303 if (y >= self->rows) 304 if (y >= self->rows)
309 if (x >= row->c0) 310 if (x >= row->c0)
310 { 311 {
311 if (x >= row->c1) 312 if (x >= row->c1)
312 break; 313 break;
313 314
314 row->col[x - row->c0].darkness = 0; 315 cell = row->col + x - row->c0;
316
317 cell->darkness = 0;
318 cell->stat_hp = 0;
315 } 319 }
316 } 320 }
317} 321}
318 322
319static void 323static void
1286 { 1290 {
1287 cell->darkness = 256; 1291 cell->darkness = 256;
1288 cell->face [0] = 0; 1292 cell->face [0] = 0;
1289 cell->face [1] = 0; 1293 cell->face [1] = 0;
1290 cell->face [2] = 0; 1294 cell->face [2] = 0;
1291 cell->stat_hp = 0;
1292 } 1295 }
1293 1296
1294 //TODO: don't trust server data to be in-range(!) 1297 //TODO: don't trust server data to be in-range(!)
1295 1298
1296 if (flags & 8) 1299 if (flags & 8)
1331 { 1334 {
1332 cell->face [2] = self->face [(data [0] << 8) + data [1]]; data += 2; 1335 cell->face [2] = self->face [(data [0] << 8) + data [1]]; data += 2;
1333 } 1336 }
1334 } 1337 }
1335 else 1338 else
1339 {
1336 cell->darkness = 0; 1340 cell->darkness = 0;
1341 cell->stat_hp = 0;
1342 }
1337 } 1343 }
1338} 1344}
1339 1345
1340SV * 1346SV *
1341mapmap (CFPlus::Map self, int x0, int y0, int w, int h) 1347mapmap (CFPlus::Map self, int x0, int y0, int w, int h)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines