rushabhshah10 / opennero

Automatically exported from code.google.com/p/opennero
Other
0 stars 0 forks source link

Console/Terminal/Log spammed with repeated damage values during battle. #136

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start battle
2. Look at console/terminal

What is the expected output? What do you see instead?
Lines that will tell me when there are new damage values. Instead, damage is 
shown/logged on every step, even if it hasn't changed.

What version of the product are you using? On what operating system?
OpenNERO-2011.12.07-win32

Please provide any additional information below.
I have attached a local patch that makes damage only be logged/shown when the 
actual value has changed (although the string is still being constructed, as I 
did not see an advantage on iterating twice). Continuously writing the same 
value on the log and terminal/console causes unnecessary strain on resources, 
IMHO (and makes for really big log files).

Original issue reported on code.google.com by cafede...@gmail.com on 12 Dec 2011 at 3:56

GoogleCodeExporter commented 9 years ago
Sorry, forgot to include the windows title update inside the if branch so that 
it's also only updated after a change. New patch attached.

Original comment by cafede...@gmail.com on 12 Dec 2011 at 4:02

Attachments:

GoogleCodeExporter commented 9 years ago
leif, this affects the tournament code, but i think it's fine...

Original comment by ikarpov on 12 Dec 2011 at 3:04

GoogleCodeExporter commented 9 years ago
fixed in r1566 btw

Original comment by ikarpov on 12 Dec 2011 at 3:16

GoogleCodeExporter commented 9 years ago
leif, could you check that this is still ok with your battle scripts?

Original comment by ikarpov on 12 Dec 2011 at 3:24