Changeset 3969
- Timestamp:
- Apr 22, 2015, 6:28:21 PM (8 years ago)
- Location:
- trunk/games/sot3000
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/games/sot3000/constants.h
r3966 r3969 46 46 PlayerGoLeft = 1, 47 47 48 DeadPlayer = 24, 49 48 50 PlusAmmo = 8, 49 51 MinusAmmo = 9, -
trunk/games/sot3000/level-instance.cpp
r3967 r3969 84 84 { 85 85 // 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)); 87 87 } 88 88 … … 399 399 400 400 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 401 412 scene.AddTile(g_game->m_tiles, tid, pos, 0, scale / 3.f, rot); 402 413 } … … 603 614 void level_instance::impulse_x(float impulse) 604 615 { 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 } 614 628 } 615 629 616 630 void level_instance::jump() 617 631 { 618 if ( m_player->m_grounded)632 if (!m_player_killed && m_player->m_grounded) 619 633 { 620 634 m_player->m_grounded = false; … … 626 640 void level_instance::continue_jump(float velocity, float seconds) 627 641 { 628 if ( m_player->m_can_impulse)642 if (!m_player_killed && m_player->m_can_impulse) 629 643 { 630 644 // We can jump higher when scaled up! … … 645 659 void level_instance::fire() 646 660 { 647 if ( m_active_ammo != thing_type::none)661 if (!m_player_killed && m_active_ammo != thing_type::none) 648 662 { 649 663 thing *projecile = m_projectiles[0];
Note: See TracChangeset
for help on using the changeset viewer.