This commit is contained in:
parent
4e085545d7
commit
6493347cd1
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
init()
|
init()
|
||||||
{
|
{
|
||||||
|
setDvar( "bg_bounces", 1 );
|
||||||
|
|
||||||
thread onPlayerConnect();
|
thread onPlayerConnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11,21 +13,61 @@ onPlayerConnect()
|
|||||||
{
|
{
|
||||||
level waittill( "connected", player );
|
level waittill( "connected", player );
|
||||||
|
|
||||||
if ( isDefined( player.pers["isBot"] ) )
|
if ( player isTestClient() )
|
||||||
{
|
|
||||||
if ( player.pers["isBot"] )
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
player notifyOnPlayerCommand( "save_pos", "+melee" );
|
player notifyOnPlayerCommand( "save_pos", "+melee" );
|
||||||
player notifyOnPlayerCommand( "load_saved_pos", "+activate" );
|
player notifyOnPlayerCommand( "load_saved_pos", "+activate" );
|
||||||
|
player thread onPlayerSpawned();
|
||||||
|
player thread onWeaponFired();
|
||||||
player thread jumper();
|
player thread jumper();
|
||||||
player thread displaySpeed();
|
player thread displaySpeed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// deserteagle_mp
|
||||||
|
// rpg_mp
|
||||||
|
onPlayerSpawned()
|
||||||
|
{
|
||||||
|
self endon( "disconnect" );
|
||||||
|
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
self waittill( "spawned_player" );
|
||||||
|
|
||||||
|
self freezeControls( false );
|
||||||
|
|
||||||
|
self takeAllWeapons();
|
||||||
|
|
||||||
|
self giveWeapon( "deserteagle_mp" );
|
||||||
|
self giveMaxAmmo( "deserteagle_mp" );
|
||||||
|
|
||||||
|
self giveWeapon( "rpg_mp" );
|
||||||
|
self giveMaxAmmo( "rpg_mp" );
|
||||||
|
|
||||||
|
wait 1;
|
||||||
|
self switchToWeaponImmediate( "deserteagle_mp" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onWeaponFired()
|
||||||
|
{
|
||||||
|
level endon( "game_ended" );
|
||||||
|
self endon( "disconnected" );
|
||||||
|
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
self waittill( "weapon_fired", weapon );
|
||||||
|
|
||||||
|
if (weapon == "rpg_mp")
|
||||||
|
{
|
||||||
|
self.last_rpg_shot = getTime();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
displaySpeed()
|
displaySpeed()
|
||||||
{
|
{
|
||||||
level endon( "game_ended" );
|
level endon( "game_ended" );
|
||||||
@ -37,12 +79,30 @@ displaySpeed()
|
|||||||
self.speed_text.label = &"";
|
self.speed_text.label = &"";
|
||||||
|
|
||||||
self.last_speed_sample = 0;
|
self.last_speed_sample = 0;
|
||||||
|
self.last_z_coordinate = 0.0;
|
||||||
|
|
||||||
while ( true )
|
while ( true )
|
||||||
{
|
{
|
||||||
player_speed = distance( ( 0, 0, 0 ), self getvelocity() );
|
player_speed = distance( ( 0, 0, 0 ), self getvelocity() );
|
||||||
current_speed = int( player_speed );
|
current_speed = int( player_speed );
|
||||||
|
|
||||||
|
if ( self.origin[2] > self.last_z_coordinate )
|
||||||
|
{
|
||||||
|
// We should be going up
|
||||||
|
if ( isDefined( self.last_rpg_shot ) && self.last_rpg_shot != 0 )
|
||||||
|
{
|
||||||
|
late = getTime() - self.last_rpg_shot;
|
||||||
|
if (late < 500)
|
||||||
|
{
|
||||||
|
iPrintLn( "Late RPG (+" + (late) + ")" );
|
||||||
|
}
|
||||||
|
|
||||||
|
self.last_rpg_shot = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
self.last_z_coordinate = self.origin[2];
|
||||||
|
|
||||||
if ( self.last_speed_sample == current_speed )
|
if ( self.last_speed_sample == current_speed )
|
||||||
{
|
{
|
||||||
// White
|
// White
|
||||||
|
Loading…
x
Reference in New Issue
Block a user