forked from tanglewoodforest/src
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhide.cc
More file actions
29 lines (26 loc) · 629 Bytes
/
hide.cc
File metadata and controls
29 lines (26 loc) · 629 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <sys/types.h>
#include <stdio.h>
#include "define.h"
#include "struct.h"
void spoil_hide( char_data* ch )
{
if( !is_set( ch->status, STAT_HIDING ) )
return;
for( int i = 0; i < ch->array->size; i++ ) {
char_data* rch;
if( ( rch = character( ch->array->list[i] ) )
&& rch != ch
&& !ch->seen_by.includes( rch ) ) {
if( !ch->Seen( rch ) ) {
remove_bit( ch->status, STAT_HIDING );
if( ch->Seen( rch ) ) {
send( rch, "++ You notice %s hiding in the shadows! ++\n\r", ch );
ch->seen_by += rch;
}
set_bit( ch->status, STAT_HIDING );
} else {
ch->seen_by += rch;
}
}
}
}