Difference between revisions of "Flying"
Jump to navigation
Jump to search
m
no edit summary
imported>8asrun6aer m |
imported>8asrun6aer m |
||
Line 97: | Line 97: | ||
;******************************* | ;******************************* | ||
; Check | ; Check current flying state, or for flying activation/deactivation | ||
;******************************* | ;******************************* | ||
if ( cstmGlobalPlayerIsFlying == 0 ) | if ( cstmGlobalPlayerIsFlying == 0 ) | ||
if ( iskeypressed2 cstmControlActivateFlyMode ) | if ( iskeypressed2 cstmControlActivateFlyMode ) | ||
; flying | ; player activated flying | ||
set cstmGlobalPlayerIsFlying to 1 | set cstmGlobalPlayerIsFlying to 1 | ||
else | else | ||
Line 117: | Line 117: | ||
;******************************* | ;******************************* | ||
; Check player state to see if flying should stop | ; Check player state to see if flying should stop | ||
; Invalid states are if player is not in air, swimming, etc | ; Invalid states are if player is not in air, is swimming, etc | ||
;******************************* | ;******************************* | ||
if ( Player.IsInAir != 1 || Player.IsSwimming ) | if ( Player.IsInAir != 1 || Player.IsSwimming ) | ||
Line 184: | Line 184: | ||
set cstmSpeed to cstmSpeedMax | set cstmSpeed to cstmSpeedMax | ||
if ( cstmZPitchModifyer < 0 ) | if ( cstmZPitchModifyer < 0 ) | ||
set cstmZPitchModifyer to cstmZPitchModifyer * 2.0 ; | set cstmZPitchModifyer to cstmZPitchModifyer * 2.0 ; move faster going down | ||
else | else | ||
set cstmZPitchModifyer to cstmZPitchModifyer * 0.7 ; | set cstmZPitchModifyer to cstmZPitchModifyer * 0.7 ; move slower going up | ||
endif | endif | ||
; modify heading if strafing | ; modify heading if strafing | ||
Line 198: | Line 198: | ||
set cstmSpeed to ( cstmSpeedMax -200 ) * -1 | set cstmSpeed to ( cstmSpeedMax -200 ) * -1 | ||
if ( cstmZPitchModifyer < 0 ) | if ( cstmZPitchModifyer < 0 ) | ||
set cstmZPitchModifyer to cstmZPitchModifyer * 0.7 ; | set cstmZPitchModifyer to cstmZPitchModifyer * 0.7 ; move slower going up | ||
else | else | ||
set cstmZPitchModifyer to cstmZPitchModifyer * 2.0 ; | set cstmZPitchModifyer to cstmZPitchModifyer * 2.0 ; move faster going down | ||
endif | endif | ||
; modify reverse heading if strafing | ; modify reverse heading if strafing |