Exemplo n.º 1
0
void CFuncConveyor :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
	if( IsLockedByMaster( pActivator ))
		return;

	if( ShouldToggle( useType ))
	{
		if( useType == USE_SET )
		{
			if( value != 0 ) 
			{
				pev->impulse = value < 0 ? true : false;
				value = fabs( value );
				pev->dmg = bound( 0.1, value, 1 ) * m_flMaxSpeed;
			}
			else UpdateSpeed( 0 ); // stop
			return;
		}
		else if( useType == USE_RESET )
		{
			// restore last speed
			UpdateSpeed( pev->dmg );
			return;
		}
  
		pev->impulse = !pev->impulse;
		UpdateSpeed( m_flMaxSpeed );
	}
}
Exemplo n.º 2
0
void Player::SendInitialLogonPackets()
{
    // Initial Packets... they seem to be re-sent on port.
    //m_session->OutPacket(SMSG_SET_REST_START_OBSOLETE, 4, &m_timeLogoff); // Seem to be unused by client

    StackWorldPacket<32> data(SMSG_BINDPOINTUPDATE);

    data << float(m_bind_pos_x);
    data << float(m_bind_pos_y);
    data << float(m_bind_pos_z);
    data << uint32(m_bind_mapid);
    data << uint32(m_bind_zoneid);

    m_session->SendPacket(&data);

    //Proficiencies
    SendSetProficiency(4, armor_proficiency);
    SendSetProficiency(2, weapon_proficiency);

    //Tutorial Flags
    data.Initialize(SMSG_TUTORIAL_FLAGS);

    for (uint8 i = 0; i < 8; i++)
        data << uint32(m_Tutorials[i]);

    m_session->SendPacket(&data);

    smsg_TalentsInfo(false);
    smsg_InitialSpells();

    data.Initialize(SMSG_SEND_UNLEARN_SPELLS);
    data << uint32(0); // count, for (count) uint32;
    GetSession()->SendPacket(&data);

    SendInitialActions();
    smsg_InitialFactions();

    data.Initialize(SMSG_LOGIN_SETTIMESPEED);

    data << uint32(Arcemu::Util::MAKE_GAME_TIME());
    data << float(0.0166666669777748f);    // Normal Game Speed
    data << uint32(0);   // 3.1.2

    m_session->SendPacket(&data);

    // cebernic for speedhack bug
    m_lastRunSpeed = 0;
    UpdateSpeed();

    WorldPacket ArenaSettings(SMSG_UPDATE_WORLD_STATE, 16);

    ArenaSettings << uint32(0xC77);
    ArenaSettings << uint32(sWorld.Arena_Progress);
    ArenaSettings << uint32(0xF3D);
    ArenaSettings << uint32(sWorld.Arena_Season);

    m_session->SendPacket(&ArenaSettings);

    LOG_DETAIL("WORLD: Sent initial logon packets for %s.", GetName());
}
Exemplo n.º 3
0
void Shooter::SetManual()
{
    printf("Shooter::SetManual\n");
    m_auto = false;
    m_speed = 0.;
    UpdateSpeed();
}
void CAIVehicle::Think( void ) {
	if( !( thinkFlags & TH_THINK ) ) {
		goto Quit;
	}
	if( m_Controller.GetEntity() ) {
		// Exit the combat state if we somehow got in it.
		// Later we can fight as directed by player, but right now it's too independent
		ClearEnemy();
		// Update controls and movement dir
		UpdateSteering();
		// Speed controls, for now just AI_MOVE
		bool bMovementReq = UpdateSpeed();
		// Request move at direction
		if( bMovementReq ) {
			MoveAlongVector( m_CurAngle );
		} else {
			StopMove( MOVE_STATUS_DONE );
			// just turn if no forward/back movement is requested
			TurnToward( m_CurAngle );
		}
	}
	idAI::Think();
Quit:
	return;
}
Exemplo n.º 5
0
//-----------------------------------------------------------------------------
// Purpose: Think function. Accelerates a func_rotating to a higher angular velocity.
//-----------------------------------------------------------------------------
void CFuncRotating::SpinUpMove( void )
{
	//
	// Calculate our new speed.
	//
	bool bSpinUpDone = false;
	float flNewSpeed = fabs( m_flSpeed ) + 0.2 * m_flMaxSpeed * m_flFanFriction;
	if ( fabs( flNewSpeed ) >=  fabs( m_flTargetSpeed ) )
	{
		// Reached our target speed.
		flNewSpeed = m_flTargetSpeed;
		bSpinUpDone = !m_bStopAtStartPos;
	}
	else if ( m_flTargetSpeed < 0 )
	{
		// Spinning up in reverse - negate the speed.
		flNewSpeed *= -1;
	}

	//
	// Apply the new speed, adjust sound pitch and volume.
	//
	UpdateSpeed( flNewSpeed );

	//
	// If we've met or exceeded target speed, stop spinning up.
	//
	if ( bSpinUpDone )
	{
		SetMoveDone( &CFuncRotating::RotateMove );
		RotateMove();
	} 

	SetMoveDoneTime( GetNextMoveInterval() );
}
Exemplo n.º 6
0
void mech_move_event(EVENT * e)
{
    MECH *mech = (MECH *) e->data;

    if (MechType(mech) == CLASS_VTOL)
	if (Landed(mech) || FuelCheck(mech))
	    return;
    UpdateHeading(mech);
    if ((IsMechLegLess(mech)) || Jumping(mech) || OODing(mech)) {
	if (MechDesiredFacing(mech) != MechFacing(mech))
	    MECHEVENT(mech, EVENT_MOVE, mech_move_event, MOVE_TICK, 0);
	return;
    }
    UpdateSpeed(mech);
    move_mech(mech);

    if (mech->mapindex < 0)
	return;

    if (MechType(mech) == CLASS_VEH_NAVAL && MechRTerrain(mech) != BRIDGE &&
        MechRTerrain(mech) != ICE && MechRTerrain(mech) != WATER)
	    return;

    if (MechSpeed(mech) || MechDesiredSpeed(mech) ||
        MechDesiredFacing(mech) != MechFacing(mech) ||
        ((MechType(mech) == CLASS_VTOL || MechMove(mech) == MOVE_SUB) &&
         MechVerticalSpeed(mech)))
	MECHEVENT(mech, EVENT_MOVE, mech_move_event, MOVE_TICK, 0);
}
Exemplo n.º 7
0
//-----------------------------------------------------------------------------
// Purpose: Decelerates the rotator from a higher speed to a lower one.
// Input  : flTargetSpeed - Speed to spin down to.
// Output : Returns true if we reached the target speed, false otherwise.
//-----------------------------------------------------------------------------
bool CFuncRotating::SpinDown( float flTargetSpeed )
{
	//
	// Bleed off a little speed due to friction.
	//
	bool bSpinDownDone = false;
	float flNewSpeed = fabs( m_flSpeed ) - 0.1 * m_flMaxSpeed * m_flFanFriction;
	if ( flNewSpeed < 0 )
	{
		flNewSpeed = 0;
	}

	if ( fabs( flNewSpeed ) <= fabs( flTargetSpeed ) )
	{
		// Reached our target speed.
		flNewSpeed = flTargetSpeed;
		bSpinDownDone = !m_bStopAtStartPos;
	}
	else if ( m_flSpeed < 0 )
	{
		// Spinning down in reverse - negate the speed.
		flNewSpeed *= -1;
	}

	//
	// Apply the new speed, adjust sound pitch and volume.
	//
	UpdateSpeed( flNewSpeed );

	//
	// If we've met or exceeded target speed, stop spinning down.
	//
	return bSpinDownDone;
}
Exemplo n.º 8
0
//
// SpinUp - accelerates a non-moving func_rotating up to it's speed
//
void CFuncRotating :: SpinUp( void )
{
	// calculate our new speed.
	float flNewSpeed = fabs( pev->speed ) + 0.2f * m_flMaxSpeed * m_flFanFriction;
	bool bSpinUpDone = false;

	if( fabs( flNewSpeed ) >= fabs( m_flTargetSpeed ))
	{
		// Reached our target speed.
		flNewSpeed = m_flTargetSpeed;
		bSpinUpDone = !m_bStopAtStartPos;
	}
	else if( m_flTargetSpeed < 0 )
	{
		// spinning up in reverse - negate the speed.
		flNewSpeed *= -1;
	}

	m_iState = STATE_TURN_ON;

	// Apply the new speed, adjust sound pitch and volume.
	UpdateSpeed( flNewSpeed );

	// If we've met or exceeded target speed, stop spinning up.
	if( bSpinUpDone )
	{
		SetMoveDone( Rotate );
		Rotate();
	} 

	SetMoveDoneTime( GetNextMoveInterval() );
}
Exemplo n.º 9
0
//-----------------------------------------------------------------------------
// Purpose: Sets a new angular velocity to achieve.
// Input  : flSpeed - Target angular velocity in degrees per second.
//-----------------------------------------------------------------------------
void CFuncRotating::SetTargetSpeed( float flSpeed )
{
	//
	// Make sure the sign is correct - positive for forward rotation,
	// negative for reverse rotation.
	//
	flSpeed = fabs( flSpeed );
	if ( m_bReversed )
	{
		flSpeed *= -1;
	}

	m_flTargetSpeed = flSpeed;

	//
	// If we don't accelerate, change to the new speed instantly.
	//
	if ( !HasSpawnFlags(SF_BRUSH_ACCDCC ) )
	{
		UpdateSpeed( m_flTargetSpeed );
		SetMoveDone( &CFuncRotating::RotateMove );
	}
	//
	// Otherwise deal with acceleration/deceleration:
	//
	else
	{
		//
		// Check for reversing directions.
		//
		if ((( m_flSpeed > 0 ) && ( m_flTargetSpeed < 0 )) || 
			(( m_flSpeed < 0 ) && ( m_flTargetSpeed > 0 )))
		{
			SetMoveDone( &CFuncRotating::ReverseMove );
		}
		//
		// If we are below the new target speed, spin up to the target speed.
		//
		else if ( fabs( m_flSpeed ) < fabs( m_flTargetSpeed ) )
		{
			SetMoveDone( &CFuncRotating::SpinUpMove );
		}
		//
		// If we are above the new target speed, spin down to the target speed.
		//
		else if ( fabs( m_flSpeed ) > fabs( m_flTargetSpeed ) )
		{
			SetMoveDone( &CFuncRotating::SpinDownMove );
		}
		//
		// We are already at the new target speed. Just keep rotating.
		//
		else
		{
			SetMoveDone( &CFuncRotating::RotateMove );
		}
	}

	SetMoveDoneTime( GetNextMoveInterval() );
}
Exemplo n.º 10
0
void FadeMetro::SetBPM(float bpm)
{
	if(m_BPM != bpm)
	{
		m_BPM = bpm;
		UpdateSpeed();
	}
}
Exemplo n.º 11
0
void CEntHost::PreThink()
{
    if ( IsAlive() && IsActive() ) {
        PreUpdateAttributes();
        UpdateMovementType();
        UpdateSpeed();
    }
}
Exemplo n.º 12
0
void Shooter::SetTarget( int height, float distance )
{
    printf("Shooter::SetTarget %d %g\n", height, distance);
    m_auto = true;
    m_speed = Ballistics(height, distance);
    if (m_robot.GetOI().Teach()) {
	printf("SetTarget height %d distance %g speed %g\n",
		    height, distance, m_speed);
    }
    UpdateSpeed();
}
Exemplo n.º 13
0
FadeMetro::FadeMetro(QWidget *parent)
	: FadeButton(parent)
	, m_TextMargin(0)
	, m_LabelMargin(0)
	, m_Pos(0)
	, m_BPM(60)
	, m_ArmLength(0)
	, m_Paused(true)
{
	connect(this, SIGNAL(clicked(bool)), this, SLOT(onClicked(bool)));
	UpdateSpeed();
}
Exemplo n.º 14
0
void byoSnake::InitializeSnake()
{
    for ( int i=0; i<m_SnakeLen; i++ )
    {
        m_SnakeX[i] = m_FieldHoriz/2;
        m_SnakeY[i] = 0;
    }
    m_InitialSlowdownCnt = 2;
    m_Direction = dDown;
    RebuildField();
    UpdateSpeed();
}
Exemplo n.º 15
0
void CFuncRotating::SetTargetSpeed( float flSpeed )
{
	if( flSpeed == 0.0f && FBitSet( pev->spawnflags, SF_ROTATING_STOP_AT_START_POS ))
		m_bStopAtStartPos = true;

	// make sure the sign is correct - positive for forward rotation,
	// negative for reverse rotation.
	flSpeed = fabs( flSpeed );

	if( pev->impulse )
	{
		flSpeed *= -1;
	}

	m_flTargetSpeed = flSpeed;
	pev->friction = 0.0f; // clear impulse friction

	// If we don't accelerate, change to the new speed instantly.
	if( !FBitSet( pev->spawnflags, SF_ROTATING_ACCDCC ))
	{
		UpdateSpeed( m_flTargetSpeed );
		SetMoveDone( Rotate );
	}
	else
	{
		// Otherwise deal with acceleration/deceleration:
		if((( pev->speed > 0 ) && ( m_flTargetSpeed < 0 )) || (( pev->speed < 0 ) && ( m_flTargetSpeed > 0 )))
		{
			// check for reversing directions.
			SetMoveDone( ReverseMove );
		}
		else if( fabs( pev->speed ) < fabs( m_flTargetSpeed ))
		{
			// If we are below the new target speed, spin up to the target speed.
			SetMoveDone( SpinUp );
		}
		else if( fabs( pev->speed ) > fabs( m_flTargetSpeed ))
		{
			// If we are above the new target speed, spin down to the target speed.
			SetMoveDone( SpinDown );
		}
		else
		{
			// we are already at the new target speed. Just keep rotating.
			SetMoveDone( Rotate );
		}
	}

	SetMoveDoneTime( GetNextMoveInterval() );
}
Exemplo n.º 16
0
void CFuncConveyor :: Spawn( void )
{
	pev->flags |= FL_WORLDBRUSH;
	pev->solid = SOLID_BSP;
	pev->movetype = MOVETYPE_PUSH;

	SET_MODEL( edict(), GetModel() );

	if( !FBitSet( pev->spawnflags, SF_CONVEYOR_VISUAL ))
		SetBits( pev->flags, FL_CONVEYOR );

	// is mapper forgot set angles?
	if( pev->movedir == g_vecZero )
		pev->movedir = Vector( 1, 0, 0 );

	// HACKHACK - This is to allow for some special effects
	if( FBitSet( pev->spawnflags, SF_CONVEYOR_NOTSOLID ))
	{
		pev->solid = SOLID_NOT;
		pev->skin = 0; // don't want the engine thinking we've got special contents on this brush
	}
	else
	{
		if( m_hParent )
			m_pUserData = WorldPhysic->CreateKinematicBodyFromEntity( this );
		else m_pUserData = WorldPhysic->CreateStaticBodyFromEntity( this );
	}

	if( pev->speed == 0 )
		pev->speed = 100;

	m_flMaxSpeed = pev->speed;	// save initial speed

	if( FBitSet( pev->spawnflags, SF_CONVEYOR_STARTOFF ))
		UpdateSpeed( 0 );
	else UpdateSpeed( m_flMaxSpeed );
}
Exemplo n.º 17
0
DWORD fsSpeedMeter::GetSpeed()
{
	UpdateSpeed ();

	
	if (m_iCurPrevSpeed > 0)
		return m_dwSpeed;	
	else
	{
		m_now.Now ();
		if (m_now - m_past == 0)
			return 0;
		
		return (UINT) ((double) m_done / (m_now - m_past) * 1000.f);
	}
}
Exemplo n.º 18
0
void CFuncConveyor :: Spawn( void )
{
	SetMovedir( pev );
	CFuncWall::Spawn();

	if ( !(pev->spawnflags & SF_CONVEYOR_VISUAL) )
		SetBits( pev->flags, FL_CONVEYOR );

	// HACKHACK - This is to allow for some special effects
	if ( pev->spawnflags & SF_CONVEYOR_NOTSOLID )
	{
		pev->solid = SOLID_NOT;
		pev->skin = 0;		// Don't want the engine thinking we've got special contents on this brush
	}

	if ( pev->speed == 0 )
		pev->speed = 100;

	UpdateSpeed( pev->speed );
}
Exemplo n.º 19
0
void CFuncConveyor::Spawn( void )
{
	// Convert movedir from angles to a vector
	QAngle angMoveDir = QAngle( m_vecMoveDir.x, m_vecMoveDir.y, m_vecMoveDir.z );
	AngleVectors( angMoveDir, &m_vecMoveDir );

	BaseClass::Spawn();

	if ( !HasSpawnFlags(SF_CONVEYOR_VISUAL) )
		AddFlag( FL_CONVEYOR );

	// HACKHACK - This is to allow for some special effects
	if ( HasSpawnFlags( SF_CONVEYOR_NOTSOLID ) )
	{
		AddSolidFlags( FSOLID_NOT_SOLID );
	}

	if ( m_flSpeed == 0 )
		m_flSpeed = 100;

	UpdateSpeed( m_flSpeed );
}
Exemplo n.º 20
0
void aero_move_event(EVENT * e)
{
    MECH *mech = (MECH *) e->data;

    if (!Landed(mech)) {
	/* Returns 1 only if we
	   1) Ran out of fuel, and
	   2) Were VTOL, and
	   3) Crashed 
	 */
	if (FuelCheck(mech))
	    return;
	/* Genuine CHEAT :-) */
	if (Started(mech)) {
	    aero_UpdateHeading(mech);
	    aero_UpdateSpeed(mech);
	}
	if (Fallen(mech))
	    MechStartFZ(mech) = MechStartFZ(mech) - 1;
	move_mech(mech);
	if (IsDS(mech) && MechZ(mech) <= (MechElevation(mech) + 5) &&
	    ((event_tick / WEAPON_TICK) % 10) == 0)
	    DS_BlastNearbyMechsAndTrees(mech,
		"You are hit by the DropShip's plasma exhaust!",
		"is hit directly by DropShip's exhaust!",
		"You are hit by the DropShip's plasma exhaust!",
		"is hit by DropShip's exhaust!", "light up and burn.", 8);
	MECHEVENT(mech, EVENT_MOVE, aero_move_event, MOVE_TICK, 0);
    } else if (Landed(mech) && !Fallen(mech) && RollingT(mech)) {
	UpdateHeading(mech);
	UpdateSpeed(mech);
	move_mech(mech);
	if (fabs(MechSpeed(mech)) > 0.0 ||
	    fabs(MechDesiredSpeed(mech)) > 0.0 ||
	    MechDesiredFacing(mech) != MechFacing(mech))
	    if (!FuelCheck(mech))
		MECHEVENT(mech, EVENT_MOVE, aero_move_event, MOVE_TICK, 0);
    }
}
Exemplo n.º 21
0
LRESULT CStatusControl::OnNotify(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled) {
  NMHDR *pNotify((LPNMHDR)lParam);

  switch(pNotify->code) {
    case UDN_DELTAPOS:
      UpdateSpeed(((LPNMUPDOWN) lParam)->iPos, ((LPNMUPDOWN) lParam)->iDelta);
      break;
    case EN_CHANGE:
      {
        TCHAR wszBuffer[32];
        SendMessage(m_hEdit, WM_GETTEXT, 32, (long)wszBuffer);
        double dNewSpeed = _tstof(wszBuffer);

        m_pAppSettings->SetLongParameter(LP_MAX_BITRATE, dNewSpeed * 100);
      }
      break;
    default:
      bHandled = false;
      break;
  }

  return 0;
}
Exemplo n.º 22
0
void Shooter::Run()
{
    if (IsRunning()) {
	UpdateSpeed();
    }
    Log();

    switch (shooting) {
    case kIdle:
	break;
    case kShooting:
	if (shot_timer.Get() > shot_time) {
	    injector.Set(false);
	    shot_timer.Reset();
	    shooting = kResetting;
	}
	break;
    case kResetting:
	if (shot_timer.Get() > release_time) {
	    shooting = kIdle;
	}
	break;
    }
}
Exemplo n.º 23
0
void Player::SendInitialLogonPackets()
{
	// Initial Packets... they seem to be re-sent on port.
	//m_session->OutPacket(SMSG_SET_REST_START_OBSOLETE, 4, &m_timeLogoff); // Seem to be unused by client

    StackWorldPacket<32> data( SMSG_BINDPOINTUPDATE );

    data << float( m_bind_pos_x );
    data << float( m_bind_pos_y );
    data << float( m_bind_pos_z );
    data << uint32( m_bind_mapid );
    data << uint32( m_bind_zoneid );

    m_session->SendPacket( &data );

	//Proficiencies
    SendSetProficiency( 4, armor_proficiency);
    SendSetProficiency( 2, weapon_proficiency);
	
	//Tutorial Flags
	data.Initialize( SMSG_TUTORIAL_FLAGS );
	
    for (int i = 0; i < 8; i++)
		data << uint32( m_Tutorials[i] );

	m_session->SendPacket(&data);

	smsg_TalentsInfo( false );
	smsg_InitialSpells();

	data.Initialize(SMSG_SEND_UNLEARN_SPELLS);
	data << uint32(0); // count, for(count) uint32;
	GetSession()->SendPacket( &data );

	SendInitialActions();
	smsg_InitialFactions();

    /* Some minor documentation about the time field
    // MOVE THIS DOCUMENTATION TO THE WIKI

    minute's = 0x0000003F                  00000000000000000000000000111111
    hour's   = 0x000007C0                  00000000000000000000011111000000
    weekdays = 0x00003800                  00000000000000000011100000000000
    days     = 0x000FC000                  00000000000011111100000000000000
    months   = 0x00F00000                  00000000111100000000000000000000
    years    = 0x1F000000                  00011111000000000000000000000000
    unk	     = 0xE0000000                  11100000000000000000000000000000
    */

	data.Initialize(SMSG_LOGIN_SETTIMESPEED);

	time_t minutes = sWorld.GetGameTime( ) / 60;
	time_t hours = minutes / 60; minutes %= 60;
    time_t gameTime = 0;

    // TODO: Add stuff to handle these variables

	time_t basetime = UNIXTIME;
	uint32 DayOfTheWeek;
	if(localtime(&basetime)->tm_wday == 0)
		DayOfTheWeek = 6;
	else
		   DayOfTheWeek = localtime(&basetime)->tm_wday - 1;
	uint32 DayOfTheMonth = localtime(&basetime)->tm_mday - 1;
	uint32 CurrentMonth = localtime(&basetime)->tm_mon;
	uint32 CurrentYear = localtime(&basetime)->tm_year - 100;

	#define MINUTE_BITMASK      0x0000003F
    #define HOUR_BITMASK        0x000007C0
    #define WEEKDAY_BITMASK     0x00003800
    #define DAY_BITMASK         0x000FC000
    #define MONTH_BITMASK       0x00F00000
    #define YEAR_BITMASK        0x1F000000
    #define UNK_BITMASK         0xE0000000

    #define MINUTE_SHIFTMASK    0
    #define HOUR_SHIFTMASK      6
    #define WEEKDAY_SHIFTMASK   11
    #define DAY_SHIFTMASK       14
    #define MONTH_SHIFTMASK     20
    #define YEAR_SHIFTMASK      24
    #define UNK_SHIFTMASK       29

    gameTime = ((minutes << MINUTE_SHIFTMASK) & MINUTE_BITMASK);
    gameTime|= ((hours << HOUR_SHIFTMASK) & HOUR_BITMASK);
    gameTime|= ((DayOfTheWeek << WEEKDAY_SHIFTMASK) & WEEKDAY_BITMASK);
    gameTime|= ((DayOfTheMonth << DAY_SHIFTMASK) & DAY_BITMASK);
    gameTime|= ((CurrentMonth << MONTH_SHIFTMASK) & MONTH_BITMASK);
    gameTime|= ((CurrentYear << YEAR_SHIFTMASK) & YEAR_BITMASK);

    data << uint32( gameTime );
	data << float( 0.0166666669777748f );  // Normal Game Speed
	data << uint32( 0 ); // 3.1.2
	
    m_session->SendPacket( &data );

	// cebernic for speedhack bug
	m_lastRunSpeed = 0;
	UpdateSpeed();

    WorldPacket ArenaSettings(SMSG_UPDATE_WORLD_STATE, 16);

    ArenaSettings << uint32( 0xC77 );
    ArenaSettings << uint32( sWorld.Arena_Progress );
    ArenaSettings << uint32( 0xF3D );
    ArenaSettings << uint32( sWorld.Arena_Season );

    m_session->SendPacket( &ArenaSettings );

	sLog.outDetail("WORLD: Sent initial logon packets for %s.", GetName());
}
Exemplo n.º 24
0
void CFuncConveyor :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
    pev->speed = -pev->speed;
	UpdateSpeed( pev->speed );
}
Exemplo n.º 25
0
void RigidBody:: Tick(double dt)
{    
	UpdateSpeed(dt);
	UpdatePosition(dt);
    aabb.Calculate(shape, model.matrix());
}
Exemplo n.º 26
0
void CGUIResizeControl::OnDown()
{
  UpdateSpeed(DIRECTION_DOWN);
  Resize(0, m_fSpeed);
}
Exemplo n.º 27
0
void CGUIMoverControl::OnDown()
{
  // if (m_dwAllowedDirections == ALLOWED_DIRECTIONS_LEFTRIGHT) return;
  UpdateSpeed(DIRECTION_DOWN);
  Move(0, (int)m_fSpeed);
}
Exemplo n.º 28
0
void CFuncConveyor::InputSetSpeed( inputdata_t &inputdata )
{
    m_flSpeed = inputdata.value.Float();
	UpdateSpeed( m_flSpeed );
}
Exemplo n.º 29
0
void CGUIMoverControl::OnRight()
{
  // if (m_dwAllowedDirections == ALLOWED_DIRECTIONS_UPDOWN) return;
  UpdateSpeed(DIRECTION_RIGHT);
  Move((int)m_fSpeed, 0);
}
Exemplo n.º 30
0
 void PlayerController::Update()
 {
     UpdateDirection();
     UpdateSpeed();
 }