Revision 43811241 scout/scoutsim/src/ghost_scout.cpp

View differences:

scout/scoutsim/src/ghost_scout.cpp
67 67
      , start_y(pos.y)
68 68
      , orient(orient)
69 69
      , name(scoutname)
70
      , is_visible(false)
70 71
  {
71 72
    scout = wxBitmap(scout_image);
72 73

  
......
136 137

  
137 138
  void GhostScout::paint(wxDC& dc)
138 139
  {
140
      if (!is_visible)
141
      {
142
          return;
143
      }
144

  
139 145
    wxSize scout_size = wxSize(scout.GetWidth(), scout.GetHeight());
140 146
    dc.DrawBitmap(scout, pos.x * PIX_PER_METER - (scout_size.GetWidth() / 2),
141 147
        pos.y * PIX_PER_METER - (scout_size.GetHeight() / 2), true);
142 148
  }
149

  
150
  string GhostScout::get_name()
151
  {
152
    return name;
153
  }
154

  
155
  void GhostScout::set_visible(bool vis)
156
  {
157
    is_visible = vis;
158
  }
143 159
}

Also available in: Unified diff