comparison xrogue/player.c @ 237:2236ef808bcb

XRogue: fix some uses of entire structs instead of their members. Some calls to runto() were given a pointer to the player struct instead of to the player's coordinates. A call to death() was passed a pointer to a monster instead of the monster's type number.
author John "Elwin" Edwards
date Tue, 08 Mar 2016 20:47:57 -0500
parents f54901b9c39b
children
comparison
equal deleted inserted replaced
236:7c1cb43f346e 237:2236ef808bcb
508 msg("%s is set free by your generosity. ", prname(monster_name(th), TRUE)); 508 msg("%s is set free by your generosity. ", prname(monster_name(th), TRUE));
509 del_pack(ll); /* get rid of it */ 509 del_pack(ll); /* get rid of it */
510 /* just let him roam around */ 510 /* just let him roam around */
511 turn_on(*th, ISRUN); 511 turn_on(*th, ISRUN);
512 if (on(*th, ISFLEE)) turn_off(*th, ISFLEE); 512 if (on(*th, ISFLEE)) turn_off(*th, ISFLEE);
513 runto(th, &player); 513 runto(th, &hero);
514 th->t_action = A_NIL; 514 th->t_action = A_NIL;
515 return; 515 return;
516 } 516 }
517 else if (on(*th, ISRUN) && off(*th, ISUNIQUE)) { 517 else if (on(*th, ISRUN) && off(*th, ISUNIQUE)) {
518 /* if NOT sleeping and not a unique */ 518 /* if NOT sleeping and not a unique */
535 } 535 }
536 /* just let him roam around */ 536 /* just let him roam around */
537 turn_on(*th, ISRUN); 537 turn_on(*th, ISRUN);
538 if (on(*th, ISFLEE)) 538 if (on(*th, ISFLEE))
539 turn_off(*th, ISFLEE); 539 turn_off(*th, ISFLEE);
540 runto(th, &player); 540 runto(th, &hero);
541 th->t_action = A_NIL; 541 th->t_action = A_NIL;
542 return; 542 return;
543 } 543 }
544 } 544 }
545 } 545 }