Changeset 3969


Ignore:
Timestamp:
Apr 22, 2015, 6:28:21 PM (8 years ago)
Author:
sam
Message:

sot3000: awesome artwork for the death animation!

Location:
trunk/games/sot3000
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/games/sot3000/constants.h

    r3966 r3969  
    4646    PlayerGoLeft = 1,
    4747
     48    DeadPlayer = 24,
     49
    4850    PlusAmmo = 8,
    4951    MinusAmmo = 9,
  • trunk/games/sot3000/level-instance.cpp

    r3967 r3969  
    8484    {
    8585        // FIXME: delta-time this shit!
    86         m_player->m_target_scale = min(4.f, m_player->m_target_scale * (1.f + 2.f * seconds));
     86        m_player->m_target_scale = min(8.f, m_player->m_target_scale * (1.f + 2.f * seconds));
    8787    }
    8888
     
    399399
    400400        int tid = t->m_tile_index;
     401
     402        switch (t->get_type())
     403        {
     404        case thing_type::player:
     405            if (m_player_killed)
     406                tid = Tiles::DeadPlayer + (lol::sin(20.0 * t->m_time) > 0);
     407            break;
     408        default:
     409            break;
     410        }
     411
    401412        scene.AddTile(g_game->m_tiles, tid, pos, 0, scale / 3.f, rot);
    402413    }
     
    603614void level_instance::impulse_x(float impulse)
    604615{
    605     // FIXME: left/right commands should affect velocity directly so
    606     // that we can do more appealing air control.
    607     // FIXME: decide whether we run faster when scaled up; I don’t think
    608     // it looks cool, but maybe it makes sense for the gameplay?
    609     m_player_impulse += vec3(impulse * PLAYER_RUN_SPEED, 0.f, 0.f);
    610     //m_player_impulse += vec3(impulse * m_player->m_scale, 0.f, 0.f);
    611     //m_player->m_velocity.x += impulse;
    612 
    613     m_player->m_facing_left = impulse < 0.0f;
     616    if (!m_player_killed)
     617    {
     618        // FIXME: left/right commands should affect velocity directly so
     619        // that we can do more appealing air control.
     620        // FIXME: decide whether we run faster when scaled up; I don’t think
     621        // it looks cool, but maybe it makes sense for the gameplay?
     622        m_player_impulse += vec3(impulse * PLAYER_RUN_SPEED, 0.f, 0.f);
     623        //m_player_impulse += vec3(impulse * m_player->m_scale, 0.f, 0.f);
     624        //m_player->m_velocity.x += impulse;
     625
     626        m_player->m_facing_left = impulse < 0.0f;
     627    }
    614628}
    615629
    616630void level_instance::jump()
    617631{
    618     if (m_player->m_grounded)
     632    if (!m_player_killed && m_player->m_grounded)
    619633    {
    620634        m_player->m_grounded = false;
     
    626640void level_instance::continue_jump(float velocity, float seconds)
    627641{
    628     if (m_player->m_can_impulse)
     642    if (!m_player_killed && m_player->m_can_impulse)
    629643    {
    630644        // We can jump higher when scaled up!
     
    645659void level_instance::fire()
    646660{
    647     if (m_active_ammo != thing_type::none)
     661    if (!m_player_killed && m_active_ammo != thing_type::none)
    648662    {
    649663        thing *projecile = m_projectiles[0];
Note: See TracChangeset for help on using the changeset viewer.