Skip to content

Commit

Permalink
Merge pull request #14 from drskinner/COV-0055
Browse files Browse the repository at this point in the history
COV-0055: Goto command updates
  • Loading branch information
Myles Skinner committed Oct 18, 2017
2 parents 465f192 + 1eda78d commit 93f5a33
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
17 changes: 15 additions & 2 deletions src/build.c
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,15 @@ void do_goto(CHAR_DATA* ch, const char* argument)
send_to_char("Overriding private flag!\r\n", ch);
}

if (xIS_SET(location->room_flags, ROOM_NOGOTO)) {
if (get_trust(ch) <= LEVEL_IMPLEMENTOR) {
send_to_char("That room is not a suitable target for goto.\r\n", ch);
return;
} else {
send_to_char("Overriding nogoto flag!\r\n\r\n", ch);
}
}

in_room = ch->in_room;
if (ch->fighting)
stop_fighting(ch, TRUE);
Expand All @@ -1056,7 +1065,11 @@ void do_goto(CHAR_DATA* ch, const char* argument)
(ch->pcdata
&& ch->pcdata->bamfout[0] != '\0') ? ch->pcdata->bamfout : (char *)"leaves in a swirling mist.", TO_ROOM);

ch->regoto = ch->in_room->vnum;
/* need to be ready for hexes! */
if (ch->in_room) {
ch->regoto = ch->in_room->vnum;
}

char_from_room(ch);
if (ch->mount)
{
Expand All @@ -1082,7 +1095,7 @@ void do_goto(CHAR_DATA* ch, const char* argument)
act(AT_ACTION, "You follow $N.", fch, NULL, ch, TO_CHAR);
do_goto(fch, argument);
}
/* Experimental change by Gorog so imm's personal mobs follow them */
/* Experimental change by Gorog so imm's personal mobs follow them */
else if (IS_NPC(fch) && fch->master == ch)
{
char_from_room(fch);
Expand Down
1 change: 0 additions & 1 deletion src/mud.h
Original file line number Diff line number Diff line change
Expand Up @@ -3831,7 +3831,6 @@ DECLARE_DO_FUN(do_hl);
DECLARE_DO_FUN(do_hlist);
DECLARE_DO_FUN(do_holylight);
DECLARE_DO_FUN(do_home);

DECLARE_DO_FUN(do_hset);
DECLARE_DO_FUN(do_ide);
DECLARE_DO_FUN(do_idea);
Expand Down

0 comments on commit 93f5a33

Please sign in to comment.