Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- reload_watch()
- {
- self endon( "disconnect" );
- while(1)
- {
- self waittill( "reload_start" );
- if( !self hasperk( level.sprint_reload_perk ) || !isdefined( self.is_sprinting ) )
- {
- continue;
- }
- self AllowSprint( false );
- self setMoveSpeedScale( 1.5 );
- self waittill_either( "reload", "reload_cancel" );
- self AllowSprint( true );
- if( self hasperk( "specialty_longersprint" ))
- {
- self setMoveSpeedScale( 1.07 );
- }
- else
- {
- self setMoveSpeedScale( 1 );
- }
- }
- }
- reload_cancel_watch()
- {
- self endon( "disconnect" );
- while( 1 )
- {
- wait .1;
- if( self hasperk( level.sprint_reload_perk ) && ( self isthrowinggrenade() || self isswitchingweapons() || self ismeleeing() ) )
- {
- self notify( "reload_cancel" );
- wait 1;
- }
- }
- }
- sprint_watch()
- {
- self endon( "disconnect" );
- while( 1 )
- {
- wait .05;
- if( self get_player_speed() < 290 )
- {
- if( isdefined( self.is_sprinting ) )
- {
- self.is_sprinting = undefined;
- }
- continue;
- }
- if( !self hasperk( level.sprint_reload_perk ) )
- {
- continue;
- }
- self.is_sprinting = true;
- wait 1;
- }
- }
- get_player_speed()
- {
- velocity = self GetVelocity();
- speed = abs( velocity[0] ) + abs( velocity[1] );
- return speed;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement