[customwars] r747 committed - bug fixes

0 views
Skip to first unread message

codesite...@google.com

unread,
Mar 20, 2011, 10:05:32 AM3/20/11
to customwar...@googlegroups.com
Revision: 747
Author: ace.stef
Date: Sun Mar 20 07:04:58 2011
Log: bug fixes
http://code.google.com/p/customwars/source/detail?r=747

Modified:
/trunk/v2/src/com/customwars/client/controller/UserInGameInputHandler.java
/trunk/v2/src/com/customwars/client/io/loading/XMLDamageParser.java
/trunk/v2/src/com/customwars/client/model/game/Game.java
/trunk/v2/src/com/customwars/client/ui/renderer/MapRenderer.java
/trunk/v2/src/com/customwars/client/ui/state/MapSelectState.java

=======================================
---
/trunk/v2/src/com/customwars/client/controller/UserInGameInputHandler.java
Mon Feb 21 13:11:03 2011
+++
/trunk/v2/src/com/customwars/client/controller/UserInGameInputHandler.java
Sun Mar 20 07:04:58 2011
@@ -54,7 +54,7 @@
new ClearInGameStateAction().invoke(inGameContext);
showContextMenu(cursorLocation);
} else {
- throw new AssertionError("could not handle A press");
+ throw new AssertionError("could not handle A press context=" +
inGameContext.toString());
}
}

=======================================
--- /trunk/v2/src/com/customwars/client/io/loading/XMLDamageParser.java Mon
Feb 28 12:51:11 2011
+++ /trunk/v2/src/com/customwars/client/io/loading/XMLDamageParser.java Sun
Mar 20 07:04:58 2011
@@ -113,7 +113,9 @@

if (baseDamage != NO_DAMAGE) {
unitBaseDmgTables[attackerID][defenderID] = baseDamage;
- } else if (altDamage != NO_DAMAGE) {
+ }
+
+ if (altDamage != NO_DAMAGE) {
unitAltDmgTables[attackerID][defenderID] = altDamage;
}

@@ -130,7 +132,9 @@

if (baseDamage != NO_DAMAGE) {
cityBaseDmgTables[attackerID][defenderID] = baseDamage;
- } else if (altDamage != NO_DAMAGE) {
+ }
+
+ if (altDamage != NO_DAMAGE) {
cityAltDmgTables[attackerID][defenderID] = altDamage;
}
}
=======================================
--- /trunk/v2/src/com/customwars/client/model/game/Game.java Wed Feb 23
09:46:07 2011
+++ /trunk/v2/src/com/customwars/client/model/game/Game.java Sun Mar 20
07:04:58 2011
@@ -252,7 +252,7 @@
public void setActiveUnit(Unit unit) {
Unit oldVal = this.activeUnit;
this.activeUnit = unit;
- firePropertyChange("activeUnit", oldVal, this.activeUnit);
+ firePropertyChange("activeunit", oldVal, this.activeUnit);
}

public void setWeather(int weather) {
=======================================
--- /trunk/v2/src/com/customwars/client/ui/renderer/MapRenderer.java Fri
Feb 18 15:15:52 2011
+++ /trunk/v2/src/com/customwars/client/ui/renderer/MapRenderer.java Sun
Mar 20 07:04:58 2011
@@ -202,8 +202,8 @@
int y = zoneTile.getRow() * tileSize;
g.fillRect(x, y, tileSize, tileSize);
}
- g.setColor(origColor);
- }
+ }
+ g.setColor(origColor);
}

public void removeUnit(Unit unit) {
=======================================
--- /trunk/v2/src/com/customwars/client/ui/state/MapSelectState.java Sun
Feb 27 04:51:33 2011
+++ /trunk/v2/src/com/customwars/client/ui/state/MapSelectState.java Sun
Mar 20 07:04:58 2011
@@ -98,6 +98,8 @@
public void controlPressed(CWCommand command, CWInput cwInput) {
if (command == CWInput.CANCEL) {
controller.back();
+ } else if (command == CWInput.SELECT) {
+ controller.continueToNextState();
}
}

Reply all
Reply to author
Forward
0 new messages