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.54 by root, Sat Dec 23 06:21:02 2006 UTC vs.
Revision 1.55 by root, Sat Dec 23 13:56:25 2006 UTC

894 */ 894 */
895static void 895static void
896process_players1 () 896process_players1 ()
897{ 897{
898 int flag; 898 int flag;
899
899 /* Basically, we keep looping until all the players have done their actions. */ 900 /* Basically, we keep looping until all the players have done their actions. */
900 for (flag = 1; flag != 0;) 901 for (flag = 1; flag != 0;)
901 { 902 {
902 flag = 0; 903 flag = 0;
903 for (player *plnext, *pl = first_player; pl; pl = plnext) 904 for (player *plnext, *pl = first_player; pl; pl = plnext)
933 } 934 }
934#endif 935#endif
935 } /* end of for loop for all the players */ 936 } /* end of for loop for all the players */
936 } /* for flag */ 937 } /* for flag */
937 938
938 for (player *pl = first_player; pl; pl = pl->next) 939 for_all_players (pl)
939 { 940 {
940 if (settings.casting_time) 941 if (settings.casting_time)
941 { 942 {
942 if (pl->ob->casting_time > 0) 943 if (pl->ob->casting_time > 0)
943 { 944 {
956 957
957static void 958static void
958process_players2 () 959process_players2 ()
959{ 960{
960 /* Then check if any players should use weapon-speed instead of speed */ 961 /* Then check if any players should use weapon-speed instead of speed */
961 for (player *pl = first_player; pl; pl = pl->next) 962 for_all_players (pl)
962 { 963 {
963 /* The code that did weapon_sp handling here was out of place - 964 /* The code that did weapon_sp handling here was out of place -
964 * this isn't called until after the player has finished there 965 * this isn't called until after the player has finished there
965 * actions, and is thus out of place. All we do here is bounds 966 * actions, and is thus out of place. All we do here is bounds
966 * checking. 967 * checking.
1155{ 1156{
1156 LOG (llevDebug, "Cleanup called.\n"); 1157 LOG (llevDebug, "Cleanup called.\n");
1157 1158
1158 if (init_done) 1159 if (init_done)
1159 { 1160 {
1160 for (player *pl = first_player; pl; pl = pl->next) 1161 for_all_players (pl)
1161 pl->save (1); 1162 pl->save (1);
1162 1163
1163 for (player *pl = first_player; pl; pl = pl->next) 1164 for_all_players (pl)
1164 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED)) 1165 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED))
1165 leave_map (pl->ob); 1166 leave_map (pl->ob);
1166 1167
1167 clean_tmp_files (); 1168 clean_tmp_files ();
1168 write_book_archive (); 1169 write_book_archive ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines