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

Comparing deliantra/server/common/object.C (file contents):
Revision 1.291 by root, Mon Oct 12 14:00:57 2009 UTC vs.
Revision 1.292 by root, Mon Oct 19 21:48:49 2009 UTC

335 335
336 // the player itself is always on a map, so we will find him here 336 // the player itself is always on a map, so we will find him here
337 // even if our inv is in a player. 337 // even if our inv is in a player.
338 if (envest->is_on_map ()) 338 if (envest->is_on_map ())
339 if (object *pl = envest->ms ().player ()) 339 if (object *pl = envest->ms ().player ())
340 if (pl->container == env) 340 if (pl->container_ () == env)
341 return pl; 341 return pl;
342 } 342 }
343 else 343 else
344 { 344 {
345 // maybe there is a player standing on the same mapspace 345 // maybe there is a player standing on the same mapspace
346 // this will catch the case where "this" is a player 346 // this will catch the case where "this" is a player
347 if (object *pl = ms ().player ()) 347 if (object *pl = ms ().player ())
348 if ((!pl->container && pl->contr->ns && !pl->contr->ns->update_look) 348 if ((pl->contr->ns && !pl->container_ () && !pl->contr->ns->update_look)
349 || this == pl->container) 349 || pl->container_ () == this)
350 return pl; 350 return pl;
351 } 351 }
352 } 352 }
353 353
354 return 0; 354 return 0;
1119 close_container (); 1119 close_container ();
1120 1120
1121 --map->players; 1121 --map->players;
1122 map->touch (); 1122 map->touch ();
1123 } 1123 }
1124 else if (pl->container == this) 1124 else if (pl->container_ () == this)
1125 { 1125 {
1126 // removing a container should close it 1126 // removing a container should close it
1127 close_container (); 1127 close_container ();
1128 } 1128 }
1129 1129
1145 1145
1146 int check_walk_off = !flag [FLAG_NO_APPLY]; 1146 int check_walk_off = !flag [FLAG_NO_APPLY];
1147 1147
1148 if (object *pl = ms.player ()) 1148 if (object *pl = ms.player ())
1149 { 1149 {
1150 if (pl->container == this) 1150 if (pl->container_ () == this)
1151 /* If a container that the player is currently using somehow gets 1151 /* If a container that the player is currently using somehow gets
1152 * removed (most likely destroyed), update the player view 1152 * removed (most likely destroyed), update the player view
1153 * appropriately. 1153 * appropriately.
1154 */ 1154 */
1155 pl->close_container (); 1155 pl->close_container ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines