MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | /* This sefun is to provide a replacement for the efun set_heart_beat(). |
| 2 | * Feel free to add it to your mudlibs, if you have much code relying on that. |
| 3 | */ |
| 4 | |
| 5 | #if ! __EFUN_DEFINED__(set_heart_beat) |
| 6 | |
| 7 | #include <configuration.h> |
| 8 | |
| 9 | int set_heart_beat(int flag) |
| 10 | { |
| 11 | object ob = efun::previous_object(); |
| 12 | int hb = efun::object_info(ob, OC_HEART_BEAT); |
| 13 | |
| 14 | if (!flag == !hb) |
| 15 | return 0; |
| 16 | |
| 17 | efun::configure_object(ob, OC_HEART_BEAT, flag); |
| 18 | |
| 19 | return 1; |
| 20 | } |
| 21 | |
| 22 | #endif |
| 23 | |
| 24 | |