Skip to content

Commit b7d0120

Browse files
committed
Fix gain text for vanished unit
1 parent 585f6cf commit b7d0120

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

core/src/com/etheller/warsmash/viewer5/handlers/w3x/War3MapViewer.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3212,8 +3212,6 @@ public float[] getUnitVertexColor(final CUnit unit) {
32123212
@Override
32133213
public TextTag spawnTextTag(final CUnit unit, final TextTagConfigType configType,
32143214
final int displayAmount) {
3215-
final RenderUnit renderPeer = War3MapViewer.this.unitToRenderPeer.get(unit);
3216-
final TextTagConfig textTagConfig = getTextTagConfig(configType.getKey());
32173215
String text;
32183216
switch (configType) {
32193217
case GOLD:
@@ -3236,14 +3234,7 @@ public TextTag spawnTextTag(final CUnit unit, final TextTagConfigType configType
32363234
break;
32373235
}
32383236
}
3239-
final Vector3 unitPosition = new Vector3(renderPeer.location);
3240-
final Bounds bounds = renderPeer.instance.getBounds();
3241-
final TextTag textTag = new TextTag(unitPosition, new Vector2(0, 60f), text,
3242-
textTagConfig.getColor(), textTagConfig.getLifetime(),
3243-
textTagConfig.getFadeStart(), textTagConfig.getHeight(),
3244-
BUILTIN_TEXT_TAG_REPORTED_HANDLE_ID);
3245-
War3MapViewer.this.textTags.add(textTag);
3246-
return textTag;
3237+
return spawnTextTag(unit, configType, text);
32473238
}
32483239

32493240
@Override

0 commit comments

Comments
 (0)