Advertise map-mode via overload of typing-mode

Tell other clients when map mode is active, for the same reason that
typing mode is advertised.
This commit is contained in:
Kp 2013-12-13 22:48:42 +00:00
parent 8c74708ad4
commit 0938e819e5
4 changed files with 9 additions and 3 deletions

View file

@ -260,6 +260,7 @@ enum { NETFLAG_DOPOWERUP = 0 for_each_netflag_value(define_netflag_powerup_mask)
enum msgsend_state_t {
msgsend_none,
msgsend_typing,
msgsend_automap,
};
extern const char multi_allow_powerup_text[MULTI_ALLOW_POWERUP_MAX][MULTI_ALLOW_POWERUP_TEXT_LENGTH];
@ -402,6 +403,7 @@ extern msgsend_state_t multi_sending_message[MAX_PLAYERS];
extern int multi_defining_message;
extern int multi_message_input_sub(int key);
extern void multi_send_message_start();
void multi_send_msgsend_state(msgsend_state_t state);
extern int multi_powerup_is_4pack(int);
extern int PhallicLimit,PhallicMan;

View file

@ -879,6 +879,7 @@ static int automap_handler(window *wind, d_event *event, automap *am)
d_free(am);
window_set_visible(Game_wind, 1);
Automap_active = 0;
multi_send_msgsend_state(msgsend_none);
return 0; // continue closing
break;
@ -998,6 +999,7 @@ void do_automap( int key_code )
gr_palette_load( gr_palette );
Automap_active = 1;
multi_send_msgsend_state(msgsend_automap);
}
void adjust_segment_limit(automap *am, int SegmentLimit)

View file

@ -2736,9 +2736,12 @@ void show_HUD_names()
else if (show_name)
name = Players[pnum].callsign;
const char *trailer = NULL;
if (show_typing && multi_sending_message[pnum])
if (show_typing)
{
trailer = "Typing";
if (multi_sending_message[pnum] == msgsend_typing)
trailer = "Typing";
else if (multi_sending_message[pnum] == msgsend_automap)
trailer = "Map";
}
int written = snprintf(s, sizeof(s), "%s%s%s", name ? name : "", name && trailer ? ", " : "", trailer ? trailer : "");
if (written)

View file

@ -84,7 +84,6 @@ static void multi_send_ranking();
static void multi_new_bounty_target( int pnum );
static void multi_save_game(ubyte slot, uint id, char *desc);
static void multi_restore_game(ubyte slot, uint id);
static void multi_send_msgsend_state(msgsend_state_t state);
static void multi_send_gmode_update();
static inline void vm_angvec_zero(vms_angvec *v)