[CF-Devel] /share/settings addition, destroy_items variable

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Sun Dec 7 22:18:53 CST 2003


Here's the patch--this should help alleviate the problem of key items burning up if the server admin allows it.  Coded at the request of 66.6% of my server's 3 players.  Running on my Win32 server atm.

/server/attack.c

141c141,143
< {
---
>
     
      {
     
     >
     
            if (settings.destroy_items == FALSE)
     
     >
     
            return;
     
     

/include/config.h

135c135,136
< #define SET_FRIENDLY_FIRE 5
---
>
     
      #define SET_FRIENDLY_FIRE 5
     
     >
     
      #define DESTROY_ITEMS TRUE
     
     

/server/init.c

585a586,594
>
     
            } else if (!strcasecmp(buf,"destroy_items")) {
     
     >
     
                if (!strcasecmp(cp,"on") || !strcasecmp(cp,"true")) {
     
     >
     
                    settings.destroy_items=TRUE;
     
     >
     
                } else if (!strcasecmp(cp,"off") || !strcasecmp(cp,"false")) {
     
     >
     
                    settings.destroy_items=FALSE;
     
     >
     
                } else {
     
     >
     
                    LOG(llevError,"load_settings: Unkown value for destroy_items: %s\n",
     
     >
     
                        cp);
     
     >
     
                }
     
     

/include/global.h

317c317,318
<       uint16  set_friendly_fire;      /* Percent of damage done by peaceful player vs player damage */
---
>
     
            uint16  set_friendly_fire;      /* Percent of damage done by peaceful player vs player damage */
     
     >
     
            uint8   destroy_items;  /* do items burn up/turn into ice cubes?  key items at stake */ 
     
     
--
_____
Stwong -- Tutorial Writer, Programmer
Sovereign Modding Empire
     
     http://www.smempire.org/
     
     
--

_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list