summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-15 04:49:38 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-15 04:49:38 +0800
commitd133742fac6c71dd64568b9a23911b2a9a1e0335 (patch)
tree265a7328944a8cb3b11756048cb57648ff2a7542
parent3b920f88afea0e1bd107610afd21cf21622b0209 (diff)
downloadpttbbs-d133742fac6c71dd64568b9a23911b2a9a1e0335.tar
pttbbs-d133742fac6c71dd64568b9a23911b2a9a1e0335.tar.gz
pttbbs-d133742fac6c71dd64568b9a23911b2a9a1e0335.tar.bz2
pttbbs-d133742fac6c71dd64568b9a23911b2a9a1e0335.tar.lz
pttbbs-d133742fac6c71dd64568b9a23911b2a9a1e0335.tar.xz
pttbbs-d133742fac6c71dd64568b9a23911b2a9a1e0335.tar.zst
pttbbs-d133742fac6c71dd64568b9a23911b2a9a1e0335.zip
fix bug of ofo's waterball
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@26 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/io.c24
-rw-r--r--mbbsd/talk.c13
2 files changed, 21 insertions, 16 deletions
diff --git a/mbbsd/io.c b/mbbsd/io.c
index c0e796df..bbc3baa5 100644
--- a/mbbsd/io.c
+++ b/mbbsd/io.c
@@ -1,4 +1,4 @@
-/* $Id: io.c,v 1.3 2002/03/14 08:17:45 in2 Exp $ */
+/* $Id: io.c,v 1.4 2002/03/14 20:49:38 in2 Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -336,18 +336,20 @@ int igetch() {
return ch;
case Ctrl('W'):
- if(watermode >0)
- {
- water_which_flag=(water_which_flag+water_usies)%(water_usies+1);
- if(water_which_flag==0)
+ if( WATERMODE(WATER_NEW) ){
+ if( watermode > 0 ){
+ water_which_flag=(water_which_flag+water_usies)%(water_usies+1);
+ if(water_which_flag==0)
water_which = &water[0];
- else
+ else
water_which = swater[water_which_flag-1];
- watermode = 1;
- t_display_new();
- continue;
- }
- else return ch;
+ watermode = 1;
+ t_display_new();
+ continue;
+ }
+ }
+ return ch;
+
default:
return ch;
}
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index 8bf45197..c87277d6 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -1,4 +1,4 @@
-/* $Id: talk.c,v 1.8 2002/03/14 10:14:55 in2 Exp $ */
+/* $Id: talk.c,v 1.9 2002/03/14 20:49:38 in2 Exp $ */
#include <stdio.h>
#include <string.h>
#include <errno.h>
@@ -607,7 +607,8 @@ int my_write(pid_t pid, char *prompt, char *id, int flag, userinfo_t *puin)
outmsg("\033[1;33;41m糟糕! 對方已落跑了(不在站上)! \033[37m~>_<~\033[m");
clrtoeol();
refresh();
- watermode = -1;
+ if( !WATERMODE(WATER_OFO) )
+ watermode = -1;
return 0;
}
currutmp->mode = 0;
@@ -655,12 +656,14 @@ int my_write(pid_t pid, char *prompt, char *id, int flag, userinfo_t *puin)
currutmp->chatid[0] = c0;
currutmp->mode = mode0;
currstat = currstat0;
- watermode = -1;
+ if( !WATERMODE(WATER_OFO) )
+ watermode = -1;
return 0;
}
}
- watermode = -1;
+ if( !WATERMODE(WATER_OFO) )
+ watermode = -1;
if(!uin || !*uin->userid || strcasecmp(destid, uin->userid)) {
outmsg("\033[1;33;41m糟糕! 對方已落跑了(不在站上)! \033[37m~>_<~\033[m");
clrtoeol();
@@ -793,7 +796,7 @@ void t_display_new(void)
move(i + off, 0);
outs("──────────────────────"
"─────────────────");
- if( WATERMODE(WATER_NEW))
+ if( WATERMODE(WATER_NEW) )
while( i++ <= water[0].count ) {
move(i + off, 0);
clrtoeol();