modify victual.piece->owt depending on time spent consuming it */
| 289 | |
| 290 | /* modify victual.piece->owt depending on time spent consuming it */ |
| 291 | staticfn void |
| 292 | recalc_wt(void) |
| 293 | { |
| 294 | struct obj *piece = svc.context.victual.piece; |
| 295 | |
| 296 | if (!piece) { |
| 297 | impossible("recalc_wt without piece"); |
| 298 | return; |
| 299 | } |
| 300 | debugpline1("Old weight = %d", piece->owt); |
| 301 | debugpline2("Used time = %d, Req'd time = %d", |
| 302 | svc.context.victual.usedtime, svc.context.victual.reqtime); |
| 303 | piece->owt = weight(piece); |
| 304 | debugpline1("New weight = %d", piece->owt); |
| 305 | } |
| 306 | |
| 307 | /* called when eating interrupted by an event */ |
| 308 | void |
no test coverage detected