… | |
… | |
124 | continue; |
124 | continue; |
125 | |
125 | |
126 | if (*buf == '%') |
126 | if (*buf == '%') |
127 | { /* send one news */ |
127 | { /* send one news */ |
128 | if (size > 0) |
128 | if (size > 0) |
129 | draw_ext_info_format (NDI_UNIQUE | NDI_GREEN, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_NEWS, "INFORMATION: %s\n%s", "%s\n%s", subject, news); /*send previously read news */ |
129 | draw_ext_info_format (NDI_UNIQUE | NDI_GREEN, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_NEWS, "INFORMATION: %s\n%s", (char *)"%s\n%s", subject, news); /*send previously read news */ |
130 | |
130 | |
131 | strcpy (subject, buf + 1); |
131 | strcpy (subject, buf + 1); |
132 | strip_endline (subject); |
132 | strip_endline (subject); |
133 | size = 0; |
133 | size = 0; |
134 | news[0] = '\0'; |
134 | news[0] = '\0'; |
… | |
… | |
144 | size += strlen (buf); |
144 | size += strlen (buf); |
145 | } |
145 | } |
146 | } |
146 | } |
147 | |
147 | |
148 | draw_ext_info_format (NDI_UNIQUE | NDI_GREEN, 0, op, |
148 | draw_ext_info_format (NDI_UNIQUE | NDI_GREEN, 0, op, |
149 | MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_NEWS, "INFORMATION: %s\n%s\n", "%s\n%s", subject, news); |
149 | MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_NEWS, "INFORMATION: %s\n%s\n", (char *)"%s\n%s", subject, news); |
150 | close_and_delete (fp, comp); |
150 | close_and_delete (fp, comp); |
151 | } |
151 | } |
152 | |
152 | |
153 | /* This loads the first map an puts the player on it. */ |
153 | /* This loads the first map an puts the player on it. */ |
154 | static void |
154 | static void |
… | |
… | |
315 | player::player () |
315 | player::player () |
316 | { |
316 | { |
317 | /* There are some elements we want initialised to non zero value - |
317 | /* There are some elements we want initialised to non zero value - |
318 | * we deal with that below this point. |
318 | * we deal with that below this point. |
319 | */ |
319 | */ |
320 | outputs_sync = 16; /* Every 2 seconds */ |
320 | outputs_sync = 6; /* Every 2 seconds */ |
321 | outputs_count = 8; /* Keeps present behaviour */ |
321 | outputs_count = 10; /* Keeps present behaviour */ |
322 | unapply = unapply_nochoice; |
322 | unapply = unapply_nochoice; |
323 | |
323 | |
324 | savebed_map = first_map_path; /* Init. respawn position */ |
324 | savebed_map = first_map_path; /* Init. respawn position */ |
325 | |
325 | |
326 | gen_sp_armour = 10; |
326 | gen_sp_armour = 10; |
… | |
… | |
2439 | new_draw_info (NDI_UNIQUE, 0, op, "Your invisibility spell runs out."); |
2439 | new_draw_info (NDI_UNIQUE, 0, op, "Your invisibility spell runs out."); |
2440 | } |
2440 | } |
2441 | } |
2441 | } |
2442 | |
2442 | |
2443 | if (op->contr->outputs_sync) |
2443 | if (op->contr->outputs_sync) |
2444 | { |
|
|
2445 | for (i = 0; i < NUM_OUTPUT_BUFS; i++) |
2444 | for (i = 0; i < NUM_OUTPUT_BUFS; i++) |
2446 | if (op->contr->outputs[i].buf && (op->contr->outputs[i].first_update + op->contr->outputs_sync) < (uint16) pticks) |
2445 | if (op->contr->outputs[i].buf && (op->contr->outputs[i].first_update + op->contr->outputs_sync) < (uint16) pticks) |
2447 | flush_output_element (op, &op->contr->outputs[i]); |
2446 | flush_output_element (op, &op->contr->outputs[i]); |
2448 | } |
|
|
2449 | |
2447 | |
2450 | if (op->contr->ns->state == ST_PLAYING) |
2448 | if (op->contr->ns->state == ST_PLAYING) |
2451 | { |
2449 | { |
2452 | /* these next three if clauses make it possible to SLOW DOWN |
2450 | /* these next three if clauses make it possible to SLOW DOWN |
2453 | hp/grace/spellpoint regeneration. */ |
2451 | hp/grace/spellpoint regeneration. */ |