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

Comparing deliantra/server/server/player.C (file contents):
Revision 1.142 by root, Fri May 18 19:46:22 2007 UTC vs.
Revision 1.144 by root, Sat May 26 15:44:08 2007 UTC

157 op->x = -1; 157 op->x = -1;
158 op->y = -1; 158 op->y = -1;
159} 159}
160 160
161void 161void
162player::enter_map ()
163{
164 object *tmp = object::create ();
165
166 EXIT_PATH (tmp) = maplevel;
167 EXIT_X (tmp) = ob->x;
168 EXIT_Y (tmp) = ob->y;
169 ob->enter_exit (tmp);
170
171 tmp->destroy ();
172}
173
174void
175player::activate () 162player::activate ()
176{ 163{
177 if (active) 164 if (active)
178 return; 165 return;
179 166
181 ob->remove (); 168 ob->remove ();
182 ob->map = 0; 169 ob->map = 0;
183 ob->activate_recursive (); 170 ob->activate_recursive ();
184 CLEAR_FLAG (ob, FLAG_FRIENDLY); 171 CLEAR_FLAG (ob, FLAG_FRIENDLY);
185 add_friendly_object (ob); 172 add_friendly_object (ob);
186 enter_map ();
187} 173}
188 174
189void 175void
190player::deactivate () 176player::deactivate ()
191{ 177{
2180 * that party_number -1 is no party, so attacks can still happen. 2166 * that party_number -1 is no party, so attacks can still happen.
2181 */ 2167 */
2182 else if ((mon->stats.hp >= 0) && QUERY_FLAG (mon, FLAG_ALIVE) && 2168 else if ((mon->stats.hp >= 0) && QUERY_FLAG (mon, FLAG_ALIVE) &&
2183 ((mon->type != PLAYER || op->contr->party == NULL || op->contr->party != mon->contr->party))) 2169 ((mon->type != PLAYER || op->contr->party == NULL || op->contr->party != mon->contr->party)))
2184 { 2170 {
2185 if (op->contr->weapon_sp_left > 0.f) 2171 if (op->contr->weapon_sp_left > 0.f && !op->flag [FLAG_WIZPASS])
2186 { 2172 {
2187 --op->contr->weapon_sp_left; 2173 --op->contr->weapon_sp_left;
2188 2174
2189 skill_attack (mon, op, 0, 0, 0); 2175 skill_attack (mon, op, 0, 0, 0);
2190 2176

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines