MCPcopy Index your code
hub / github.com/NetHack/NetHack / end_running

Function end_running

src/hack.c:4129–4158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4127}
4128
4129void
4130end_running(boolean and_travel)
4131{
4132 /* moveloop() suppresses time_botl when context.run is non-zero; when
4133 running stops, update 'time' even if other botl status is unchanged */
4134 if (svc.context.run) {
4135 svc.context.run = 0;
4136 if (flags.time)
4137 disp.time_botl = TRUE;
4138 /* classify_terrain() suppresses setting disp.botl when
4139 running; after that, it can no longer compare current terrain
4140 against iflaga.terrain_typ to detect a change, so recompute */
4141 if (flags.terrainstatus) {
4142 iflags.terrain_typ = MAX_TYPE; /* "none of the above" value */
4143 classify_terrain();
4144 }
4145 }
4146
4147 /* 'context.mv' isn't travel but callers who want to end travel
4148 all clear it too */
4149 if (and_travel)
4150 svc.context.travel = svc.context.travel1 = svc.context.mv = 0;
4151 if (gt.travelmap) {
4152 selection_free(gt.travelmap, TRUE);
4153 gt.travelmap = NULL;
4154 }
4155 /* cancel multi */
4156 if (gm.multi > 0)
4157 gm.multi = 0;
4158}
4159
4160void
4161nomul(int nval)

Callers 6

allmain.cFile · 0.85
do_attackFunction · 0.85
findtravelpathFunction · 0.85
nomulFunction · 0.85
losehpFunction · 0.85
newuhsFunction · 0.85

Calls 2

classify_terrainFunction · 0.85
selection_freeFunction · 0.85

Tested by

no test coverage detected