… | |
… | |
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))) |
… | |
… | |
588 | main (int argc, char **argv) |
585 | main (int argc, char **argv) |
589 | { |
586 | { |
590 | settings.argc = argc; |
587 | settings.argc = argc; |
591 | settings.argv = argv; |
588 | settings.argv = argv; |
592 | |
589 | |
|
|
590 | rndm.seed (time (0)); |
593 | g_thread_init (0); // for the slice allocator only |
591 | g_thread_init (0); // for the slice allocator only |
594 | |
592 | |
595 | init (argc, argv); |
593 | init (argc, argv); |
596 | |
594 | |
597 | for (;;) |
595 | for (;;) |