… | |
… | |
204 | if (object *golem = contr->golem) |
204 | if (object *golem = contr->golem) |
205 | { |
205 | { |
206 | int i = find_free_spot (golem, newmap, x, y, 1, SIZEOFFREE); |
206 | int i = find_free_spot (golem, newmap, x, y, 1, SIZEOFFREE); |
207 | |
207 | |
208 | if (i < 0) |
208 | if (i < 0) |
209 | { |
|
|
210 | golem->destroy_inv (true); // be explicit about dropping |
|
|
211 | golem->destroy (true); |
209 | golem->drop_and_destroy (); |
212 | } |
|
|
213 | else |
210 | else |
214 | { |
211 | { |
215 | newmap->insert (golem, x + freearr_x[i], y + freearr_y[i]); |
212 | newmap->insert (golem, x + freearr_x[i], y + freearr_y[i]); |
216 | golem->direction = find_dir_2 (x - golem->x, y - golem->y); |
213 | golem->direction = find_dir_2 (x - golem->x, y - golem->y); |
217 | } |
214 | } |
… | |
… | |
419 | { |
416 | { |
420 | shstr::gc (); |
417 | shstr::gc (); |
421 | archetype::gc (); |
418 | archetype::gc (); |
422 | |
419 | |
423 | if (expect_false (!(pticks % TICKS_PER_HOUR))) |
420 | if (expect_false (!(pticks % TICKS_PER_HOUR))) |
424 | adjust_daylight (); |
421 | maptile::adjust_daylight (); |
425 | |
422 | |
426 | if (expect_false (!(pticks % 2503))) |
423 | if (expect_false (!(pticks % 2503))) |
427 | fix_weight (); /* Hack to fix weightproblems caused by bugs */ |
424 | fix_weight (); /* Hack to fix weightproblems caused by bugs */ |
428 | |
425 | |
429 | if (expect_false (!(pticks % 5003))) |
426 | if (expect_false (!(pticks % 5003))) |
… | |
… | |
582 | void (*__malloc_initialize_hook)(void) = tr_on; |
579 | void (*__malloc_initialize_hook)(void) = tr_on; |
583 | |
580 | |
584 | #endif |
581 | #endif |
585 | |
582 | |
586 | // normal main |
583 | // normal main |
|
|
584 | //276637068 slice |
|
|
585 | //394141716 |
587 | int |
586 | int |
588 | main (int argc, char **argv) |
587 | main (int argc, char **argv) |
589 | { |
588 | { |
590 | settings.argc = argc; |
589 | settings.argc = argc; |
591 | settings.argv = argv; |
590 | settings.argv = argv; |
592 | |
591 | |
593 | g_thread_init (0); // for the slice allocator only |
592 | g_thread_init (0); // for the slice allocator only |
|
|
593 | rndm.seed (time (0)); |
594 | |
594 | |
595 | init (argc, argv); |
595 | init (argc, argv); |
596 | |
596 | |
597 | for (;;) |
597 | for (;;) |
598 | cfperl_main (); |
598 | cfperl_main (); |