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

Function kick_object

src/dokick.c:488–504  ·  view source on GitHub ↗

jacket around really_kick_object */

Source from the content-addressed store, hash-verified

486
487/* jacket around really_kick_object */
488staticfn int
489kick_object(coordxy x, coordxy y, char *kickobjnam)
490{
491 int res = 0;
492
493 *kickobjnam = '\0';
494 /* if a pile, the "top" object gets kicked */
495 gk.kickedobj = svl.level.objects[x][y];
496 if (gk.kickedobj) {
497 /* formatted object name matters iff res==0 */
498 Strcpy(kickobjnam, killer_xname(gk.kickedobj));
499 /* kick object; if fatal, done() will clean up kickedobj */
500 res = really_kick_object(x, y);
501 gk.kickedobj = (struct obj *) 0;
502 }
503 return res;
504}
505
506/* guts of kick_object */
507staticfn int

Callers 1

dokickFunction · 0.85

Calls 2

killer_xnameFunction · 0.85
really_kick_objectFunction · 0.85

Tested by

no test coverage detected