mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-03 02:30:53 +00:00
- fixed: Calculating sector heights with transparent door hacks was wrong.
- fixed: Sector height was wrong for sectors that have a slope transfer for a horizontal plane. - better error reporting for shader compile errors. Update to ZDoom r1942: - Changes to both A_MonsterRail() and A_CustomRailgun(): Save actor's pitch, use a larger aiming range, ignore non-targets in P_AimLineAttack(), and aim at the target anyway even if P_AimLineAttack() decides it has no chance of hitting. - Added another parameter to P_AimLineAttack(): A target to be aimed at. If this is non-NULL, then all actors between the shooter and the target will be ignored. - Added new sound sequence ACS functions: SoundSequenceOnActor(int tid, string seqname); SoundSequenceOnSector(int tag, string seqname, int location); SoundSequenceOnPolyobj(int polynum, string seqname); SoundSequenceOnSector takes an extra parameter that specifies where in the sector the sound comes from (floor, ceiling, interior, or all of it). See the SECSEQ defines in zdefs.acs. - Fixed: R_RenderDecal() must save various Wall globals, because the originals may still be needed. In particular, when drawing a seg with a midtexture is split by foreground geometry, the first drawseg generated from it will have the correct WallSZ1,2 values, but subsequent ones will have whatever R_RenderDecal() left behind. These values are used to calculate the upper and lower bounds of the midtexture. (Ironically, my work to Build-ify things had done away with these globals, but that's gone now.) git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@581 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
4799da28a3
commit
83bc5817e1
17 changed files with 250 additions and 146 deletions
|
@ -2801,7 +2801,7 @@ struct aim_t
|
|||
bool AimTraverse3DFloors(const divline_t &trace, intercept_t * in);
|
||||
#endif
|
||||
|
||||
void AimTraverse (fixed_t startx, fixed_t starty, fixed_t endx, fixed_t endy, bool checknonshootable = false);
|
||||
void AimTraverse (fixed_t startx, fixed_t starty, fixed_t endx, fixed_t endy, bool checknonshootable = false, AActor *target=NULL);
|
||||
|
||||
};
|
||||
|
||||
|
@ -2918,7 +2918,7 @@ bool aim_t::AimTraverse3DFloors(const divline_t &trace, intercept_t * in)
|
|||
//
|
||||
//============================================================================
|
||||
|
||||
void aim_t::AimTraverse (fixed_t startx, fixed_t starty, fixed_t endx, fixed_t endy, bool checknonshootable)
|
||||
void aim_t::AimTraverse (fixed_t startx, fixed_t starty, fixed_t endx, fixed_t endy, bool checknonshootable, AActor *target)
|
||||
{
|
||||
FPathTraverse it(startx, starty, endx, endy, PT_ADDLINES|PT_ADDTHINGS);
|
||||
intercept_t *in;
|
||||
|
@ -2973,6 +2973,9 @@ void aim_t::AimTraverse (fixed_t startx, fixed_t starty, fixed_t endx, fixed_t e
|
|||
if (th == shootthing)
|
||||
continue; // can't shoot self
|
||||
|
||||
if (target != NULL && th != target)
|
||||
continue; // only care about target, and you're not it
|
||||
|
||||
if (!checknonshootable) // For info CCMD, ignore stuff about GHOST and SHOOTABLE flags
|
||||
{
|
||||
if (!(th->flags&MF_SHOOTABLE))
|
||||
|
@ -3084,8 +3087,8 @@ void aim_t::AimTraverse (fixed_t startx, fixed_t starty, fixed_t endx, fixed_t e
|
|||
if (sv_smartaim < 2)
|
||||
{
|
||||
// friends don't aim at friends (except players), at least not first
|
||||
thing_friend=th;
|
||||
pitch_friend=thingpitch;
|
||||
thing_friend = th;
|
||||
pitch_friend = thingpitch;
|
||||
}
|
||||
}
|
||||
else if (!(th->flags3&MF3_ISMONSTER) && th->player == NULL)
|
||||
|
@ -3093,27 +3096,27 @@ void aim_t::AimTraverse (fixed_t startx, fixed_t starty, fixed_t endx, fixed_t e
|
|||
if (sv_smartaim < 3)
|
||||
{
|
||||
// don't autoaim at barrels and other shootable stuff unless no monsters have been found
|
||||
thing_other=th;
|
||||
pitch_other=thingpitch;
|
||||
thing_other = th;
|
||||
pitch_other = thingpitch;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
linetarget=th;
|
||||
aimpitch=thingpitch;
|
||||
linetarget = th;
|
||||
aimpitch = thingpitch;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
linetarget=th;
|
||||
aimpitch=thingpitch;
|
||||
linetarget = th;
|
||||
aimpitch = thingpitch;
|
||||
return;
|
||||
}
|
||||
if (checknonshootable)
|
||||
{
|
||||
linetarget=th;
|
||||
aimpitch=thingpitch;
|
||||
linetarget = th;
|
||||
aimpitch = thingpitch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3124,7 +3127,7 @@ void aim_t::AimTraverse (fixed_t startx, fixed_t starty, fixed_t endx, fixed_t e
|
|||
//
|
||||
//============================================================================
|
||||
|
||||
fixed_t P_AimLineAttack (AActor *t1, angle_t angle, fixed_t distance, AActor **pLineTarget, fixed_t vrange, bool forcenosmart, bool check3d, bool checknonshootable)
|
||||
fixed_t P_AimLineAttack (AActor *t1, angle_t angle, fixed_t distance, AActor **pLineTarget, fixed_t vrange, bool forcenosmart, bool check3d, bool checknonshootable, AActor *target)
|
||||
{
|
||||
fixed_t x2;
|
||||
fixed_t y2;
|
||||
|
@ -3193,22 +3196,23 @@ fixed_t P_AimLineAttack (AActor *t1, angle_t angle, fixed_t distance, AActor **p
|
|||
}
|
||||
#endif
|
||||
|
||||
aim.AimTraverse (t1->x, t1->y, x2, y2, checknonshootable);
|
||||
aim.AimTraverse (t1->x, t1->y, x2, y2, checknonshootable, target);
|
||||
|
||||
if (!aim.linetarget)
|
||||
{
|
||||
if (aim.thing_other)
|
||||
{
|
||||
aim.linetarget=aim.thing_other;
|
||||
aim.aimpitch=aim.pitch_other;
|
||||
aim.linetarget = aim.thing_other;
|
||||
aim.aimpitch = aim.pitch_other;
|
||||
}
|
||||
else if (aim.thing_friend)
|
||||
{
|
||||
aim.linetarget=aim.thing_friend;
|
||||
aim.aimpitch=aim.pitch_friend;
|
||||
aim.linetarget = aim.thing_friend;
|
||||
aim.aimpitch = aim.pitch_friend;
|
||||
}
|
||||
}
|
||||
if (pLineTarget) *pLineTarget = aim.linetarget;
|
||||
if (pLineTarget)
|
||||
*pLineTarget = aim.linetarget;
|
||||
return aim.linetarget ? aim.aimpitch : t1->pitch;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue