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.25 by root, Tue Sep 12 23:22:32 2006 UTC vs.
Revision 1.28 by root, Thu Sep 14 23:13:49 2006 UTC

16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software 18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 20
21 The authors can be reached via e-mail at crossfire-devel@real-time.com 21 The authors can be reached via e-mail at <crossfire@schmorp.de>
22*/ 22*/
23 23
24#include <global.h> 24#include <global.h>
25#include <object.h> 25#include <object.h>
26#include <tod.h> 26#include <tod.h>
1100 1100
1101void 1101void
1102process_events (mapstruct *map) 1102process_events (mapstruct *map)
1103{ 1103{
1104 object *op; 1104 object *op;
1105
1106 static object *marker;
1107 if (!marker)
1105 object *marker = get_object (); 1108 marker = get_object ();
1106 tag_t tag;
1107 1109
1108 process_players1 (map); 1110 process_players1 (map);
1109 1111
1110 marker->active_next = active_objects; 1112 marker->active_next = active_objects;
1111 1113
1116 active_objects = marker; 1118 active_objects = marker;
1117 1119
1118 while (marker->active_next) 1120 while (marker->active_next)
1119 { 1121 {
1120 op = marker->active_next; 1122 op = marker->active_next;
1121 tag = op->count;
1122 1123
1123 /* Move marker forward - swap op and marker */ 1124 /* Move marker forward - swap op and marker */
1124 op->active_prev = marker->active_prev; 1125 op->active_prev = marker->active_prev;
1125 1126
1126 if (op->active_prev) 1127 if (op->active_prev)
1213 LOG (llevDebug, "process_events: calling process_object with removed object %s\n", op->name ? op->name : "null"); 1214 LOG (llevDebug, "process_events: calling process_object with removed object %s\n", op->name ? op->name : "null");
1214 } 1215 }
1215#endif 1216#endif
1216 --op->speed_left; 1217 --op->speed_left;
1217 process_object (op); 1218 process_object (op);
1219
1218 if (was_destroyed (op, tag)) 1220 if (op->destroyed ())
1219 continue; 1221 continue;
1220 } 1222 }
1223
1221 if (settings.casting_time == TRUE && op->casting_time > 0) 1224 if (settings.casting_time == TRUE && op->casting_time > 0)
1222 op->casting_time--; 1225 op->casting_time--;
1226
1223 if (op->speed_left <= 0) 1227 if (op->speed_left <= 0)
1224 op->speed_left += FABS (op->speed); 1228 op->speed_left += FABS (op->speed);
1225 } 1229 }
1226 1230
1227 /* Remove marker object from active list */ 1231 /* Remove marker object from active list */
1229 marker->active_prev->active_next = NULL; 1233 marker->active_prev->active_next = NULL;
1230 else 1234 else
1231 active_objects = NULL; 1235 active_objects = NULL;
1232 1236
1233 process_players2 (map); 1237 process_players2 (map);
1234
1235 free_object (marker);
1236} 1238}
1237 1239
1238void 1240void
1239clean_tmp_files (void) 1241clean_tmp_files (void)
1240{ 1242{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines