isnt that what CHAR_DATA victim* is doing?
Here is the current code
void do_toggle_murder(CHAR_DATA *ch, char *argument)
{
CHAR_DATA *victim;
set_char_color( AT_RED, ch );
ch_printf( ch, "You are set to %s.\n\r", xIS_SET( ch->act, PLR_MURDER ) ? "stun" : "murder" );
if( !xIS_SET( ch->act, PLR_MURDER ))
xSET_BIT( ch->act, PLR_MURDER );
else
xREMOVE_BIT( ch->act, PLR_MURDER );
if( !IS_NPC( victim ) && xIS_SET( ch->act, PLR_MURDER ) && victim->hit < 1 )
{
victim->hit = 0;
ch_printf( ch, "You spare your victim!" );
act( AT_RED, "$n's life has been spared!", victim, NULL, NULL, TO_ROOM );
act( AT_RED, "Your life has been spared, this time.", victim, NULL, NULL, TO_CHAR );
}
return;
}
and this is what my core file is saying when I check it.
#0 0x08148d2f in do_toggle_murder (ch=0x85c5fb0, argument=0xb54b4a4c "") at player.c:2056
#1 0x0810d05d in interpret (ch=0x85c5fb0, argument=0xb54b4a4c "") at interp.c:543
#2 0x080d2840 in game_loop () at comm.c:881
#3 0x080d1e67 in main (argc=5, argv=0xb54b4ed4) at comm.c:551
#4 0x4b9ced06 in __libc_start_main () from /lib/libc.so.6
(gdb) frame 0
#0 0x08148d2f in do_toggle_murder (ch=0x85c5fb0, argument=0xb54b4a4c "") at player.c:2056
2056 in player.c
(gdb) list
2051 in player.c
maybe you guys can get an understaning of it better than I can :P |