File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6529,32 +6529,23 @@ TngUpdateRet update_creature(struct Thing *thing)
65296529
65306530TbBool creature_is_slappable (const struct Thing * thing , PlayerNumber plyr_idx )
65316531{
6532- struct Room * room ;
6533- if (creature_is_being_unconscious (thing ))
6534- {
6532+ if (creature_is_being_unconscious (thing )) {
65356533 return false;
65366534 }
6537- if (creature_is_leaving_and_cannot_be_stopped (thing ))
6538- {
6535+ if (creature_is_leaving_and_cannot_be_stopped (thing )) {
65396536 return false;
65406537 }
6541- if (thing -> owner != plyr_idx )
6542- {
6543- if (creature_is_kept_in_prison (thing ) || creature_is_being_tortured (thing ))
6544- {
6545- room = get_room_creature_works_in (thing );
6546- return (room -> owner == plyr_idx );
6538+ if (thing -> owner != plyr_idx ) {
6539+ if (creature_is_kept_in_prison (thing ) || creature_is_being_tortured (thing )) {
6540+ return creature_is_kept_in_custody_by_player (thing , plyr_idx );
65476541 }
65486542 return false;
65496543 }
6550- if (creature_is_being_sacrificed (thing ) || creature_is_being_summoned (thing ))
6551- {
6544+ if (creature_is_being_sacrificed (thing ) || creature_is_being_summoned (thing )) {
65526545 return false;
65536546 }
6554- if (creature_is_kept_in_prison (thing ) || creature_is_being_tortured (thing ))
6555- {
6556- room = get_room_creature_works_in (thing );
6557- return (room -> owner == plyr_idx );
6547+ if (creature_is_kept_in_prison (thing ) || creature_is_being_tortured (thing )) {
6548+ return creature_is_kept_in_custody_by_player (thing , plyr_idx );
65586549 }
65596550 return true;
65606551}
You can’t perform that action at this time.
0 commit comments