mirror of
https://github.com/XLabsProject/iw4x-rawfiles.git
synced 2023-08-02 15:02:11 +02:00
Merge pull request #5 from efinst0rm/patch-1
Fix for g_getplayervieworigin crash
This commit is contained in:
commit
d47007722a
@ -390,6 +390,7 @@ heliRide( lifeId, chopper )
|
||||
chopper VehicleTurretControlOn( self );
|
||||
|
||||
self PlayerLinkWeaponviewToDelta( chopper, "tag_player", 1.0, 180, 180, 0, 180, true );
|
||||
self setPlayerAngles( level.ac130 getTagAngles( "tag_player" ) );
|
||||
|
||||
chopper.gunner = self;
|
||||
|
||||
@ -1369,7 +1370,21 @@ heli_explode( altStyle )
|
||||
|
||||
// give "death" notify time to process
|
||||
wait ( 0.05 );
|
||||
self delete();
|
||||
// g_getplayervieworigin fix
|
||||
// we hide this helicopter then delete it
|
||||
|
||||
if (self.heliType == "minigun")
|
||||
{
|
||||
if (isDefined(self))
|
||||
self hide();
|
||||
|
||||
wait 30;
|
||||
|
||||
if (isDefined(self))
|
||||
self delete();
|
||||
}
|
||||
else
|
||||
self delete();
|
||||
}
|
||||
|
||||
|
||||
@ -2043,7 +2058,16 @@ heli_leave()
|
||||
|
||||
// give "death" notify time to process
|
||||
wait ( 0.05 );
|
||||
self delete();
|
||||
|
||||
// g_getplayervieworigin fix
|
||||
// we hide this helicopter then delete it
|
||||
if (isDefined(self))
|
||||
self hide();
|
||||
|
||||
wait 30;
|
||||
|
||||
if (isDefined(self))
|
||||
self delete();
|
||||
}
|
||||
|
||||
|
||||
@ -2185,4 +2209,4 @@ deleteAfterTime( delay )
|
||||
wait ( delay );
|
||||
|
||||
self delete();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user