for (java.util.Enumeration i = C3Sprites.elements(); i.hasMoreElements();) { final C3Sprite c3sprite = (C3Sprite)i.nextElement(); if (c3sprite.entityId == entity.getId()) C3Sprites.removeElement(c3sprite); else if(c3sprite.masterId == entity.getId()) { if(entity.hasC3()) { C3Sprites.addElement(new C3Sprite(game.getEntity(c3sprite.entityId), game.getEntity(c3sprite.masterId))); } C3Sprites.removeElement(c3sprite);  } }  if(entity.hasC3() || entity.hasC3i()) addC3Link(entity);
    public void redrawEntity(Entity entity) {        EntitySprite sprite = (EntitySprite)entitySpriteIds.get(new Integer(entity.getId()));        Vector newSprites = new Vector(entitySprites);        Hashtable newSpriteIds = new Hashtable(entitySpriteIds);                        if (sprite != null) {            newSprites.removeElement(sprite);        }                if (entity.getPosition() != null) {            sprite = new EntitySprite(entity);            newSprites.addElement(sprite);            newSpriteIds.put(new Integer(entity.getId()), sprite);        }                entitySprites = newSprites;        entitySpriteIds = newSpriteIds;        repaint(100);    }