--- deliantra/server/include/define.h 2008/12/28 10:20:29 1.97 +++ deliantra/server/include/define.h 2009/11/23 14:09:05 1.110 @@ -5,18 +5,19 @@ * Copyright (©) 2003-2005,2007 Mark Wedel & Crossfire Development Team * Copyright (©) 1992,2007 Frank Tore Johansen * - * Deliantra is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Deliantra is free software: you can redistribute it and/or modify it under + * the terms of the Affero GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * You should have received a copy of the Affero GNU General Public License + * and the GNU General Public License along with this program. If not, see + * . * * The authors can be reached via e-mail to */ @@ -38,19 +39,15 @@ #define FONTDIR "" #define FONTNAME "" -/* Decstations have trouble with fabs()... */ -#define FABS(x) fabs (x) - #ifdef __NetBSD__ # include #endif +#define MAXLEVEL 115 // for treasure calculations only + // maximum length of an object name in the protocol #define NAME_LEN 127 -#undef MIN -#undef MAX - #define MAX_STAT 30 /* The maximum legal value of any stat */ #define MIN_STAT 1 /* The minimum legal value of any stat */ @@ -64,18 +61,9 @@ #define MIN_DIGESTION -35 #define MAX_DIGESTION 70 -#define MAX_BUF 1024 - /* Used for all kinds of things */ -#define VERY_BIG_BUF 2048 -#define HUGE_BUF 10240 /* Used for messages - some can be quite long */ -#define SOCKET_BUFLEN 4096 /* Max length a packet could be */ - -#define FONTSIZE 3000 /* Max chars in font */ - -#define MAX_ANIMATIONS 256 +#define MAX_BUF 1024 /* Used for all kinds of things */ #define MAX_NAME 48 -#define MAX_EXT_TITLE 98 #define ATTUNE_REPELL 16 // levels diff for attune/repell @@ -121,7 +109,7 @@ #define ARMOUR 16 #define PEDESTAL 17 #define ALTAR 18 -//19 +#define T_MATCH 19 #define LOCKED_DOOR 20 #define SPECIAL_KEY 21 #define MAP 22 @@ -207,7 +195,7 @@ on chairs, we create a new type and remove all chairs from here. */ //80 -//81 +#define TORCH 81 /* a torch */ #define LAMP 82 /* a lamp */ #define DUPLICATOR 83 /* duplicator/multiplier object */ //84 @@ -219,7 +207,7 @@ #define SPINNER 90 #define GATE 91 #define BUTTON 92 -#define CF_HANDLE 93 +#define T_HANDLE 93 #define HOLE 94 #define TRAPDOOR 95 //96 @@ -290,7 +278,7 @@ #define MATERIAL 161 /* Material for building */ //162 #define ITEM_TRANSFORMER 163 /* Transforming one item with another */ -//164 +#define MAPSCRIPT 164 /* A perl-scripted connectable */ #define SAFE_GROUND 165 /* This is a safe ground, means that neither bombs, potions, alchemy, or magic works here (elmex) */ @@ -345,7 +333,7 @@ #define PU_DEBUG 0x10000000 #define PU_INHIBIT 0x20000000 #define PU_STOP 0x40000000 -//#define PU_NEWMODE 0x80000000 // no longer used +#define PU_ENABLE 0x80000000 // used to distinguish value density #define PU_RATIO 0x0000000F @@ -407,7 +395,7 @@ #define FLAG_ALIVE 0 /* Object can fight (or be fought) */ #define FLAG_WIZ 1 /* Object has special privilegies */ -#define FLAG_REMOVED 2 /* Object is not in any map or invenory */ +#define FLAG_REMOVED 2 /* Object is not in any map or inventory */ #define FLAG_FREED 3 /* Object is in the list of free objects */ #define FLAG_WIZLOOK 4 /* disable los and lighting */ #define FLAG_APPLIED 5 /* Object is ready for use by living */ @@ -456,7 +444,7 @@ #define FLAG_REFL_SPELL 40 /* Spells (some) will reflect from object */ #define FLAG_NO_MAGIC 41 /* Spells (some) can't pass this object */ -#define FLAG_NO_FIX_PLAYER 42 /* fix_player() won't be called */ +//#define FLAG_NO_FIX_PLAYER 42*/ /* fix_player() won't be called */ #define FLAG_IS_LIGHTABLE 43 /* object can be lit */ #define FLAG_TEAR_DOWN 44 /* at->faces[hp*animations/maxhp] at hit */ #define FLAG_RUN_AWAY 45 /* Object runs away from nearest player \ @@ -765,6 +753,9 @@ // also make sure that this is a float, not double, constant #define MIN_ACTIVE_SPEED (1.f / 65536.f) +/* have mercy on players and guarantee a somewhat higher speed */ +#define MIN_PLAYER_SPEED 0.04f + /* * Warning! * If you add message types here, don't forget @@ -860,7 +851,7 @@ /** * Maximum distance a player may hear a sound from. - * This is only used for new client/server sound. If the sound source + * This is only used for client/server sound and say. If the sound source * on the map is farther away than this, we don't sent it to the client. */ #define MAX_SOUND_DISTANCE 16