Re: Mobs and player_specials

From: George Greer (greerga@circlemud.org)
Date: 03/11/01


On Sun, 11 Mar 2001, Karl Buchner wrote:

>Is there any reason other that space why mobs should not have
>player_specials?

Go look at what player_special_data has in it.

>Has anyone ever given their mob's playerspecials successfully?  If so,
>does anything other than a little macro juggling and allocation have to
>be done, or is there some prevention of mobs and player_specials deep
>within the code?

Also reflect upon this line from load_mobile():

  mob_proto[i].player_specials = &dummy_mob;

Where 'dummy_mob' is a global variable.

--

If you really wanted to give your mobs a player_special_data, then go for
it.  It's just a waste of (a lot! of) memory though.

greerga@moving:~/mud/circle30bpl16$ gdb bin/circle
(gdb) p sizeof(struct player_special_data)
$1 = 324
(gdb) p sizeof(struct char_data)
$2 = 300

--
George Greer
greerga@circlemud.org

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/04/01 PST