ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/main.C
(Generate patch)

Comparing deliantra/server/server/main.C (file contents):
Revision 1.42 by root, Wed Dec 13 00:42:04 2006 UTC vs.
Revision 1.54 by root, Sat Dec 23 06:21:02 2006 UTC

31# ifdef HAVE_CRYPT_H 31# ifdef HAVE_CRYPT_H
32# include <crypt.h> 32# include <crypt.h>
33# endif 33# endif
34#endif 34#endif
35 35
36#ifndef __CEXTRACT__
37# include <sproto.h> 36#include <sproto.h>
38#endif
39
40#ifdef HAVE_TIME_H
41# include <time.h> 37#include <time.h>
42#endif
43 38
44#include <../random_maps/random_map.h> 39#include <../random_maps/random_map.h>
45#include <../random_maps/rproto.h> 40#include <../random_maps/rproto.h>
46#include "path.h" 41#include "path.h"
47 42
138void 133void
139start_info (object *op) 134start_info (object *op)
140{ 135{
141 char buf[MAX_BUF]; 136 char buf[MAX_BUF];
142 137
143 sprintf (buf, "Welcome to Crossfire, v%s!", VERSION); 138 sprintf (buf, "Welcome to Crossfire v%s!", VERSION);
144 new_draw_info (NDI_UNIQUE, 0, op, buf); 139 new_draw_info (NDI_UNIQUE, 0, op, buf);
145 new_draw_info (NDI_UNIQUE, 0, op, "Press `?' for help"); 140 new_draw_info (NDI_UNIQUE, 0, op, "Press `?' for help");
146 new_draw_info (NDI_UNIQUE, 0, op, " "); 141 new_draw_info (NDI_UNIQUE, 0, op, " ");
147 new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, op, "%s entered the game.", &op->name); 142 new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, op, "%s entered the game.", &op->name);
148 if (!op->contr->name_changed)
149 {
150 new_draw_info (NDI_UNIQUE, 0, op, "Note that you must set your name with the name");
151 new_draw_info (NDI_UNIQUE, 0, op, "command to enter the highscore list.");
152 new_draw_info (NDI_UNIQUE, 0, op, "(You can also use the crossfire.name X-resource.)");
153 }
154}
155
156/* Really, there is no reason to crypt the passwords any system. But easier
157 * to just leave this enabled for backward compatibility. Put the
158 * simple case at top - no encryption - makes it easier to read.
159 */
160char *
161crypt_string (char *str, char *salt)
162{
163#if (defined(__FreeBSD__) && !defined(HAVE_LIBDES))
164 return (str);
165#else
166 static char *c = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./";
167 char s[2];
168
169 if (salt == NULL)
170 s[0] = c[RANDOM () % (int) strlen (c)], s[1] = c[RANDOM () % (int) strlen (c)];
171 else
172 s[0] = salt[0], s[1] = salt[1];
173
174# ifdef HAVE_LIBDES
175 return (char *) des_crypt (str, s);
176# endif
177 /* Default case - just use crypt */
178 return (char *) crypt (str, s);
179#endif
180}
181
182int
183check_password (char *typed, char *crypted)
184{
185 return !strcmp (crypt_string (typed, crypted), crypted);
186} 143}
187 144
188/* This is a basic little function to put the player back to his 145/* This is a basic little function to put the player back to his
189 * savebed. We do some error checking - its possible that the 146 * savebed. We do some error checking - its possible that the
190 * savebed map may no longer exist, so we make sure the player 147 * savebed map may no longer exist, so we make sure the player
472 rp.origin_y = exit_ob->y; 429 rp.origin_y = exit_ob->y;
473 strcpy (rp.origin_map, pl->map->path); 430 strcpy (rp.origin_map, pl->map->path);
474 431
475 /* If we have a final_map, use it as a base name to give some clue 432 /* If we have a final_map, use it as a base name to give some clue
476 * as where the player is. Otherwise, use the origin map. 433 * as where the player is. Otherwise, use the origin map.
477 * Take the last component (after the last slash) to give
478 * shorter names without bogus slashes.
479 */ 434 */
480 if (rp.final_map[0]) 435 sprintf (newmap_name, "/random%s+%04d",
481 { 436 *rp.final_map ? rp.final_map : rp.origin_map,
482 cp = strrchr (rp.final_map, '/'); 437 reference_number++);
483 if (!cp)
484 cp = rp.final_map;
485 }
486 else
487 {
488 char buf[HUGE_BUF];
489
490 cp = strrchr (rp.origin_map, '/');
491 if (!cp)
492 cp = rp.origin_map;
493 /* Need to strip of any trailing digits, if it has them */
494 strcpy (buf, cp);
495 while (isdigit (buf[strlen (buf) - 1]))
496 buf[strlen (buf) - 1] = 0;
497 cp = buf;
498 }
499
500 sprintf (newmap_name, "/random/%s%04d", cp + 1, reference_number++);
501 438
502 /* now to generate the actual map. */ 439 /* now to generate the actual map. */
503 new_map = generate_random_map (newmap_name, &rp); 440 new_map = generate_random_map (newmap_name, &rp);
504 441
505 /* Update the exit_ob so it now points directly at the newly created 442 /* Update the exit_ob so it now points directly at the newly created
633 570
634 /* If we are coming from another template map, use reletive paths unless 571 /* If we are coming from another template map, use reletive paths unless
635 * indicated otherwise. 572 * indicated otherwise.
636 */ 573 */
637 if (exit_ob->map->templatemap && (resultname[0] != '/')) 574 if (exit_ob->map->templatemap && (resultname[0] != '/'))
638 {
639 new_map_name = path_combine_and_normalize (exit_ob->map->path, resultname); 575 new_map_name = path_combine_and_normalize (exit_ob->map->path, resultname);
640 }
641 else 576 else
642 {
643 new_map_name = create_template_pathname (resultname); 577 new_map_name = create_template_pathname (resultname);
644 }
645 578
646 new_map = ready_map_name (new_map_name, MAP_PLAYER_UNIQUE); 579 new_map = ready_map_name (new_map_name, MAP_PLAYER_UNIQUE);
647 if (!new_map) 580 if (!new_map)
648 { 581 {
649 memset (&rp, 0, sizeof (RMParms)); 582 memset (&rp, 0, sizeof (RMParms));
899 tmp->destroy (); 832 tmp->destroy ();
900 } 833 }
901 834
902 strcpy (op->contr->savebed_map, path_combine_and_normalize (exit_ob->map->path, EXIT_PATH (exit_ob))); 835 strcpy (op->contr->savebed_map, path_combine_and_normalize (exit_ob->map->path, EXIT_PATH (exit_ob)));
903 op->contr->bed_x = EXIT_X (exit_ob), op->contr->bed_y = EXIT_Y (exit_ob); 836 op->contr->bed_x = EXIT_X (exit_ob), op->contr->bed_y = EXIT_Y (exit_ob);
904 save_player (op, 1); 837 op->contr->save ();
905 /* LOG(llevDebug,"enter_exit: Taking damned exit %s to (%d,%d) on map %s\n", 838 /* LOG(llevDebug,"enter_exit: Taking damned exit %s to (%d,%d) on map %s\n",
906 * exit_ob->name?exit_ob->name:"(none)", exit_ob->x, exit_ob->y, 839 * exit_ob->name?exit_ob->name:"(none)", exit_ob->x, exit_ob->y,
907 * path_combine_and_normalize(exit_ob->map->path, EXIT_PATH(exit_ob))); */ 840 * path_combine_and_normalize(exit_ob->map->path, EXIT_PATH(exit_ob))); */
908 } 841 }
909 842
950 883
951 enter_map (op, newmap, op->x, op->y); 884 enter_map (op, newmap, op->x, op->y);
952 } 885 }
953} 886}
954 887
955/*
956 * process_active_maps(): Works like process_events(), but it only
957 * processes maps which a player is on.
958 *
959 */
960
961#if 0 // dead code, schmorp
962void
963process_active_maps ()
964{
965 for (maptile *map = first_map; map != NULL; map = map->next)
966 if (map->in_memory == MAP_IN_MEMORY)
967 if (players_on_map (map, TRUE))
968 process_events (map);
969}
970#endif
971
972/* process_players1 and process_players2 do all the player related stuff. 888/* process_players1 and process_players2 do all the player related stuff.
973 * I moved it out of process events and process_map. This was to some 889 * I moved it out of process events and process_map. This was to some
974 * extent for debugging as well as to get a better idea of the time used 890 * extent for debugging as well as to get a better idea of the time used
975 * by the various functions. process_players1() does the processing before 891 * by the various functions. process_players1() does the processing before
976 * objects have been updated, process_players2() does the processing that 892 * objects have been updated, process_players2() does the processing that
977 * is needed after the players have been updated. 893 * is needed after the players have been updated.
978 */ 894 */
979 895static void
980void
981process_players1 (maptile *map) 896process_players1 ()
982{ 897{
983 int flag; 898 int flag;
984 player *pl, *plnext;
985
986 /* Basically, we keep looping until all the players have done their actions. */ 899 /* Basically, we keep looping until all the players have done their actions. */
987 for (flag = 1; flag != 0;) 900 for (flag = 1; flag != 0;)
988 { 901 {
989 flag = 0; 902 flag = 0;
990 for (pl = first_player; pl != NULL; pl = plnext) 903 for (player *plnext, *pl = first_player; pl; pl = plnext)
991 { 904 {
992 plnext = pl->next; /* In case a player exits the game in handle_player() */ 905 plnext = pl->next; /* In case a player exits the game in handle_player() */
993 906
994 if (pl->ob == NULL) 907 if (!pl->ob)
995 continue;
996
997 if (map != NULL && pl->ob->map != map)
998 continue; 908 continue;
999 909
1000 if (pl->ob->speed_left > 0) 910 if (pl->ob->speed_left > 0)
1001 { 911 {
1002 if (handle_newcs_player (pl->ob)) 912 if (handle_newcs_player (pl->ob))
1014 924
1015#ifdef AUTOSAVE 925#ifdef AUTOSAVE
1016 /* check for ST_PLAYING state so that we don't try to save off when 926 /* check for ST_PLAYING state so that we don't try to save off when
1017 * the player is logging in. 927 * the player is logging in.
1018 */ 928 */
1019 if ((pl->last_save_tick + AUTOSAVE) < (uint32) pticks && pl->state == ST_PLAYING) 929 if ((pl->last_save_tick + AUTOSAVE) < (uint32) pticks && pl->ns->state == ST_PLAYING)
1020 {
1021 /* Don't save the player on unholy ground. Instead, increase the
1022 * tick time so it will be about 10 seconds before we try and save
1023 * again.
1024 */ 930 {
1025// if (get_map_flags(pl->ob->map, NULL, pl->ob->x, pl->ob->y, NULL, NULL) & P_NO_CLERIC) { 931 pl->ob->contr->save ();
1026// pl->last_save_tick += 100;
1027// } else {
1028 save_player (pl->ob, 1);
1029 pl->last_save_tick = pticks; 932 pl->last_save_tick = pticks;
1030// }
1031 } 933 }
1032#endif 934#endif
1033 } /* end of for loop for all the players */ 935 } /* end of for loop for all the players */
1034 } /* for flag */ 936 } /* for flag */
937
1035 for (pl = first_player; pl != NULL; pl = pl->next) 938 for (player *pl = first_player; pl; pl = pl->next)
1036 { 939 {
1037 if (map != NULL && (pl->ob == NULL || pl->ob->map != map))
1038 continue;
1039 if (settings.casting_time == TRUE) 940 if (settings.casting_time)
1040 { 941 {
1041 if (pl->ob->casting_time > 0) 942 if (pl->ob->casting_time > 0)
1042 { 943 {
1043 pl->ob->casting_time--; 944 pl->ob->casting_time--;
1044 pl->ob->start_holding = 1; 945 pl->ob->start_holding = 1;
1045 } 946 }
947
1046 /* set spell_state so we can update the range in stats field */ 948 /* set spell_state so we can update the range in stats field */
1047 if ((pl->ob->casting_time == 0) && (pl->ob->start_holding == 1)) 949 if ((pl->ob->casting_time == 0) && (pl->ob->start_holding == 1))
1048 {
1049 pl->ob->start_holding = 0; 950 pl->ob->start_holding = 0;
1050 } 951 }
1051 } 952
1052 do_some_living (pl->ob); 953 do_some_living (pl->ob);
1053 /* draw(pl->ob); *//* updated in socket code */
1054 } 954 }
1055} 955}
1056 956
1057void 957static void
1058process_players2 (maptile *map) 958process_players2 ()
1059{ 959{
1060 player *pl;
1061
1062 /* Then check if any players should use weapon-speed instead of speed */ 960 /* Then check if any players should use weapon-speed instead of speed */
1063 for (pl = first_player; pl != NULL; pl = pl->next) 961 for (player *pl = first_player; pl; pl = pl->next)
1064 { 962 {
1065 if (map != NULL)
1066 {
1067 if (pl->ob == NULL || QUERY_FLAG (pl->ob, FLAG_REMOVED))
1068 continue;
1069 else if (pl->loading != NULL) /* Player is blocked */
1070 pl->ob->speed_left -= pl->ob->speed;
1071 if (pl->ob->map != map)
1072 continue;
1073 }
1074
1075 /* The code that did weapon_sp handling here was out of place - 963 /* The code that did weapon_sp handling here was out of place -
1076 * this isn't called until after the player has finished there 964 * this isn't called until after the player has finished there
1077 * actions, and is thus out of place. All we do here is bounds 965 * actions, and is thus out of place. All we do here is bounds
1078 * checking. 966 * checking.
1079 */ 967 */
1085 /* This needs to be here - if the player is running, we need to 973 /* This needs to be here - if the player is running, we need to
1086 * clear this each tick, but new commands are not being received 974 * clear this each tick, but new commands are not being received
1087 * so execute_newserver_command() is never called 975 * so execute_newserver_command() is never called
1088 */ 976 */
1089 pl->has_hit = 0; 977 pl->has_hit = 0;
1090
1091 } 978 }
1092 else if (pl->ob->speed_left > pl->ob->speed) 979 else if (pl->ob->speed_left > pl->ob->speed)
1093 pl->ob->speed_left = pl->ob->speed; 980 pl->ob->speed_left = pl->ob->speed;
1094 } 981 }
1095} 982}
1096 983
1097void 984void
1098process_events (maptile *map) 985process_events ()
1099{ 986{
1100 object *op; 987 object *op;
1101 988
1102 static object *marker; 989 static object *marker;
1103 990
1104 if (!marker) 991 if (!marker)
1105 marker = object::create (); 992 marker = object::create ();
1106 993
1107 process_players1 (map); 994 process_players1 ();
1108 995
1109 marker->active_next = active_objects; 996 marker->active_next = active_objects;
1110 997
1111 if (marker->active_next) 998 if (marker->active_next)
1112 marker->active_next->active_prev = marker; 999 marker->active_next->active_prev = marker;
1163 continue; 1050 continue;
1164 } 1051 }
1165 1052
1166 if (!op->speed) 1053 if (!op->speed)
1167 { 1054 {
1168 LOG (llevError, "BUG: process_events(): Object %s has no speed, " "but is on active list\n", &op->arch->name); 1055 LOG (llevError, "BUG: process_events(): Object %s has no speed, "
1056 "but is on active list\n", &op->arch->name);
1169 update_ob_speed (op); 1057 update_ob_speed (op);
1170 continue; 1058 continue;
1171 } 1059 }
1172 1060
1173 if (op->map == NULL && op->env == NULL && op->name && op->type != MAP && map == NULL) 1061 if (op->map == NULL && op->env == NULL && op->name && op->type != MAP)
1174 { 1062 {
1175 LOG (llevError, "BUG: process_events(): Object without map or " "inventory is on active list: %s (%d)\n", &op->name, op->count); 1063 LOG (llevError, "BUG: process_events(): Object without map or "
1064 "inventory is on active list: %s (%d)\n", &op->name, op->count);
1176 op->speed = 0; 1065 op->speed = 0;
1177 update_ob_speed (op); 1066 update_ob_speed (op);
1178 continue; 1067 continue;
1179 } 1068 }
1180 1069
1181 if (map != NULL && op->map != map)
1182 continue;
1183
1184 /* Animate the object. Bug of feature that andim_speed 1070 /* Animate the object. Bug or feature that anim_speed
1185 * is based on ticks, and not the creatures speed? 1071 * is based on ticks, and not the creatures speed?
1186 */ 1072 */
1187 if (op->anim_speed && op->last_anim >= op->anim_speed) 1073 if (op->anim_speed && op->last_anim >= op->anim_speed)
1188 { 1074 {
1189 if ((op->type == PLAYER) || (op->type == MONSTER)) 1075 if ((op->type == PLAYER))
1190 animate_object (op, op->facing); 1076 animate_object (op, op->facing);
1191 else 1077 else
1192 animate_object (op, op->direction); 1078 animate_object (op, op->direction);
1193 1079
1194 op->last_anim = 1; 1080 op->last_anim = 1;
1230 if (marker->active_prev != NULL) 1116 if (marker->active_prev != NULL)
1231 marker->active_prev->active_next = NULL; 1117 marker->active_prev->active_next = NULL;
1232 else 1118 else
1233 active_objects = NULL; 1119 active_objects = NULL;
1234 1120
1235 process_players2 (map); 1121 process_players2 ();
1236} 1122}
1237 1123
1238void 1124void
1239clean_tmp_files (void) 1125clean_tmp_files (void)
1240{ 1126{
1244 1130
1245 /* We save the maps - it may not be intuitive why, but if there are unique 1131 /* We save the maps - it may not be intuitive why, but if there are unique
1246 * items, we need to save the map so they get saved off. Perhaps we should 1132 * items, we need to save the map so they get saved off. Perhaps we should
1247 * just make a special function that only saves the unique items. 1133 * just make a special function that only saves the unique items.
1248 */ 1134 */
1249 for (m = first_map; m != NULL; m = next) 1135 for (m = first_map; m; m = next)
1250 { 1136 {
1251 next = m->next; 1137 next = m->next;
1138
1252 if (m->in_memory == MAP_IN_MEMORY) 1139 if (m->in_memory == MAP_IN_MEMORY)
1253 { 1140 {
1254 /* If we want to reuse the temp maps, swap it out (note that will also 1141 /* If we want to reuse the temp maps, swap it out (note that will also
1255 * update the log file. Otherwise, save the map (mostly for unique item 1142 * update the log file.
1256 * stuff). Note that the clean_tmp_map is called after the end of
1257 * the for loop but is in the #else bracket. IF we are recycling the maps,
1258 * we certainly don't want the temp maps removed.
1259 */ 1143 */
1260 1144
1261 /* XXX The above comment is dead wrong */
1262 if (settings.recycle_tmp_maps == TRUE)
1263 swap_map (m); 1145 swap_map (m);
1264 else
1265 {
1266 new_save_map (m, 0); /* note we save here into a overlay map */
1267 clean_tmp_map (m);
1268 } 1146 }
1269 }
1270 } 1147 }
1148
1271 write_todclock (); /* lets just write the clock here */ 1149 write_todclock (); /* lets just write the clock here */
1272} 1150}
1273 1151
1274/* clean up everything before exiting */ 1152/* clean up everything before exiting */
1275void 1153void
1276cleanup (void) 1154cleanup (bool make_core)
1277{ 1155{
1278 LOG (llevDebug, "Cleanup called.\n"); 1156 LOG (llevDebug, "Cleanup called.\n");
1279 1157
1158 if (init_done)
1159 {
1280 for (player *pl = first_player; pl != NULL; pl = pl->next) 1160 for (player *pl = first_player; pl; pl = pl->next)
1281 save_player (pl->ob, 0); 1161 pl->save (1);
1282 1162
1283 for (player *pl = first_player; pl != NULL; pl = pl->next) 1163 for (player *pl = first_player; pl; pl = pl->next)
1284 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED)) 1164 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED))
1285 leave_map (pl->ob); 1165 leave_map (pl->ob);
1286 1166
1287 clean_tmp_files (); 1167 clean_tmp_files ();
1288 write_book_archive (); 1168 write_book_archive ();
1289 1169
1290 INVOKE_GLOBAL (CLEANUP); 1170 INVOKE_GLOBAL (CLEANUP);
1171 }
1291 1172
1173 if (make_core)
1174 abort ();
1175 else
1292 _exit (0); 1176 _exit (0);
1293} 1177}
1294 1178
1295void 1179void
1296leave (player *pl, int draw_exit) 1180leave (player *pl, int draw_exit)
1297{ 1181{
1298 if (pl != NULL) 1182 if (pl)
1299 { 1183 {
1184 if (pl->ob->type != DEAD_OBJECT)
1185 {
1186 /* If a hidden dm dropped connection do not create
1187 * inconsistencies by showing that they have left the game
1188 */
1189 if (!(QUERY_FLAG (pl->ob, FLAG_WIZ) && pl->ob->contr->hidden)
1190 && draw_exit)
1191 {
1192 if (pl->ob->map)
1193 {
1194 INVOKE_PLAYER (LOGOUT, pl);
1195 LOG (llevInfo, "LOGOUT: Player named %s from ip %s\n", &pl->ob->name, pl->ns->host);
1196 }
1197
1198 char buf[MAX_BUF];
1199
1200 sprintf (buf, "%s left the game.", &pl->ob->name);
1201 new_draw_info (NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, 0, buf);
1202 }
1203
1204 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED))
1205 leave_map (pl->ob);
1206
1207 pl->ob->type = DEAD_OBJECT; /* To avoid problems with inventory window */
1208 }
1209
1300 /* We do this so that the socket handling routine can do the final 1210 /* We do this so that the socket handling routine can do the final
1301 * cleanup. We also leave that loop to actually handle the freeing 1211 * cleanup. We also leave that loop to actually handle the freeing
1302 * of the data. 1212 * of the data.
1303 */ 1213 */
1304 if (pl->ob->type != DEAD_OBJECT) 1214 if (pl->ns)
1305 { 1215 pl->ns->destroy ();
1306 pl->socket.status = Ns_Dead;
1307 1216
1308 /* If a hidden dm dropped connection do not create
1309 * inconsistencies by showing that they have left the game
1310 */
1311 if (!(QUERY_FLAG (pl->ob, FLAG_WIZ) && pl->ob->contr->hidden)
1312 && draw_exit && (pl->state != ST_GET_NAME && pl->state != ST_GET_PASSWORD && pl->state != ST_CONFIRM_PASSWORD))
1313 {
1314 if (pl->ob->map)
1315 {
1316 INVOKE_PLAYER (LOGOUT, pl);
1317 LOG (llevInfo, "LOGOUT: Player named %s from ip %s\n", &pl->ob->name, pl->socket.host);
1318 }
1319
1320 char buf[MAX_BUF];
1321
1322 sprintf (buf, "%s left the game.", &pl->ob->name);
1323 new_draw_info (NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL, buf);
1324 }
1325
1326 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED))
1327 leave_map (pl->ob);
1328
1329 pl->ob->type = DEAD_OBJECT; /* To avoid problems with inventory window */
1330 }
1331 } 1217 }
1332} 1218}
1333 1219
1334int 1220int
1335forbid_play (void) 1221forbid_play (void)
1398extern unsigned long todtick; 1284extern unsigned long todtick;
1399 1285
1400void 1286void
1401do_specials (void) 1287do_specials (void)
1402{ 1288{
1403
1404#ifdef WATCHDOG
1405 if (!(pticks % 503))
1406 watchdog ();
1407#endif
1408
1409 if (!(pticks % PTICKS_PER_CLOCK)) 1289 if (!(pticks % PTICKS_PER_CLOCK))
1410 tick_the_clock (); 1290 tick_the_clock ();
1411 1291
1412 if (!(pticks % 7)) 1292 if (!(pticks % 7))
1413 shstr::gc (); 1293 shstr::gc ();
1434void 1314void
1435server_tick () 1315server_tick ()
1436{ 1316{
1437 nroferrors = 0; 1317 nroferrors = 0;
1438 1318
1319 // first do the user visible stuff
1439 doeric_server (); 1320 doeric_server ();
1440 INVOKE_GLOBAL (CLOCK); 1321 INVOKE_GLOBAL (CLOCK);
1441 process_events (NULL); /* "do" something with objects with speed */ 1322 process_events (); /* "do" something with objects with speed */
1442 flush_sockets (); 1323 flush_sockets ();
1324
1325 // then do some bookkeeping, should not really be here
1443 check_active_maps (); /* Removes unused maps after a certain timeout */ 1326 check_active_maps (); /* Removes unused maps after a certain timeout */
1444 do_specials (); /* Routines called from time to time. */ 1327 do_specials (); /* Routines called from time to time. */
1445 object::free_mortals (); 1328 object::free_mortals ();
1446 1329
1447 ++pticks; 1330 ++pticks;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines