Re: Stock BUG!

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 09/10/97


On Wed, 10 Sep 1997, Daniel Koepke wrote:

>On Wed, 10 Sep 1997, George wrote:
>
>-+#define C_MOB_SPEC(zone,mob)    \
>-+        if ((check = real_mobile(((zone)*100)+(mob))) < 0) {\
>-+          log("Ack! A -1");     \
>-+        } else \
>-+          mob_index[check].func

>  if (real_mobile(((zone)*100)+(mob))) < 0) { \
>
>will work fine (er, should).

Because then you have the overhead of doing TWO real_mobile() lookups which
can easily be avoided by a 2 (or 4) byte integer on the stack that goes
away at the end of assign_kings_castle()

It's faster at no cost.

 --
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST