… | |
… | |
1324 | faces [0] = top; faces_obj [0] = top != blank_face ? top_obj : 0; |
1324 | faces [0] = top; faces_obj [0] = top != blank_face ? top_obj : 0; |
1325 | faces [1] = middle; faces_obj [1] = middle != blank_face ? middle_obj : 0; |
1325 | faces [1] = middle; faces_obj [1] = middle != blank_face ? middle_obj : 0; |
1326 | faces [2] = floor; faces_obj [2] = floor != blank_face ? floor_obj : 0; |
1326 | faces [2] = floor; faces_obj [2] = floor != blank_face ? floor_obj : 0; |
1327 | } |
1327 | } |
1328 | |
1328 | |
1329 | void |
|
|
1330 | set_map_reset_time (maptile *map) |
|
|
1331 | { |
|
|
1332 | int timeout = map->reset_timeout; |
|
|
1333 | |
|
|
1334 | if (timeout <= 0) |
|
|
1335 | timeout = MAP_DEFAULTRESET; |
|
|
1336 | if (timeout >= MAP_MAXRESET) |
|
|
1337 | timeout = MAP_MAXRESET; |
|
|
1338 | |
|
|
1339 | map->reset_time = time (0) + timeout; |
|
|
1340 | } |
|
|
1341 | |
|
|
1342 | /* this updates the orig_map->tile_map[tile_num] value after loading |
1329 | /* this updates the orig_map->tile_map[tile_num] value after loading |
1343 | * the map. It also takes care of linking back the freshly loaded |
1330 | * the map. It also takes care of linking back the freshly loaded |
1344 | * maps tile_map values if it tiles back to this one. It returns |
1331 | * maps tile_map values if it tiles back to this one. It returns |
1345 | * the value of orig_map->tile_map[tile_num]. It really only does this |
1332 | * the value of orig_map->tile_map[tile_num]. It really only does this |
1346 | * so that it is easier for calling functions to verify success. |
1333 | * so that it is easier for calling functions to verify success. |
… | |
… | |
1490 | } |
1477 | } |
1491 | |
1478 | |
1492 | /* Simple case - coordinates are within this local |
1479 | /* Simple case - coordinates are within this local |
1493 | * map. |
1480 | * map. |
1494 | */ |
1481 | */ |
1495 | |
|
|
1496 | m->last_access = runtime; |
|
|
1497 | return m; |
1482 | return m; |
1498 | } |
1483 | } |
1499 | |
1484 | |
1500 | /** |
1485 | /** |
1501 | * Return whether map2 is adjacent to map1. If so, store the distance from |
1486 | * Return whether map2 is adjacent to map1. If so, store the distance from |