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.263 by root, Sat Apr 3 22:30:21 2010 UTC vs.
Revision 1.268 by root, Wed Apr 7 19:54:45 2010 UTC

76 ob->remove (); 76 ob->remove ();
77 ob->enemy = 0; // sometimes keeps an extra refcount on itself 77 ob->enemy = 0; // sometimes keeps an extra refcount on itself
78 ob->map = 0; 78 ob->map = 0;
79 party = 0; 79 party = 0;
80 80
81 combat_ob = ranged_ob = 0; //TODO, should be special marker, non-refcounted, not this
82
83 players.erase (this); 81 players.erase (this);
84} 82}
85 83
86// connect the player with a specific client 84// connect the player with a specific client
87// also changes, rationalises, and fixes some incorrect settings 85// also changes, rationalises, and fixes some incorrect settings
139 ob->flag [FLAG_READY_WEAPON] = false; 137 ob->flag [FLAG_READY_WEAPON] = false;
140 ob->flag [FLAG_READY_SKILL] = false; 138 ob->flag [FLAG_READY_SKILL] = false;
141 ob->flag [FLAG_READY_RANGE] = false; 139 ob->flag [FLAG_READY_RANGE] = false;
142 ob->flag [FLAG_READY_BOW] = false; 140 ob->flag [FLAG_READY_BOW] = false;
143 141
144 for (object *op = ob->inv; op; op = op->below)
145 if (op->flag [FLAG_APPLIED])
146 switch (op->type)
147 {
148 case SKILL:
149 op->flag [FLAG_APPLIED] = false;
150 break;
151
152 case SPELL:
153 case WAND:
154 case ROD:
155 case HORN:
156 case BOW:
157 case RANGED:
158 ranged_ob = op;
159 op->flag [FLAG_APPLIED] = false;
160 break;
161
162 case WEAPON:
163 combat_ob = op;
164 op->flag [FLAG_APPLIED] = false;
165 break;
166 }
167
168 ob->update_stats (); // we unapplied stuff above 142 ob->update_stats (); // we unapplied stuff above
169
170 ob->current_weapon = 0;
171 if (object *item = combat_ob ? combat_ob : ranged_ob)
172 ob->apply (item);
173
174 activate (); 143 activate ();
175 144
176 INVOKE_PLAYER (CONNECT, this); 145 INVOKE_PLAYER (CONNECT, this);
177 INVOKE_PLAYER (LOGIN, this); 146 INVOKE_PLAYER (LOGIN, this);
178} 147}
265 disconnect (); 234 disconnect ();
266 235
267 attachable::do_destroy (); 236 attachable::do_destroy ();
268 237
269 if (ob) 238 if (ob)
270 {
271 ob->destroy_inv (false);
272 ob->destroy (); 239 ob->destroy ();
273 }
274 240
275 ob = observe = viewpoint = 0; 241 ob = observe = viewpoint = 0;
276} 242}
277 243
278player::~player () 244player::~player ()
3209 else 3175 else
3210 j = 1; 3176 j = 1;
3211 strcat (buf, spellpathnames[i]); 3177 strcat (buf, spellpathnames[i]);
3212 } 3178 }
3213 } 3179 }
3180
3214 strcat (buf, "."); 3181 strcat (buf, ".");
3215 new_draw_info (NDI_UNIQUE | NDI_BLUE, 0, who, buf); 3182 new_draw_info (NDI_UNIQUE | NDI_BLUE, 0, who, buf);
3216 } 3183 }
3217 3184
3218 /* evtl. adding flags: */ 3185 /* evtl. adding flags: */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines