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.116 by root, Sun Apr 29 03:44:36 2007 UTC vs.
Revision 1.117 by root, Sun Apr 29 21:44:35 2007 UTC

231 231
232 /* make sure he's a player -- needed because of class change. */ 232 /* make sure he's a player -- needed because of class change. */
233 ob->type = PLAYER; // we are paranoid 233 ob->type = PLAYER; // we are paranoid
234 ob->race = ob->arch->clone.race; 234 ob->race = ob->arch->clone.race;
235 235
236 if (!legal_range (ob, shoottype)) 236 if (!legal_range (shoottype))
237 shoottype = range_none; 237 shoottype = range_none;
238 238
239 ob->carrying = sum_weight (ob); 239 ob->carrying = sum_weight (ob);
240 link_player_skills (ob); 240 link_player_skills (ob);
241 241
1961 if (key) 1961 if (key)
1962 { 1962 {
1963 object *container = key->env; 1963 object *container = key->env;
1964 1964
1965 play_sound_map (op->map, op->x, op->y, SOUND_OPEN_DOOR); 1965 play_sound_map (op->map, op->x, op->y, SOUND_OPEN_DOOR);
1966
1966 if (action_makes_visible (op)) 1967 if (action_makes_visible (op))
1967 make_visible (op); 1968 make_visible (op);
1969
1968 if (door->inv && (door->inv->type == RUNE || door->inv->type == TRAP)) 1970 if (door->inv && (door->inv->type == RUNE || door->inv->type == TRAP))
1969 spring_trap (door->inv, op); 1971 spring_trap (door->inv, op);
1970 1972
1971 if (door->type == DOOR) 1973 if (door->type == DOOR)
1972 hit_player (door, 9998, op, AT_PHYSICAL, 1); /* Break through the door */ 1974 hit_player (door, 9998, op, AT_PHYSICAL, 1); /* Break through the door */
2002 */ 2004 */
2003void 2005void
2004move_player_attack (object *op, int dir) 2006move_player_attack (object *op, int dir)
2005{ 2007{
2006 object *tmp, *mon; 2008 object *tmp, *mon;
2007 sint16 nx, ny;
2008 int on_battleground; 2009 int on_battleground;
2009 maptile *m; 2010 maptile *m;
2010 2011
2011 nx = freearr_x[dir] + op->x; 2012 sint16 nx = freearr_x[dir] + op->x;
2012 ny = freearr_y[dir] + op->y; 2013 sint16 ny = freearr_y[dir] + op->y;
2013 2014
2014 on_battleground = op_on_battleground (op, 0, 0); 2015 on_battleground = op_on_battleground (op, 0, 0);
2015 2016
2016 /* If braced, or can't move to the square, and it is not out of the 2017 /* If braced, or can't move to the square, and it is not out of the
2017 * map, attack it. Note order of if statement is important - don't 2018 * map, attack it. Note order of if statement is important - don't
2097 /* If we're braced, we don't want to switch places with it */ 2098 /* If we're braced, we don't want to switch places with it */
2098 if (op->contr->braced) 2099 if (op->contr->braced)
2099 return; 2100 return;
2100 2101
2101 play_sound_map (op->map, op->x, op->y, SOUND_PUSH_PLAYER); 2102 play_sound_map (op->map, op->x, op->y, SOUND_PUSH_PLAYER);
2102 (void) push_ob (mon, dir, op); 2103 push_ob (mon, dir, op);
2103 if (op->contr->tmp_invis || op->hide) 2104 if (op->contr->tmp_invis || op->hide)
2104 make_visible (op); 2105 make_visible (op);
2105 2106
2106 return; 2107 return;
2107 } 2108 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines