1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2006,2007,2008,2009,2010,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * |
5 | * |
6 | * Deliantra is free software: you can redistribute it and/or modify it under |
6 | * Deliantra is free software: you can redistribute it and/or modify it under |
7 | * the terms of the Affero GNU General Public License as published by the |
7 | * the terms of the Affero GNU General Public License as published by the |
8 | * Free Software Foundation, either version 3 of the License, or (at your |
8 | * Free Software Foundation, either version 3 of the License, or (at your |
9 | * option) any later version. |
9 | * option) any later version. |
… | |
… | |
29 | #include <cstdarg> |
29 | #include <cstdarg> |
30 | #include <typeinfo> |
30 | #include <typeinfo> |
31 | |
31 | |
32 | #include "global.h" |
32 | #include "global.h" |
33 | #include "rmg.h" |
33 | #include "rmg.h" |
|
|
34 | #include "noise.h" |
34 | #include "evthread.h" |
35 | #include "evthread.h" |
35 | #include "sproto.h" |
36 | #include "sproto.h" |
36 | |
37 | |
37 | #include <unistd.h> |
38 | #include <unistd.h> |
38 | #if _POSIX_MEMLOCK |
39 | #if _POSIX_MEMLOCK |
… | |
… | |
66 | static int tick_inhibit; |
67 | static int tick_inhibit; |
67 | static int tick_pending; |
68 | static int tick_pending; |
68 | |
69 | |
69 | global gbl_ev; |
70 | global gbl_ev; |
70 | static AV *cb_global, *cb_attachable, *cb_object, *cb_player, *cb_client, *cb_type, *cb_map; |
71 | static AV *cb_global, *cb_attachable, *cb_object, *cb_player, *cb_client, *cb_type, *cb_map; |
71 | static SV *sv_runtime, *sv_tick_start, *sv_next_tick, *sv_now; |
72 | static SV *sv_runtime, *sv_tick_start, *sv_next_tick, *sv_now, *sv_server_tick; |
72 | static AV *av_reflect; |
73 | static AV *av_reflect; |
73 | |
74 | |
74 | bitset<NUM_EVENT_TYPES> ev_want_event; |
75 | bitset<NUM_EVENT_TYPES> ev_want_event; |
75 | bitset<NUM_TYPES> ev_want_type; |
76 | bitset<NUM_TYPES> ev_want_type; |
76 | |
77 | |
… | |
… | |
252 | { |
253 | { |
253 | static int last_mortalcount; |
254 | static int last_mortalcount; |
254 | if (mortals.size () != last_mortalcount) |
255 | if (mortals.size () != last_mortalcount) |
255 | { |
256 | { |
256 | last_mortalcount = mortals.size (); |
257 | last_mortalcount = mortals.size (); |
257 | LOG (llevInfo, "%d mortals.\n", (int)mortals.size ()); |
258 | object *specimen = is_a<object> (mortals [rndm (mortals.size ())]); |
|
|
259 | |
|
|
260 | LOG (llevInfo, "%d mortals (random specimen: %s).\n", |
|
|
261 | (int)mortals.size (), specimen ? specimen->debug_desc () : "(not an object)"); |
258 | |
262 | |
259 | if (0) |
263 | if (0) |
260 | { |
264 | { |
261 | for (int j = 0; j < mortals.size (); ++j)//D |
265 | for (int j = 0; j < mortals.size (); ++j)//D |
262 | fprintf (stderr, "%d:%s %p ", j, &((object *)mortals[j])->name, mortals[j]);//D |
266 | fprintf (stderr, "%d:%s %p ", j, &((object *)mortals[j])->name, mortals[j]);//D |
… | |
… | |
621 | STRLEN len; |
625 | STRLEN len; |
622 | char *data = SvPVbyte (sv, len); |
626 | char *data = SvPVbyte (sv, len); |
623 | v.assign (data, len); |
627 | v.assign (data, len); |
624 | } |
628 | } |
625 | |
629 | |
|
|
630 | static inline void sv_to (SV *sv, refcnt_buf &v) |
|
|
631 | { |
|
|
632 | STRLEN len; |
|
|
633 | char *data = SvPVbyte (sv, len); |
|
|
634 | refcnt_buf buf (data, len); |
|
|
635 | v = buf; |
|
|
636 | } |
|
|
637 | |
626 | static inline void sv_to (SV *sv, UUID &v) |
638 | static inline void sv_to (SV *sv, UUID &v) |
627 | { |
639 | { |
628 | if (!v.parse (SvPV_nolen (sv))) |
640 | if (!v.parse (SvPV_nolen (sv))) |
629 | croak ("unparsable uuid: %s", SvPV_nolen (sv)); |
641 | croak ("unparsable uuid: %s", SvPV_nolen (sv)); |
630 | } |
642 | } |
… | |
… | |
1403 | stash_cf_region_wrap = gv_stashpv ("cf::region::wrap", 1); |
1415 | stash_cf_region_wrap = gv_stashpv ("cf::region::wrap", 1); |
1404 | stash_cf_living_wrap = gv_stashpv ("cf::living::wrap", 1); |
1416 | stash_cf_living_wrap = gv_stashpv ("cf::living::wrap", 1); |
1405 | stash_cf_layout_wrap = gv_stashpv ("cf::layout::wrap", 1); |
1417 | stash_cf_layout_wrap = gv_stashpv ("cf::layout::wrap", 1); |
1406 | stash_ext_map_world = gv_stashpv ("ext::map_world" , 1); |
1418 | stash_ext_map_world = gv_stashpv ("ext::map_world" , 1); |
1407 | |
1419 | |
1408 | sv_now = get_sv ("cf::NOW" , 1); SvUPGRADE (sv_now , SVt_NV); |
1420 | sv_now = get_sv ("cf::NOW" , 1); SvUPGRADE (sv_now , SVt_NV); |
1409 | sv_runtime = get_sv ("cf::RUNTIME" , 1); SvUPGRADE (sv_runtime , SVt_NV); |
1421 | sv_runtime = get_sv ("cf::RUNTIME" , 1); SvUPGRADE (sv_runtime , SVt_NV); |
|
|
1422 | sv_server_tick = get_sv ("cf::SERVER_TICK", 1); SvUPGRADE (sv_server_tick, SVt_IV); |
1410 | sv_tick_start = get_sv ("cf::TICK_START", 1); SvUPGRADE (sv_tick_start, SVt_NV); |
1423 | sv_tick_start = get_sv ("cf::TICK_START" , 1); SvUPGRADE (sv_tick_start , SVt_NV); |
1411 | sv_next_tick = get_sv ("cf::NEXT_TICK" , 1); SvUPGRADE (sv_next_tick , SVt_NV); |
1424 | sv_next_tick = get_sv ("cf::NEXT_TICK" , 1); SvUPGRADE (sv_next_tick , SVt_NV); |
1412 | |
1425 | |
1413 | cb_global = get_av ("cf::CB_GLOBAL", 1); |
1426 | cb_global = get_av ("cf::CB_GLOBAL", 1); |
1414 | cb_attachable = get_av ("cf::CB_ATTACHABLE", 1); |
1427 | cb_attachable = get_av ("cf::CB_ATTACHABLE", 1); |
1415 | cb_object = get_av ("cf::CB_OBJECT", 1); |
1428 | cb_object = get_av ("cf::CB_OBJECT", 1); |
1416 | cb_player = get_av ("cf::CB_PLAYER", 1); |
1429 | cb_player = get_av ("cf::CB_PLAYER", 1); |
… | |
… | |
1485 | const_iv (SAVE_MODE) const_iv (SAVE_DIR_MODE) |
1498 | const_iv (SAVE_MODE) const_iv (SAVE_DIR_MODE) |
1486 | |
1499 | |
1487 | const_iv (SK_EXP_ADD_SKILL) const_iv (SK_EXP_TOTAL) const_iv (SK_EXP_NONE) |
1500 | const_iv (SK_EXP_ADD_SKILL) const_iv (SK_EXP_TOTAL) const_iv (SK_EXP_NONE) |
1488 | const_iv (SK_SUBTRACT_SKILL_EXP) const_iv (SK_EXP_SKILL_ONLY) |
1501 | const_iv (SK_SUBTRACT_SKILL_EXP) const_iv (SK_EXP_SKILL_ONLY) |
1489 | |
1502 | |
1490 | const_iv (MAP_ACTIVE) const_iv (MAP_SWAPPED) const_iv (MAP_LOADING) const_iv (MAP_SAVING) |
|
|
1491 | const_iv (MAP_INACTIVE) |
|
|
1492 | |
|
|
1493 | const_iv (KLASS_ATTACHABLE) const_iv (KLASS_GLOBAL) const_iv (KLASS_OBJECT) |
1503 | const_iv (KLASS_ATTACHABLE) const_iv (KLASS_GLOBAL) const_iv (KLASS_OBJECT) |
1494 | const_iv (KLASS_CLIENT) const_iv (KLASS_PLAYER) const_iv (KLASS_MAP) |
1504 | const_iv (KLASS_CLIENT) const_iv (KLASS_PLAYER) const_iv (KLASS_MAP) |
1495 | |
1505 | |
1496 | const_iv (CS_QUERY_YESNO) const_iv (CS_QUERY_SINGLECHAR) const_iv (CS_QUERY_HIDEINPUT) |
1506 | const_iv (CS_QUERY_YESNO) const_iv (CS_QUERY_SINGLECHAR) const_iv (CS_QUERY_HIDEINPUT) |
1497 | |
1507 | |
… | |
… | |
1557 | |
1567 | |
1558 | for_all_objects (op) |
1568 | for_all_objects (op) |
1559 | op->reattach (); |
1569 | op->reattach (); |
1560 | } |
1570 | } |
1561 | |
1571 | |
1562 | # support function for map-world.ext |
|
|
1563 | void _quantise (SV *data_sv, SV *plt_sv) |
|
|
1564 | CODE: |
|
|
1565 | { |
|
|
1566 | if (!SvROK (plt_sv) || SvTYPE (SvRV (plt_sv)) != SVt_PVAV) |
|
|
1567 | croak ("_quantise called with invalid agruments"); |
|
|
1568 | |
|
|
1569 | plt_sv = SvRV (plt_sv); |
|
|
1570 | SV **plt = AvARRAY (plt_sv); |
|
|
1571 | int plt_count = AvFILL (plt_sv) + 1; |
|
|
1572 | |
|
|
1573 | STRLEN len; |
|
|
1574 | char *data = SvPVbyte (data_sv, len); |
|
|
1575 | char *dst = data; |
|
|
1576 | |
|
|
1577 | while (len >= 3) |
|
|
1578 | { |
|
|
1579 | for (SV **val_sv = plt + plt_count; val_sv-- > plt; ) |
|
|
1580 | { |
|
|
1581 | char *val = SvPVX (*val_sv); |
|
|
1582 | |
|
|
1583 | if (val [0] == data [0] |
|
|
1584 | && val [1] == data [1] |
|
|
1585 | && val [2] == data [2]) |
|
|
1586 | { |
|
|
1587 | *dst++ = val [3]; |
|
|
1588 | goto next; |
|
|
1589 | } |
|
|
1590 | } |
|
|
1591 | |
|
|
1592 | croak ("_quantise: color not found in palette: #%02x%02x%02x, at offset %d %d", |
|
|
1593 | (uint8_t)data [0], (uint8_t)data [1], (uint8_t)data [2], |
|
|
1594 | dst - SvPVX (data_sv), len); |
|
|
1595 | |
|
|
1596 | next: |
|
|
1597 | data += 3; |
|
|
1598 | len -= 3; |
|
|
1599 | } |
|
|
1600 | |
|
|
1601 | SvCUR_set (data_sv, dst - SvPVX (data_sv)); |
|
|
1602 | } |
|
|
1603 | |
|
|
1604 | void init_anim () |
1572 | void init_anim () |
1605 | |
1573 | |
1606 | void init_globals () |
1574 | void init_globals () |
1607 | |
1575 | |
1608 | void init_attackmess () |
1576 | void init_attackmess () |
… | |
… | |
1654 | { |
1622 | { |
1655 | ev_async_send (EV_DEFAULT, &tick_watcher); |
1623 | ev_async_send (EV_DEFAULT, &tick_watcher); |
1656 | coroapi::cede (); |
1624 | coroapi::cede (); |
1657 | } |
1625 | } |
1658 | |
1626 | |
1659 | void server_tick () |
1627 | void one_tick () |
1660 | CODE: |
1628 | CODE: |
1661 | { |
1629 | { |
1662 | ev_now_update (EV_DEFAULT); |
1630 | ev_now_update (EV_DEFAULT); |
1663 | NOW = ev_now (EV_DEFAULT); |
1631 | NOW = ev_now (EV_DEFAULT); |
1664 | SvNV_set (sv_now, NOW); SvNOK_only (sv_now); |
1632 | SvNV_set (sv_now, NOW); SvNOK_only (sv_now); |
1665 | SvNV_set (sv_tick_start, NOW); SvNOK_only (sv_tick_start); |
1633 | SvNV_set (sv_tick_start, NOW); SvNOK_only (sv_tick_start); |
1666 | runtime = SvNVX (sv_runtime); |
1634 | runtime = SvNVX (sv_runtime); |
1667 | |
1635 | |
|
|
1636 | one_tick (); |
|
|
1637 | |
1668 | server_tick (); |
1638 | ++server_tick; |
|
|
1639 | SvUV_set (sv_server_tick, server_tick); SvIOK_only_UV (sv_server_tick); |
1669 | |
1640 | |
1670 | ev_now_update (EV_DEFAULT); |
1641 | ev_now_update (EV_DEFAULT); |
1671 | NOW = ev_now (EV_DEFAULT); |
1642 | NOW = ev_now (EV_DEFAULT); |
1672 | SvNV_set (sv_now, NOW); SvNOK_only (sv_now); |
1643 | SvNV_set (sv_now, NOW); SvNOK_only (sv_now); |
|
|
1644 | |
1673 | runtime += TICK; |
1645 | runtime += TICK; |
1674 | SvNV_set (sv_runtime, runtime); SvNOK_only (sv_runtime); |
1646 | SvNV_set (sv_runtime, runtime); SvNOK_only (sv_runtime); |
1675 | } |
1647 | } |
1676 | |
1648 | |
1677 | NV floor (NV x) |
1649 | NV floor (NV x) |
… | |
… | |
2144 | # dumb kludgy misdesigned plug-in api slowly gets on my nerves. |
2116 | # dumb kludgy misdesigned plug-in api slowly gets on my nerves. |
2145 | |
2117 | |
2146 | object *new (utf8_string archetype = 0) |
2118 | object *new (utf8_string archetype = 0) |
2147 | PROTOTYPE: ;$ |
2119 | PROTOTYPE: ;$ |
2148 | CODE: |
2120 | CODE: |
2149 | RETVAL = archetype ? get_archetype (archetype) : object::create (); |
2121 | RETVAL = archetype |
|
|
2122 | ? archetype::get (archetype) |
|
|
2123 | : object::create (); |
2150 | OUTPUT: |
2124 | OUTPUT: |
2151 | RETVAL |
2125 | RETVAL |
2152 | |
2126 | |
2153 | object *generate (utf8_string arch, object *creator) |
2127 | object *generate (utf8_string arch, object *creator) |
2154 | CODE: |
2128 | CODE: |
2155 | object *obj = get_archetype (arch); |
2129 | object *obj = archetype::get (arch); |
2156 | fix_generated_item (obj, creator, 0, 0, GT_MINIMAL); |
2130 | fix_generated_item (obj, creator, 0, 0, GT_MINIMAL); |
2157 | RETVAL = obj; |
2131 | RETVAL = obj; |
2158 | OUTPUT: |
2132 | OUTPUT: |
2159 | RETVAL |
2133 | RETVAL |
2160 | |
2134 | |
… | |
… | |
2170 | RETVAL = insert_ob_in_map_at (ob, where, orig, flag, x, y); |
2144 | RETVAL = insert_ob_in_map_at (ob, where, orig, flag, x, y); |
2171 | |
2145 | |
2172 | if (RETVAL->destroyed ()) |
2146 | if (RETVAL->destroyed ()) |
2173 | RETVAL = 0; |
2147 | RETVAL = 0; |
2174 | } |
2148 | } |
|
|
2149 | OUTPUT: |
|
|
2150 | RETVAL |
2175 | |
2151 | |
2176 | shstr |
2152 | shstr |
2177 | object::kv_get (shstr key) |
2153 | object::kv_get (shstr key) |
|
|
2154 | CODE: |
|
|
2155 | RETVAL = THIS->kv.get (key); |
|
|
2156 | OUTPUT: |
|
|
2157 | RETVAL |
2178 | |
2158 | |
2179 | void |
2159 | void |
2180 | object::kv_del (shstr key) |
2160 | object::kv_del (shstr key) |
|
|
2161 | CODE: |
|
|
2162 | THIS->kv.del (key); |
2181 | |
2163 | |
2182 | void |
2164 | void |
2183 | object::kv_set (shstr key, shstr value) |
2165 | object::kv_set (shstr key, shstr value) |
|
|
2166 | CODE: |
|
|
2167 | THIS->kv.set (key, value); |
2184 | |
2168 | |
2185 | object *get_nearest_player (object *ob) |
2169 | object *get_nearest_player (object *ob) |
2186 | ALIAS: nearest_player = 0 |
2170 | ALIAS: nearest_player = 0 |
2187 | PREINIT: |
2171 | PREINIT: |
2188 | extern object *get_nearest_player (object *); |
2172 | extern object *get_nearest_player (object *); |
… | |
… | |
2391 | if (pl->ob && pl->ob->map == THIS) |
2375 | if (pl->ob && pl->ob->map == THIS) |
2392 | PUSHs (sv_2mortal (to_sv (pl->ob))); |
2376 | PUSHs (sv_2mortal (to_sv (pl->ob))); |
2393 | } |
2377 | } |
2394 | |
2378 | |
2395 | void |
2379 | void |
|
|
2380 | maptile::gen_quadmap (int x, int y, int z) |
|
|
2381 | CODE: |
|
|
2382 | gen_quadmap (THIS, x * 50, y * 50, z); |
|
|
2383 | |
|
|
2384 | void |
2396 | maptile::add_underlay (SV *data, int offset, int stride, SV *palette) |
2385 | maptile::add_underlay (SV *data, int offset, int stride, SV *palette) |
2397 | CODE: |
2386 | CODE: |
2398 | { |
2387 | { |
2399 | if (!SvROK (palette) || SvTYPE (SvRV (palette)) != SVt_PVAV) |
2388 | if (!SvROK (palette) || SvTYPE (SvRV (palette)) != SVt_PVAV) |
2400 | croak ("maptile::add_underlay: palette must be arrayref"); |
2389 | croak ("maptile::add_underlay: palette must be arrayref"); |
… | |
… | |
2416 | |
2405 | |
2417 | if (IN_RANGE_EXC (offs, 0, idxlen)) |
2406 | if (IN_RANGE_EXC (offs, 0, idxlen)) |
2418 | { |
2407 | { |
2419 | if (SV **elem = av_fetch ((AV *)palette, idx [offs], 0)) |
2408 | if (SV **elem = av_fetch ((AV *)palette, idx [offs], 0)) |
2420 | { |
2409 | { |
2421 | object *ob = get_archetype (cfSvPVutf8_nolen (*elem)); |
2410 | object *ob = archetype::get (cfSvPVutf8_nolen (*elem)); |
2422 | ob->flag [FLAG_NO_MAP_SAVE] = true; |
2411 | ob->flag [FLAG_NO_MAP_SAVE] = true; |
2423 | THIS->insert (ob, x, y, 0, INS_ABOVE_FLOOR_ONLY); |
2412 | THIS->insert (ob, x, y, 0, INS_ABOVE_FLOOR_ONLY); |
2424 | |
2413 | |
2425 | if (ob->randomitems && !ob->above) |
2414 | if (ob->randomitems && !ob->above) |
2426 | { |
2415 | { |
… | |
… | |
2430 | op->flag [FLAG_NO_MAP_SAVE] = true; |
2419 | op->flag [FLAG_NO_MAP_SAVE] = true; |
2431 | // TODO: if this is a pickable object, then the item |
2420 | // TODO: if this is a pickable object, then the item |
2432 | // will at a bit weird - saving inside the player |
2421 | // will at a bit weird - saving inside the player |
2433 | // will clear the flag, but when the player drops |
2422 | // will clear the flag, but when the player drops |
2434 | // it without logging out, it keeps the flag. |
2423 | // it without logging out, it keeps the flag. |
2435 | // nobody ahs reported this, but this can be rather |
2424 | // nobody has reported this, but this can be rather |
2436 | // annoying on persistent maps. |
2425 | // annoying on persistent maps. |
2437 | } |
2426 | } |
2438 | } |
2427 | } |
2439 | } |
2428 | } |
2440 | } |
2429 | } |
2441 | |
|
|
2442 | skip: ; |
2430 | skip: ; |
2443 | } |
2431 | } |
2444 | } |
2432 | } |
2445 | |
2433 | |
2446 | void |
2434 | void |
… | |
… | |
2477 | for (int x = 0; x < THIS->width; ++x) |
2465 | for (int x = 0; x < THIS->width; ++x) |
2478 | for (int y = 0; y < THIS->height; ++y) |
2466 | for (int y = 0; y < THIS->height; ++y) |
2479 | { |
2467 | { |
2480 | region *rgn = THIS->region (x, y); |
2468 | region *rgn = THIS->region (x, y); |
2481 | |
2469 | |
2482 | //fprintf (stderr, "%d,%d %f %p\n", x, y, rgn->treasure_density,rgn->treasure);//D |
|
|
2483 | if (object *op = THIS->at (x, y).top) |
2470 | if (object *op = THIS->at (x, y).top) |
2484 | if (rgn->treasure && rndm () < rgn->treasure_density) |
2471 | if (rgn->treasure && rndm () < rgn->treasure_density) |
2485 | create_treasure (rgn->treasure, op, GT_ENVIRONMENT, THIS->difficulty); |
2472 | create_treasure (rgn->treasure, op, GT_ENVIRONMENT, THIS->difficulty); |
2486 | } |
2473 | } |
2487 | |
2474 | |
… | |
… | |
2713 | faceidx face_find (utf8_string name, faceidx defidx = 0) |
2700 | faceidx face_find (utf8_string name, faceidx defidx = 0) |
2714 | |
2701 | |
2715 | faceidx alloc (utf8_string name) |
2702 | faceidx alloc (utf8_string name) |
2716 | CODE: |
2703 | CODE: |
2717 | { |
2704 | { |
2718 | do |
2705 | RETVAL = face_alloc (); |
2719 | { |
|
|
2720 | RETVAL = faces.size (); |
|
|
2721 | faces.resize (RETVAL + 1); |
|
|
2722 | } |
|
|
2723 | while (!RETVAL); // crude way to leave index 0 |
|
|
2724 | |
2706 | |
2725 | faces [RETVAL].name = name; |
2707 | faces [RETVAL].name = name; |
2726 | facehash.insert (std::make_pair (faces [RETVAL].name, RETVAL)); |
2708 | facehash.insert (std::make_pair (faces [RETVAL].name, RETVAL)); |
2727 | |
2709 | |
2728 | if (!strcmp (name, BLANK_FACE_NAME )) blank_face = RETVAL; |
2710 | if (!strcmp (name, BLANK_FACE_NAME )) blank_face = RETVAL; |
… | |
… | |
2794 | |
2776 | |
2795 | SV *get_data (faceidx idx, int faceset = 0) |
2777 | SV *get_data (faceidx idx, int faceset = 0) |
2796 | CODE: |
2778 | CODE: |
2797 | facedata *d = face_data (idx, faceset); |
2779 | facedata *d = face_data (idx, faceset); |
2798 | if (!d) XSRETURN_UNDEF; |
2780 | if (!d) XSRETURN_UNDEF; |
2799 | RETVAL = newSVpvn (d->data.data (), d->data.length ()); |
2781 | RETVAL = newSVpvn (d->data, d->data.size ()); |
2800 | OUTPUT: |
2782 | OUTPUT: |
2801 | RETVAL |
2783 | RETVAL |
2802 | |
2784 | |
2803 | void invalidate (faceidx idx) |
2785 | void invalidate (faceidx idx) |
2804 | CODE: |
2786 | CODE: |
2805 | for_all_clients (ns) |
2787 | for_all_clients (ns) |
2806 | { |
2788 | ns->invalidate_face (idx); |
2807 | ns->faces_sent [idx] = false; |
|
|
2808 | ns->force_newmap = true; |
|
|
2809 | } |
|
|
2810 | |
2789 | |
2811 | void invalidate_all () |
2790 | void invalidate_all () |
2812 | CODE: |
2791 | CODE: |
2813 | for_all_clients (ns) |
2792 | for_all_clients (ns) |
2814 | { |
2793 | ns->invalidate_all_faces (); |
2815 | ns->faces_sent.reset (); |
|
|
2816 | ns->force_newmap = true; |
|
|
2817 | } |
|
|
2818 | |
2794 | |
2819 | MODULE = cf PACKAGE = cf::anim PREFIX = anim_ |
2795 | MODULE = cf PACKAGE = cf::anim PREFIX = anim_ |
2820 | |
2796 | |
2821 | #INCLUDE: $PERL $srcdir/genacc faceset $srcdir/../include/anim.h | |
2797 | #INCLUDE: $PERL $srcdir/genacc faceset $srcdir/../include/anim.h | |
2822 | |
2798 | |