[CF-Devel] Altar reconsecration
crossfire-devel-admin at archives.real-time.com
crossfire-devel-admin at archives.real-time.com
Tue Mar 18 23:59:05 CST 2003
Tim Hentenaar wrote:
>
Yeah, I agree. it's senseless to have an "Altar of Mostrai of Valriel of Lythander" or other such names.
>
>
I've written a patch that addresses the issue and attached it to this email.
I've taken a simpler approach - as of now, for all gods, its an Altar of %s,
so just hardcode that Altar portion in, instead of taking it from the clone
name, eg:
*** spell_effect.c 8 Mar 2003 05:35:33 -0000 1.102
--- spell_effect.c 19 Mar 2003 05:56:55 -0000
***************
*** 3399,3405 ****
} else {
/* If we got here, we are consecrating an altar */
if(tmp->name) free_string(tmp->name);
! sprintf(buf,"%s of %s",tmp->arch->clone.name,god->name);
tmp->name = add_string(buf);
tmp->level = SK_level(op);
tmp->other_arch = god->arch;
--- 3399,3405 ----
} else {
/* If we got here, we are consecrating an altar */
if(tmp->name) free_string(tmp->name);
! sprintf(buf,"Altar of %s",god->name);
tmp->name = add_string(buf);
tmp->level = SK_level(op);
tmp->other_arch = god->arch;
I can't see that ever not doing the right thing.
The patch you posted has a severe problem:
+ /* Reassign the name, removing the existing god's
+ * name if the altar is already consecrated.
+ */
+ if (sscanf(tmp->arch->clone.name,"%s of %s",_nt,_ng) > 0)
+ tmp->arch->clone.name = _nt;
The clone attributes should never be modified. if tmp is say an altar of
mostrai, what the above will do is now change the archetype (clone) name to just
be 'altar'. Now whenever an altar of mostrai is loaded from a map, it will just
have the name 'altar', because that is what the archetype says.
Note however that the problem of 'Altar of mostrai of gnarg' will only appear
in the case when the altar be re-consecrated is a 'special' altar to start out
with. I don't think you'd ever have more than two 'of's - if that above altar
was consecrated again, it would have become 'altar of mostrai of lythander' for
example.
I only mention this at all is that while the above code will now make the
right name for it, since these 'special' altars, the image will still be that of
the original. So one could reconsecrate that altar of lythander, but the image
presented would still be that altar with green cloth. Fixing that is a bit more
of a problem.
_______________________________________________
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