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.155 by root, Wed Apr 21 06:45:57 2010 UTC vs.
Revision 1.156 by root, Wed Apr 21 07:10:01 2010 UTC

122 122
123 if (INVOKE_MAP (ENTER, newmap, ARG_PLAYER (contr), ARG_INT (x), ARG_INT (y))) 123 if (INVOKE_MAP (ENTER, newmap, ARG_PLAYER (contr), ARG_INT (x), ARG_INT (y)))
124 return; 124 return;
125 } 125 }
126 126
127 enemy = 0;
128
127 newmap->insert (this, x, y, 0, INS_NO_WALK_ON); 129 newmap->insert (this, x, y, 0, INS_NO_WALK_ON);
128 130
129 enemy = 0; 131 if (map == newmap)
130 132 {
131 if (contr) 133 if (contr)
132 { 134 {
133 contr->maplevel = newmap->path; 135 contr->maplevel = newmap->path;
134 contr->count = 0; 136 contr->count = 0;
135 }
136 137
137 /* Update any golems */ 138 /* Update any golems */
138 if (type == PLAYER)
139 if (object *golem = contr->golem) 139 if (object *golem = contr->golem)
140 { 140 {
141 int i = find_free_spot (golem, newmap, x, y, 1, SIZEOFFREE); 141 int i = find_free_spot (golem, newmap, x, y, 1, SIZEOFFREE);
142 142
143 if (i < 0) 143 if (i < 0)
144 golem->drop_and_destroy (); 144 golem->drop_and_destroy ();
145 else 145 else
146 { 146 {
147 newmap->insert (golem, x + freearr_x[i], y + freearr_y[i]); 147 newmap->insert (golem, x + freearr_x[i], y + freearr_y[i]);
148 golem->direction = find_dir_2 (golem->x - x, golem->y - y); 148 golem->direction = find_dir_2 (golem->x - x, golem->y - y);
149 }
149 } 150 }
150 } 151 }
151 152
152 /* since the players map is already loaded, we don't need to worry 153 /* since the players map is already loaded, we don't need to worry
153 * about pending objects. 154 * about pending objects.
154 */ 155 */
155 remove_all_pets (newmap); 156 move_all_pets ();
157 }
156} 158}
157 159
158/* process_players1 and process_players2 do all the player related stuff. 160/* process_players1 and process_players2 do all the player related stuff.
159 * I moved it out of process events and process_map. This was to some 161 * I moved it out of process events and process_map. This was to some
160 * extent for debugging as well as to get a better idea of the time used 162 * extent for debugging as well as to get a better idea of the time used

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines