wait_state.txt

snippets · 986 B · 2010-03-30

WAIT_STATE for immortals: so immortals are never affected by code-generated lag.

Download   « Back to the snippets list

To make it so that immortals never are affected by WAIT_STATE (no code-generated
lag), you just need to make this simple addition to WAIT_STATE:

in MUD.H, find the following...

#define WAIT_STATE(ch, npulse) ((ch)->wait=(!IS_NPC(ch)&&ch->pcdata->nuisance&&\
                              (ch->pcdata->nuisance->flags>4))?UMAX((ch)->wait,\
                              (npulse+((ch)->pcdata->nuisance->flags-4)+ \
                              ch->pcdata->nuisance->power)): \
                              UMAX((ch)->wait, (npulse)))



And change it to look like this:


#define WAIT_STATE(ch, npulse) ((ch)->wait=(!IS_NPC(ch)&&ch->pcdata->nuisance&&\
                              (ch->pcdata->nuisance->flags>4))?UMAX((ch)->wait,\
                              (npulse+((ch)->pcdata->nuisance->flags-4)+ \
                              ch->pcdata->nuisance->power)): \
                              UMAX((ch)->wait, (IS_IMMORTAL(ch) ? 0 :(npulse))))


Make clean, and recompile.

Site Stats

Snippets: 1791
Codebases: 571