Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dublication bug & server crashes (RE)



On Sun, Jun 18, 2000 at 03:42:13PM +0200, Andreas Vogl wrote:
> - enter "dumptag" in the commandline.

Fixed by attached patch which simply removes this useless command.

> - start a new char, equip it with a weapon that has
>   attacktype "death", and hit a kobold-generator.
>   (=> death: attackers level 0 - defender level 0 => floating
>   exception => crash)

Generators had already been fixed to have a level >= 1.  The other
attached patch also fixes deathstrike_player() to print an error
message instead of crashing.

I will apply these two patches to the CVS tree if there are no
objections.

> - with the windows client:
>   enter some incredible long text into the chatline
>   (like 50 ascii-chars) and press <say>.

This has been fixed AFAIK.

> - enter a buggy map like dragonhangar
>   (a fix should already exist somewhere)

The only bug I could reproduce on this map is the poisonous booze bug
which has already been fixed.

> - talk to the thief in /city/anthony/prison
>   (currently in discussion)

Well, almost fixed.  :-)

-- 
Jan
--- orig/crossfire-0.95.5-cvs3-patch29/server/commands.c	Mon May 15 22:35:14 2000
+++ crossfire-0.95.5-cvs3/server/commands.c	Sun Jun 18 22:31:40 2000
@@ -52,7 +52,6 @@
 
 #ifdef DEBUG
   {"sstable", command_sstable,	0.0},
-  {"dumptag", dump_object_from_tag, 0.0},
 #endif
 #ifdef DEBUG_MALLOC_LEVEL
   {"verify", command_malloc_verify,0.0},
--- orig/crossfire-0.95.5-cvs3-patch29/server/c_object.c	Tue Jun 13 15:18:39 2000
+++ crossfire-0.95.5-cvs3/server/c_object.c	Sun Jun 18 22:33:01 2000
@@ -31,34 +31,6 @@
 #include <sproto.h>
 #include <living.h>
 
-/* this is a a debug function.  We dump the object with matching 'tag'.
- * This is mostly used for client debugging, so it referances data with
- * just the tag.  This is a costly call, since it searches through all
- * objects.  It dumps the output to the server logfile.
- */
-int dump_object_from_tag(object *pl, char *val)
-{
-    int tag=atoi(val);
-    object *op;
-
-    if (tag<=0) {
-	new_draw_info_format(NDI_UNIQUE, 0, pl,"Invalid tag given: %s\n", val);
-	return 0;
-    }
-
-    for (op=objects; op!=NULL; op=op->next)
-	if (op->count==tag) break;
-
-    if (!op) {
-	new_draw_info_format(NDI_UNIQUE, 0, pl,"Could not find matching object tag (%d)\n", tag);
-    }
-    else {
-	dump_object(op);
-	LOG(llevDebug,"Object dump for tag %d:\n%s\n", tag, errmsg);
-    }
-    return 0;
-}
-
 /*
  * Object id parsing functions
  */
--- orig/crossfire-0.95.5-cvs3-patch29/server/attack.c	Thu Jun  8 17:23:54 2000
+++ crossfire-0.95.5-cvs3/server/attack.c	Sun Jun 18 22:41:05 2000
@@ -1229,8 +1368,12 @@
 		(op->race&&strstr(hitter->slaying,op->race))))	return;
 
     def_lev = op->level;
-/*  atk_lev  = (hitter->level)/2; */ 
-    atk_lev  = SK_level(hitter)/2;
+    if (def_lev < 1) {
+        LOG (llevError, "BUG: arch %s, name %s with level < 1\n",
+             op->arch->name, op->name);
+        def_lev = 1;
+    }
+    atk_lev = SK_level (hitter) / 2;
     LOG(llevDebug,"Deathstrike - attack level %d, defender level %d\n",
 	atk_lev, def_lev);
 
@@ -1248,7 +1391,7 @@
 	     * integer rounding, this only makes any difference if the 
 	     * attack level is double the defender level.
 	     */
-	    *dam *= kill_lev / (def_lev == 0 ? 1 : def_lev);
+	    *dam *= kill_lev / def_lev;
 	}
     } else {
       *dam = 0;  /* no harm done */