diff -u hexen-0.2.3-orig/a_action.c hexen-0.2.3/a_action.c --- hexen-0.2.3-orig/a_action.c Tue Dec 21 00:42:03 1999 +++ hexen-0.2.3/a_action.c Sun Apr 16 18:46:47 2000 @@ -628,6 +628,7 @@ { mo->special1 = actor->special1; // Pointer to master (mobj_t *) P_GivePower(master->player, pw_minotaur); + master->listener = mo; } // Make smoke puff diff -u hexen-0.2.3-orig/ct_chat.c hexen-0.2.3/ct_chat.c --- hexen-0.2.3-orig/ct_chat.c Tue Dec 21 00:42:03 1999 +++ hexen-0.2.3/ct_chat.c Sun Apr 16 19:41:10 2000 @@ -33,7 +33,9 @@ CT_PLR_PLAYER6, CT_PLR_PLAYER7, CT_PLR_PLAYER8, - CT_PLR_ALL + CT_PLR_ALL, + CT_PLR_MINOTAUR, + CT_PLR_LAST }; #define CT_KEY_BLUE 'b' @@ -46,6 +48,7 @@ #define CT_KEY_PLAYER8 'p' // Purple #define CT_KEY_ALL 't' #define CT_ESCAPE 6 +#define CT_KEY_MINOTAUR 'm' // Public data @@ -148,7 +151,7 @@ if(!netgame) { - return false; +// return false; } if(ev->data1 == KEY_RALT) { @@ -203,7 +206,11 @@ { sendto = CT_PLR_PLAYER8; } - if(sendto == 0 || (sendto != CT_PLR_ALL && !playeringame[sendto-1]) + if(ev->data1 == CT_KEY_MINOTAUR) + { + sendto = CT_PLR_MINOTAUR; + } + else if(sendto == 0 || (sendto != CT_PLR_ALL && !playeringame[sendto-1]) || sendto == consoleplayer+1) { return false; @@ -297,7 +304,7 @@ } if((c = players[i].cmd.chatchar) != 0) { - if(c <= CT_PLR_ALL) + if(c < CT_PLR_LAST) { chat_dest[i] = c; continue; @@ -323,7 +330,9 @@ { strcpy(plr_lastmsg[i], chat_msg[i]); } - if(i != consoleplayer && (chat_dest[i] == consoleplayer+1 + if (i == consoleplayer && chat_dest[i] == CT_PLR_MINOTAUR) + strcpy(players[consoleplayer].mo->listener->message, chat_msg[i]); + else if (i != consoleplayer && (chat_dest[i] == consoleplayer+1 || chat_dest[i] == CT_PLR_ALL) && *chat_msg[i]) { P_SetMessage(&players[consoleplayer], plr_lastmsg[i], diff -u hexen-0.2.3-orig/g_game.c hexen-0.2.3/g_game.c --- hexen-0.2.3-orig/g_game.c Tue Dec 21 00:42:04 1999 +++ hexen-0.2.3/g_game.c Sun Apr 16 11:49:54 2000 @@ -1211,7 +1211,7 @@ player->readyweapon = player->mo->special1; // Restore weapon player->morphTics = 0; } - player->messageTics = 0; + player->mo->messageTics = 0; player->lookdir = 0; player->mo->flags &= ~MF_SHADOW; // Remove invisibility player->extralight = 0; // Remove weapon flashes @@ -1263,7 +1263,8 @@ p->health = MAXHEALTH; p->readyweapon = p->pendingweapon = WP_FIRST; p->weaponowned[WP_FIRST] = true; - p->messageTics = 0; + if (p->mo) + p->mo->messageTics = 0; p->lookdir = 0; localQuakeHappening[player] = false; if(p == &players[consoleplayer]) diff -u hexen-0.2.3-orig/h2_main.c hexen-0.2.3/h2_main.c --- hexen-0.2.3-orig/h2_main.c Sun Jan 16 23:16:37 2000 +++ hexen-0.2.3/h2_main.c Mon Apr 17 20:44:30 2000 @@ -681,18 +681,18 @@ player_t *player; player = &players[consoleplayer]; - if(player->messageTics <= 0 || !player->message) + if(!player->mo || player->mo->messageTics <= 0 || !player->mo->message) { // No message return; } if(player->yellowMessage) { - MN_DrTextAYellow(player->message, - 160-MN_TextAWidth(player->message)/2, 1); + MN_DrTextAYellow(player->mo->message, + 160-MN_TextAWidth(player->mo->message)/2, 1); } else { - MN_DrTextA(player->message, 160-MN_TextAWidth(player->message)/2, 1); + MN_DrTextA(player->mo->message, 160-MN_TextAWidth(player->mo->message)/2, 1); } } diff -u hexen-0.2.3-orig/h2def.h hexen-0.2.3/h2def.h --- hexen-0.2.3-orig/h2def.h Sun Jan 16 23:17:34 2000 +++ hexen-0.2.3/h2def.h Sun Apr 16 18:46:26 2000 @@ -327,6 +327,9 @@ short tid; // thing identifier byte special; // special byte args[5]; // special arguments + char message[80]; // hint messages + int messageTics; // counter for showing messages + struct mobj_s *listener; } mobj_t; // each sector has a degenmobj_t in it's center for sound origin purposes @@ -660,8 +663,6 @@ int refire; // refired shots are less accurate int killcount, itemcount, secretcount; // for intermission - char message[80]; // hint messages - int messageTics; // counter for showing messages short ultimateMessage; short yellowMessage; int damagecount, bonuscount;// for screen flashing Only in hexen-0.2.3: hexen.cfg Only in hexen-0.2.3: hexen.wad Only in hexen-0.2.3: hexen.wad.share Only in hexen-0.2.3: hexndata diff -u hexen-0.2.3-orig/in_lude.c hexen-0.2.3/in_lude.c --- hexen-0.2.3-orig/in_lude.c Tue Dec 21 00:42:04 1999 +++ hexen-0.2.3/in_lude.c Sun Apr 16 11:26:51 2000 @@ -100,8 +100,8 @@ AM_Stop(); for(i = 0; i < MAXPLAYERS; i++) { - players[i].messageTics = 0; - players[i].message[0] = 0; + players[i].mo->messageTics = 0; + players[i].mo->message[0] = 0; } SN_StopAllSequences(); } diff -u hexen-0.2.3-orig/info.c hexen-0.2.3/info.c --- hexen-0.2.3-orig/info.c Tue Dec 21 00:42:04 1999 +++ hexen-0.2.3/info.c Sun Apr 16 18:44:37 2000 @@ -164,6 +164,7 @@ void A_WraithFX2 (); void A_MinotaurFade1 (); void A_MinotaurFade2 (); +void A_MinotaurEliza (); void A_MinotaurLook (); void A_MinotaurChase (); void A_MinotaurRoam (); @@ -2262,7 +2263,7 @@ {SPR_MNTR,0,15,NULL,S_MNTR_SPAWN2,0,0}, // S_MNTR_SPAWN1 {SPR_MNTR,0,15,A_MinotaurFade1,S_MNTR_SPAWN3,0,0}, // S_MNTR_SPAWN2 {SPR_MNTR,0,3,A_MinotaurFade2,S_MNTR_LOOK1,0,0}, // S_MNTR_SPAWN3 -{SPR_MNTR,0,10,A_MinotaurLook,S_MNTR_LOOK2,0,0}, // S_MNTR_LOOK1 +{SPR_MNTR,0,10,A_MinotaurEliza,S_MNTR_LOOK1,0,0}, // S_MNTR_LOOK1 {SPR_MNTR,1,10,A_MinotaurLook,S_MNTR_LOOK1,0,0}, // S_MNTR_LOOK2 {SPR_MNTR,0,5,A_MinotaurChase,S_MNTR_WALK2,0,0}, // S_MNTR_WALK1 {SPR_MNTR,1,5,A_MinotaurChase,S_MNTR_WALK3,0,0}, // S_MNTR_WALK2 diff -u hexen-0.2.3-orig/mn_menu.c hexen-0.2.3/mn_menu.c --- hexen-0.2.3-orig/mn_menu.c Tue Dec 21 00:42:04 1999 +++ hexen-0.2.3/mn_menu.c Sun Apr 16 11:28:04 2000 @@ -1245,7 +1245,7 @@ case KEY_ESCAPE: if(askforquit) { - players[consoleplayer].messageTics = 0; + players[consoleplayer].mo->messageTics = 0; askforquit = false; typeofask = 0; paused = false; diff -u hexen-0.2.3-orig/p_enemy.c hexen-0.2.3/p_enemy.c --- hexen-0.2.3-orig/p_enemy.c Tue Dec 21 00:42:04 1999 +++ hexen-0.2.3/p_enemy.c Tue Apr 18 07:40:52 2000 @@ -1066,9 +1066,71 @@ void A_MinotaurFade2(mobj_t *actor) { + mobj_t *master = (mobj_t *)(actor->special1); + if (master && master->player) + P_SetMessage(master->player, "Hello", false); // Make fully visible actor->flags &= ~MF_SHADOW; actor->flags &= ~MF_ALTSHADOW; +} + +//---------------------------------------------------------------------------- +// +// A_MinotaurEliza - +// +// +//---------------------------------------------------------------------------- +void A_MinotaurEliza(mobj_t *actor) +{ + char response[120]; + char *current, *next; + mobj_t *master = (mobj_t *)(actor->special1); + if (master && master->player && actor->message[0]) + { + switch (P_Random() % 3) + { + case 0: + strcpy(response, "IS IT IMPORTANT TO YOU THAT"); + break; + case 1: + strcpy(response, "WHAT MAKES YOU THINK THAT"); + break; + case 2: + default: + strcpy(response, "WHY DO YOU SAY"); + break; + } + for (current = actor->message; current[0]; current = next) + { + while (current[0] && isspace(*current)) current++; + if (!current[0]) + continue; + for (next = current; next[0] && (!isspace(*next)); next++) ; + next[0] = 0; + next++; + strcat(response, " "); + if (strcmp("I", current) == 0) + strcat(response, "YOU"); + else if (strcmp("YOU", current) == 0) + strcat(response, "I"); + else if (strcmp("AM", current) == 0) + strcat(response, "ARE"); + else if (strcmp("YOUR", current) == 0) + strcat(response, "MY"); + else if (strcmp("MY", current) == 0) + strcat(response, "YOUR"); + else if (strcmp("WAS", current) == 0) + strcat(response, "WERE"); + else if (strcmp("ME", current) == 0) + strcat(response, "YOU"); + else + strcat(response, current); + } + strcat(response, "?"); + response[38] = 0; + P_SetMessage(master->player, response, false); + actor->message[0] = 0; + } } diff -u hexen-0.2.3-orig/p_inter.c hexen-0.2.3/p_inter.c --- hexen-0.2.3-orig/p_inter.c Tue Dec 21 00:42:04 1999 +++ hexen-0.2.3/p_inter.c Sun Apr 16 11:47:57 2000 @@ -69,15 +69,15 @@ } if(strlen(message) > 79) { - memcpy(player->message, message, 80); - player->message[80] = 0; + memcpy(player->mo->message, message, 80); + player->mo->message[80] = 0; } else { - strcpy(player->message, message); + strcpy(player->mo->message, message); } - strupr(player->message); - player->messageTics = MESSAGETICS; + strupr(player->mo->message); + player->mo->messageTics = MESSAGETICS; player->yellowMessage = false; if(ultmsg) { @@ -105,14 +105,14 @@ } if(strlen(message) > 79) { - memcpy(player->message, message, 80); - player->message[80] = 0; + memcpy(player->mo->message, message, 80); + player->mo->message[80] = 0; } else { - strcpy(player->message, message); + strcpy(player->mo->message, message); } - player->messageTics = 5*MESSAGETICS; // Bold messages last longer + player->mo->messageTics = 5*MESSAGETICS; // Bold messages last longer player->yellowMessage = true; if(ultmsg) { @@ -132,7 +132,8 @@ void P_ClearMessage(player_t *player) { - player->messageTics = 0; + if (player->mo) + player->mo->messageTics = 0; if(player == &players[consoleplayer]) { BorderTopRefresh = true; diff -u hexen-0.2.3-orig/p_user.c hexen-0.2.3/p_user.c --- hexen-0.2.3-orig/p_user.c Tue Dec 21 00:42:05 1999 +++ hexen-0.2.3/p_user.c Sun Apr 16 11:32:51 2000 @@ -620,8 +620,8 @@ } // messageTics is above the rest of the counters so that messages will // go away, even in death. - player->messageTics--; // Can go negative - if(!player->messageTics || player->messageTics == -1) + player->mo->messageTics--; // Can go negative + if(!player->mo->messageTics || player->mo->messageTics == -1) { // Refresh the screen when a message goes away player->ultimateMessage = false; // clear out any chat messages. player->yellowMessage = false;