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.40 by root, Tue Dec 12 20:53:03 2006 UTC vs.
Revision 1.41 by root, Tue Dec 12 21:39:57 2006 UTC

194enter_player_savebed (object *op) 194enter_player_savebed (object *op)
195{ 195{
196 maptile *oldmap = op->map; 196 maptile *oldmap = op->map;
197 object *tmp; 197 object *tmp;
198 198
199 tmp = get_object (); 199 tmp = object::create ();
200 200
201 EXIT_PATH (tmp) = op->contr->savebed_map; 201 EXIT_PATH (tmp) = op->contr->savebed_map;
202 EXIT_X (tmp) = op->contr->bed_x; 202 EXIT_X (tmp) = op->contr->bed_x;
203 EXIT_Y (tmp) = op->contr->bed_y; 203 EXIT_Y (tmp) = op->contr->bed_y;
204 enter_exit (op, tmp); 204 enter_exit (op, tmp);
217 EXIT_PATH (tmp) = op->contr->savebed_map; 217 EXIT_PATH (tmp) = op->contr->savebed_map;
218 EXIT_X (tmp) = op->contr->bed_x; 218 EXIT_X (tmp) = op->contr->bed_x;
219 EXIT_Y (tmp) = op->contr->bed_y; 219 EXIT_Y (tmp) = op->contr->bed_y;
220 enter_exit (op, tmp); 220 enter_exit (op, tmp);
221 } 221 }
222
222 tmp->destroy (0); 223 tmp->destroy ();
223} 224}
224 225
225/* All this really is is a glorified remove_object that also updates 226/* All this really is is a glorified remove_object that also updates
226 * the counts on the map if needed. 227 * the counts on the map if needed.
227 */ 228 */
343 op->contr->ranges[range_golem]->remove (); 344 op->contr->ranges[range_golem]->remove ();
344 345
345 if (i == -1) 346 if (i == -1)
346 { 347 {
347 remove_friendly_object (op->contr->ranges[range_golem]); 348 remove_friendly_object (op->contr->ranges[range_golem]);
348 op->contr->ranges[range_golem]->destroy (0); 349 op->contr->ranges[range_golem]->destroy ();
349 op->contr->ranges[range_golem] = 0; 350 op->contr->ranges[range_golem] = 0;
350 } 351 }
351 else 352 else
352 { 353 {
353 for (object *tmp = op->contr->ranges[range_golem]; tmp != NULL; tmp = tmp->more) 354 for (object *tmp = op->contr->ranges[range_golem]; tmp != NULL; tmp = tmp->more)
893 break; 894 break;
894 } 895 }
895 if (tmp) 896 if (tmp)
896 { 897 {
897 tmp->remove (); 898 tmp->remove ();
898 tmp->destroy (0); 899 tmp->destroy ();
899 } 900 }
900 901
901 strcpy (op->contr->savebed_map, path_combine_and_normalize (exit_ob->map->path, EXIT_PATH (exit_ob))); 902 strcpy (op->contr->savebed_map, path_combine_and_normalize (exit_ob->map->path, EXIT_PATH (exit_ob)));
902 op->contr->bed_x = EXIT_X (exit_ob), op->contr->bed_y = EXIT_Y (exit_ob); 903 op->contr->bed_x = EXIT_X (exit_ob), op->contr->bed_y = EXIT_Y (exit_ob);
903 save_player (op, 1); 904 save_player (op, 1);
1098{ 1099{
1099 object *op; 1100 object *op;
1100 1101
1101 static object *marker; 1102 static object *marker;
1102 if (!marker) 1103 if (!marker)
1103 marker = get_object (); 1104 marker = object::create ();
1104 1105
1105 process_players1 (map); 1106 process_players1 (map);
1106 1107
1107 marker->active_next = active_objects; 1108 marker->active_next = active_objects;
1108 1109
1155 { 1156 {
1156 LOG (llevError, "BUG: process_events(): Removed object on list\n"); 1157 LOG (llevError, "BUG: process_events(): Removed object on list\n");
1157 char *dump = dump_object (op); 1158 char *dump = dump_object (op);
1158 LOG (llevError, dump); 1159 LOG (llevError, dump);
1159 free (dump); 1160 free (dump);
1160 op->destroy (0); 1161 op->destroy ();
1161 continue; 1162 continue;
1162 } 1163 }
1163 1164
1164 if (!op->speed) 1165 if (!op->speed)
1165 { 1166 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines