From b1ae2a4128a0fb0ec7d01e6cfb320d610afe56c4 Mon Sep 17 00:00:00 2001 From: Julian Date: Wed, 12 Mar 2014 14:35:24 -0400 Subject: [PATCH] Added the changes I proposed a while back. So now, when currentGame.gamePlay is set to GAMEPLAY_ONPON: - You start with 50 shield, and never gain any increased capacity. - You can't charge the charge cannon and shoot at the same time; if you shoot the plasma gun, the charge cannon shoots as well (as if you had released the charge key). I didn't add in the feature to keep the view from slowing you down, because the method I used was imperfect anyway. --- src/game.cpp | 15 ++++++++++++--- src/missions.cpp | 9 ++++++--- src/player.cpp | 2 +- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index 45e8548..c4af4bc 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -70,10 +70,19 @@ void newGame() currentGame.maxPlasmaAmmo = 100; currentGame.maxRocketAmmo = 10; - currentGame.shieldUnits = 1; + if (currentGame.gamePlay == GAMEPLAY_ONPON) + { + currentGame.shieldUnits = 2; + player.maxShield = 50; + player.shield = 50; + } + else + { + currentGame.shieldUnits = 1; + player.maxShield = 25; + player.shield = 25; + } - player.maxShield = 25; - player.shield = 25; player.ammo[0] = 0; player.ammo[1] = 5; player.weaponType[0] = W_PLAYER_WEAPON; diff --git a/src/missions.cpp b/src/missions.cpp index 37b6502..c384603 100644 --- a/src/missions.cpp +++ b/src/missions.cpp @@ -160,7 +160,8 @@ void updateSystemStatus() strcpy(currentGame.stationedName, "Nerod"); initPlanetMissions(currentGame.system); - currentGame.shieldUnits = 2; + if (currentGame.gamePlay != GAMEPLAY_ONPON) + currentGame.shieldUnits = 2; } else if (currentGame.area == 11) { @@ -170,7 +171,8 @@ void updateSystemStatus() strcpy(currentGame.stationedName, "Odeon"); initPlanetMissions(currentGame.system); - currentGame.shieldUnits = 3; + if (currentGame.gamePlay != GAMEPLAY_ONPON) + currentGame.shieldUnits = 3; } else if (currentGame.area == 18) { @@ -180,7 +182,8 @@ void updateSystemStatus() strcpy(currentGame.stationedName, "Pluto"); initPlanetMissions(currentGame.system); - currentGame.shieldUnits = 4; + if (currentGame.gamePlay != GAMEPLAY_ONPON) + currentGame.shieldUnits = 4; } else // Update the mission for the planet { diff --git a/src/player.cpp b/src/player.cpp index 24e2774..c5cd601 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -113,7 +113,7 @@ void doPlayer() if (player.weaponType[1] == W_CHARGER) { - if (engine.keyState[SDLK_SPACE]) + if (engine.keyState[SDLK_SPACE] && !(currentGame.gamePlay == GAMEPLAY_ONPON && (engine.keyState[SDLK_LCTRL] || engine.keyState[SDLK_RCTRL]))) { limitCharAdd(&player.ammo[1], 1, 0, 200); }