Skip to content

Commit

Permalink
Fixed using Rotate Then Shoot targeting mode in network multiplayer g…
Browse files Browse the repository at this point in the history
…ames.
  • Loading branch information
forteri76 committed May 18, 2014
1 parent 1b1322d commit 6b57c1f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.jfedor.frozenbubble"
android:versionCode="29"
android:versionName="2.5">
android:versionCode="30"
android:versionName="2.6">

<supports-screens
android:smallScreens="true"
Expand Down
20 changes: 11 additions & 9 deletions src/com/efortin/frozenbubble/VirtualInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,17 @@ public final void init_vars() {
* Process virtual key presses. This method only sets the
* historical keypress flags, which must be cleared by ancestors
* that inherit this class.
* @param keyCode
* <p>The <code>touch</code> flag is a special case that denotes that
* this is purely a launch request, regardless of the keypress.
* @param keyCode - the virtual keypress to simulate.
* @param touchFire - <code>true</code> to set the flag to simulate a
* launch request.
*/
public final void setAction(int keyCode, boolean touch) {
if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
public final void setAction(int keyCode, boolean touchFire) {
if (touchFire) {
mTouchFire = true;
}
else if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
mWasCenter = true;
}
else if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) {
Expand All @@ -149,12 +156,7 @@ else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) {
mWasRight = true;
}
else if (keyCode == KeyEvent.KEYCODE_DPAD_UP) {
if (touch) {
mTouchFire = true;
}
else {
mWasUp = true;
}
mWasUp = true;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/org/jfedor/frozenbubble/FrozenGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ public gameEnum play(boolean key_left, boolean key_right,
attackBarBubbles = malusBar.getAttackBarBubbles();
}

if ((ats && ats_touch_fire) || (!ats && touch_fire)) {
if ((ats && ats_touch_fire) || ((!ats || isRemote) && touch_fire)) {
key_fire = true;
}

Expand Down

0 comments on commit 6b57c1f

Please sign in to comment.