Adding current level name and author to badguy warning
authorTobias Markus <tobbi@mozilla-uk.org>
Sun, 15 Dec 2013 20:58:50 +0000 (21:58 +0100)
committerTobias Markus <tobiasmarkus1@tobiass-mbp.fritz.box>
Fri, 24 Jan 2014 21:56:56 +0000 (22:56 +0100)
src/badguy/badguy.cpp

index 4d3c572..6f337cb 100644 (file)
@@ -147,7 +147,8 @@ BadGuy::update(float elapsed_time)
       int path_chars = badguy.rfind("/",badguy.length());
       badguy = badguy.substr(path_chars + 1, badguy.length() - path_chars);
       // log warning since badguys_killed can no longer reach total_badguys
-      log_warning << "Counted badguy " << badguy << " starting at " << start_position << " has left the sector" <<std::endl;;
+      std::string current_level = "[" + Sector::current()->get_level()->author + " - " + Sector::current()->get_level()->name + "] ";
+      log_warning << current_level << "Counted badguy " << badguy << " starting at " << start_position << " has left the sector" <<std::endl;;
     }
     return;
   }