[CF-Devel] PATCH fixing town portal bug if remembered map couldn't be loaded

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Sat Mar 1 17:12:20 CST 2003


Hi!

If you remembered a position with town portal and the map isn't available any
more, you get a message "Something strange happens.\nYou can't remember where
to go!?".
But after that, the force object marking the lost location isn't removed from
the player, so he gets this message each time he casts town portal, from now
on. Several players on metalforge are already affected by this.

The attached patch removes and frees the relevant force object, so that the
next time town portal is cast, the player will remember a new position.

Bye
Jochen

--------------- patch -----------------------------

Index: spell_effect.c
===================================================================
RCS file: /cvsroot/crossfire/crossfire/server/spell_effect.c,v
retrieving revision 1.100
diff -u -r1.100 spell_effect.c
--- spell_effect.c      25 Feb 2003 07:18:07 -0000      1.100
+++ spell_effect.c      1 Mar 2003 22:59:52 -0000
@@ -913,6 +932,8 @@
     /* If we were unable to load (ex. random map deleted), warn player*/
     if (exitmap==NULL) {
        new_draw_info(NDI_UNIQUE | NDI_NAVY, 0,op,"Something strange
happens.\nYou can't remember where to go!?");
+       remove_ob (force);
+       free_object (force);
        return 1;
     }
 



-- 
Jochen Suckfuell  ---  
     
     http://www.suckfuell.net/jochen/
     
       ---

_______________________________________________
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