- Eliminated some more global variables (onmobj, DoRipping, LastRipped,
MissileActor, bulletpitch and linetarget.) SVN r899 (trunk)
This commit is contained in:
parent
a390ea6a61
commit
3f497fe8e5
24 changed files with 173 additions and 154 deletions
|
|
@ -540,8 +540,7 @@ void A_JumpIfCloser(AActor * self)
|
|||
else
|
||||
{
|
||||
// Does the player aim at something that can be shot?
|
||||
P_BulletSlope(self);
|
||||
target = linetarget;
|
||||
P_BulletSlope(self, &target);
|
||||
}
|
||||
|
||||
if (pStateCall != NULL) pStateCall->Result=false; // Jumps should never set the result for inventory state chains!
|
||||
|
|
@ -1016,9 +1015,8 @@ void A_FireBullets (AActor *self)
|
|||
|
||||
static_cast<APlayerPawn *>(self)->PlayAttacking2 ();
|
||||
|
||||
P_BulletSlope(self);
|
||||
bslope = P_BulletSlope(self);
|
||||
bangle = self->angle;
|
||||
bslope = bulletpitch;
|
||||
|
||||
PuffType = PClass::FindClass(PuffTypeName);
|
||||
if (!PuffType) PuffType = PClass::FindClass(NAME_BulletPuff);
|
||||
|
|
@ -1063,6 +1061,7 @@ void A_FireCustomMissile (AActor * self)
|
|||
|
||||
player_t *player=self->player;
|
||||
AWeapon * weapon=player->ReadyWeapon;
|
||||
AActor *linetarget;
|
||||
|
||||
if (UseAmmo && weapon)
|
||||
{
|
||||
|
|
@ -1080,7 +1079,7 @@ void A_FireCustomMissile (AActor * self)
|
|||
|
||||
if (AimAtAngle) shootangle+=Angle;
|
||||
|
||||
AActor * misl=P_SpawnPlayerMissile (self, x, y, z, ti, shootangle);
|
||||
AActor * misl=P_SpawnPlayerMissile (self, x, y, z, ti, shootangle, &linetarget);
|
||||
// automatic handling of seeker missiles
|
||||
if (misl)
|
||||
{
|
||||
|
|
@ -1129,12 +1128,13 @@ void A_CustomPunch (AActor *self)
|
|||
|
||||
angle_t angle;
|
||||
int pitch;
|
||||
AActor * linetarget;
|
||||
|
||||
if (!norandom) Damage *= (pr_cwpunch()%8+1);
|
||||
|
||||
angle = self->angle + (pr_cwpunch.Random2() << 18);
|
||||
if (Range == 0) Range = MELEERANGE;
|
||||
pitch = P_AimLineAttack (self, angle, Range);
|
||||
pitch = P_AimLineAttack (self, angle, Range, &linetarget);
|
||||
|
||||
// only use ammo when actually hitting something!
|
||||
if (UseAmmo && linetarget && weapon)
|
||||
|
|
@ -2164,8 +2164,7 @@ void A_JumpIfTargetInLOS(AActor * self)
|
|||
else
|
||||
{
|
||||
// Does the player aim at something that can be shot?
|
||||
P_BulletSlope(self);
|
||||
target = linetarget;
|
||||
P_BulletSlope(self, &target);
|
||||
}
|
||||
|
||||
// No target - return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue