[CF-Devel] Firing spells from ranged weapons
crossfire-devel at archives.real-time.com
crossfire-devel at archives.real-time.com
Wed Jun 23 00:08:41 CDT 2004
ToxicFrog wrote:
>
I've been wanting to make explosive arrows, but couldn't get them to
>
work. After mucking about in the code a bit, I found that it's because
>
only spell-bullets (102) get checked for detonation and suchlike, but if
>
you change the type 13 archs to 102, they aren't ammo any more and you
>
can't fire them in the first place.
A looked at the submitted patch, and it looks pretty good. A few quick notes:
I generally prefer context diffs to review patches - it makes it easier to
just look at the patch without having to apply it and see differences.
On the aarch - it's generally good practice to have the face match something in
the animation. Perhaps not strictly required, but probably is safe practice.
Given the code, I don't think there is in fact any need for the arch in question
to have an animation of firebullet, since creating the new arch will set up the
animation.
Checking the return value of arch_to_object would be a good, but not actually
sure if necessary - I think that other_arch is verified/set at load time - since
it is a pointer to an archetype, I don't believe it can ever be non null and yet
not point at something valid.
In terms of firing other spells - instead of calling move_bullet(), you shoudl
call move_spell_effect() - this covers all the spell effects that do move
(bolts, cones, bullets, etc). So if you use that, you already have everything
set up to firing any spell you want to.
_______________________________________________
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