Skip to content

Commit

Permalink
Merge pull request #139 from wellme/bug-fixing
Browse files Browse the repository at this point in the history
Bug fixing
  • Loading branch information
HamaIndustries committed Jun 5, 2017
2 parents 5a849ba + be3a634 commit fb203ff
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
10 changes: 8 additions & 2 deletions src/net/fe/fightStage/FightStage.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import net.fe.fightStage.anim.SkillIndicator;
import net.fe.network.Message;
import net.fe.overworldStage.Grid;
import net.fe.overworldStage.Terrain;
import net.fe.overworldStage.ClientOverworldStage;
import net.fe.transition.FightOverworldTransition;
import net.fe.unit.BattleStats;
Expand Down Expand Up @@ -215,8 +216,13 @@ public FightStage(UnitIdentifier u1, UnitIdentifier u2,
addEntity(new Platform(right.getTerrain(), false, range));
addEntity(new HUD(left, right, this));
addEntity(new HUD(right, left, this));
bg = FEResources.getTexture(right.getTerrain().toString().toLowerCase()
+ "_bg");
if(right.getTerrain() == Terrain.NONE)
if(left.getTerrain() == Terrain.NONE)
bg = FEResources.getTexture(Terrain.PLAIN.toString().toLowerCase() + "_bg");
else
bg = FEResources.getTexture(left.getTerrain().toString().toLowerCase() + "_bg");
else
bg = FEResources.getTexture(right.getTerrain().toString().toLowerCase() + "_bg");

this.attackQ = attackQ;
this.returnTo = returnTo;
Expand Down
21 changes: 11 additions & 10 deletions src/net/fe/fightStage/anim/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,25 @@ public class Platform extends Entity {
public Platform(Terrain t, boolean left, int range) {
super(left ? 0 : FightStage.CENTRAL_AXIS, FightStage.FLOOR - 16);
this.left = left;
String txtName = t.name().toLowerCase();
if(range > 1){
txtName += "_far";
if(t != Terrain.NONE) {
String txtName = t.name().toLowerCase();
if(range > 1)
txtName += "_far";
texture = FEResources.getTexture("platform_" + txtName);
renderDepth = FightStage.PLATFORM_DEPTH;
}
texture = FEResources.getTexture("platform_" + txtName);
renderDepth = FightStage.PLATFORM_DEPTH;
}

/* (non-Javadoc)
* @see chu.engine.Entity#render()
*/
public void render() {
Transform t = new Transform();
if (!left) {
t.flipHorizontal();
if(texture != null) {
Transform t = new Transform();
if (!left)
t.flipHorizontal();
Renderer.render(texture, 0, 0, 1, 1, x, y, x + 120, y + 40, 1, t);
}
Renderer.render(texture, 0, 0, 1, 1, x, y, x + 120, y + 40,
1, t);
}

}
2 changes: 1 addition & 1 deletion src/net/fe/overworldStage/ClientOverworldStage.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public class ClientOverworldStage extends OverworldStage {
public static final float CHAT_DEPTH = 0.3f;

/** The Constant MENU_DEPTH. */
public static final float MENU_DEPTH = 0.2f;
public static final float MENU_DEPTH = 0.1f;

/** The Constant CURSOR_DEPTH. */
public static final float CURSOR_DEPTH = 0.15f;
Expand Down
2 changes: 1 addition & 1 deletion src/net/fe/unit/Unit.java
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ public int getBase(String stat) {
* @param val the val
*/
public void setTempMod(String stat, int val) {
tempMods.put(stat, val);
tempMods.put(stat, (tempMods.containsKey(stat) ? tempMods.get(stat) : 0) + val);
}

/**
Expand Down

0 comments on commit fb203ff

Please sign in to comment.