MCPcopy Create free account
hub / github.com/NetHack/NetHack / set_move_cmd

Function set_move_cmd

src/cmd.c:1386–1400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1384}
1385
1386void
1387set_move_cmd(int dir, int run)
1388{
1389 u.dz = zdir[dir];
1390 u.dx = xdir[dir];
1391 u.dy = ydir[dir];
1392 /* #reqmenu -prefix disables autopickup during movement */
1393 if (iflags.menu_requested)
1394 svc.context.nopick = 1;
1395 svc.context.travel = svc.context.travel1 = 0;
1396 if (!gd.domove_attempting && !u.dz) {
1397 svc.context.run = run;
1398 gd.domove_attempting |= (!run ? DOMOVE_WALK : DOMOVE_RUSH);
1399 }
1400}
1401
1402/* move or attack */
1403int

Callers 15

dodownFunction · 0.85
doupFunction · 0.85
do_move_westFunction · 0.85
do_move_northwestFunction · 0.85
do_move_northFunction · 0.85
do_move_northeastFunction · 0.85
do_move_eastFunction · 0.85
do_move_southeastFunction · 0.85
do_move_southFunction · 0.85
do_move_southwestFunction · 0.85
do_rush_westFunction · 0.85
do_rush_northwestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected