[Too broken] A_Fire(int height, int offset, int angleoffset)

Moderator: GZDoom Developers

A_Fire(int height, int offset, int angleoffset)

Postby Мichаеlis » Thu Sep 23, 2010 7:09 am

This is a more or less obvious extension to A_Fire.
A_Fire already has ZOffset customizable, so this only makes this codepointer more generic.

Possible use is simulating linked actors (which are not supported in direct way). One of the possible workarounds is calling A_Fire every tic.
Personally I need this for my ZBlood+ mod.

Unfortunately, I am a complete n00b when it comes to anything SVN-related. I tried hard not to make any mistakes but I am unsure if this is all that should be updated.
Edit: I am particularly very unsure whether angleoffset should be added as it is now or whether it should be added to "an = (dest->angle + angleoffset) >> ANGLETOFINESHIFT"

Code: Select allExpand view
    A_Fire(self, height, offset, angleoffset);

void A_Fire(AActor *self, int height, int offset, int angleoffset)
    AActor *dest;
    angle_t an;
    dest = self->tracer;
    if (dest == NULL || self->target == NULL)
    // don't move it if the vile lost sight
    if (!P_CheckSight (self->target, dest, 0) )

    an = dest->angle >> ANGLETOFINESHIFT;

    self->SetOrigin (dest->x + FixedMul ((24+offset)*FRACUNIT, finecosine[an+angleoffset]),
                     dest->y + FixedMul ((24+offset)*FRACUNIT, finesine[an+angleoffset]) ,
                     dest->z + height);
QCDE. D4T, D4D, AEoD, ZBlood+
Joined: 18 Mar 2010

Re: A_Fire(int height, int offset, int angleoffset)

Postby NeuralStunner » Wed Sep 29, 2010 11:26 am

You'll probably have to make it into a diff patch. (You'd have to ask someone if you don't know what that is, as I don't know that much either. :laff: )
User avatar
Not "Neutral"
Joined: 21 Jul 2009
Location: capital N, capital S, no space
Discord: NeuralStunner#4201
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: A_Fire(int height, int offset, int angleoffset)

Postby Graf Zahl » Mon Jun 13, 2011 11:29 am

I thought this could be added but closer inspection shows that everything in here that was changed is wrong. Both the offset and the angleoffset are used in a way that doesn't work. So off this goes.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Joined: 19 Jul 2003
Location: Germany

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests