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.278 by root, Sun May 9 22:33:29 2010 UTC vs.
Revision 1.281 by root, Mon Oct 18 09:33:11 2010 UTC

181player::set_object (object *op) 181player::set_object (object *op)
182{ 182{
183 ob = observe = viewpoint = op; 183 ob = observe = viewpoint = op;
184 ob->contr = this; /* this aren't yet in archetype */ 184 ob->contr = this; /* this aren't yet in archetype */
185 185
186 ob->set_speed (1.0f); 186 ob->speed = 1.0f; // object still inactive, keep it that way
187 ob->speed_left = 0.5f; 187 ob->speed_left = 0.5f;
188 188
189 ob->direction = 5; /* So player faces south */ 189 ob->direction = 5; /* So player faces south */
190} 190}
191 191
1867 || mon->flag [FLAG_CAN_ROLL]) 1867 || mon->flag [FLAG_CAN_ROLL])
1868 && mon != op) 1868 && mon != op)
1869 break; 1869 break;
1870 } 1870 }
1871 1871
1872 if (!mon) /* This happens anytime the player tries to move */ 1872 /* no monster == player tries to move into a wall or so */
1873 return false; /* into a wall */ 1873 if (!mon)
1874 {
1875 if (op->contr->ns->bumpmsg)
1876 for (object *ob = m->at (nx, ny).top; ob; ob = ob->below)
1877 if (op->move_type & ob->move_block)
1878 {
1879 if (ob->move_block == MOVE_ALL)
1880 {
1881 op->play_sound (sound_find ("bump_wall"));
1882
1883 op->statusmsg (ob->invisible
1884 ? "You bump into something."
1885 : format ("You bump into the %s.", query_name (ob))
1886 );
1887 }
1888 else
1889 {
1890 op->play_sound (sound_find ("blocked_move"));
1891
1892 op->statusmsg (ob->invisible
1893 ? "Something blocks you."
1894 : format ("Something blocks you from entering the %s.", query_name (ob))
1895 );
1896 }
1897
1898 break;
1899 }
1900
1901 return false;
1902 }
1874 1903
1875 mon = mon->head_ (); 1904 mon = mon->head_ ();
1876 1905
1877 if ((mon->type == DOOR && mon->stats.hp >= 0) || (mon->type == LOCKED_DOOR)) 1906 if ((mon->type == DOOR && mon->stats.hp >= 0) || (mon->type == LOCKED_DOOR))
1878 if (op->contr->weapon_sp_left > 0.f) 1907 if (op->contr->weapon_sp_left > 0.f)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines