Jump to content


Photo

Bug 552 Electro Flares


  • Please log in to reply
9 replies to this topic

#1 uff

uff

    Sergeant

  • Forum Members
  • PipPipPip
  • 14 posts

Posted 08 October 2007 - 12:34 PM

Hi,

I am looking into it now, see what I can do about it.

How should the electro flare behave ?
Only light up a few cells around it when thrown somewhere or dropped on the ground ?
Anything else ?

#2 7Saturn

7Saturn

    Sergeant

  • Forum Members
  • PipPipPip
  • 87 posts

Posted 08 October 2007 - 12:51 PM

How should the electro flare behave ?
Only light up a few cells around it when thrown somewhere or dropped on the ground ?
Anything else ?

Well, that depends on how the night-missions look like. I'm not sure, but the last time I tried it, the "night" was just a limit of sight. So by this manner it just would enlarge the limit of sight but it wouldn't enlight anything (at least not litarally). Has that changed (haven't played UFO2K much in the last time...)?

#3 Guest_Azrael Strife_*

Guest_Azrael Strife_*
  • Guests

Posted 08 October 2007 - 06:00 PM

Uhm... haven't electroflares been implemented already?

#4 uff

uff

    Sergeant

  • Forum Members
  • PipPipPip
  • 14 posts

Posted 08 October 2007 - 11:10 PM

Uhm... haven't electroflares been implemented already?


Hmm, sure they are but there is a bug in Mantis, thus the title of this topic.
I did not see anyone taking care of it so I give it a try.

Also, I did not see any specification / description about electro flares, which raised my question.
BTW, where are all the specs of new stuff added to the game, should they be in the code, wiki, Mantis ?
Cause I did not see anything about this in HACKING file.

Ok, back to topic.
When you drop / throw an electro flare on the ground, it raises the light level of the cells around it.
Question is:
Should the light levels be restored (lowered to previous values) when the flare is picked up (flare is "switched off" ) ?
or
The light levels should remain and "move" with the one carrying an active electro flare.

#5 Guest_Azrael Strife_*

Guest_Azrael Strife_*
  • Guests

Posted 09 October 2007 - 02:16 AM

Uhm... haven't electroflares been implemented already?


Hmm, sure they are but there is a bug in Mantis, thus the title of this topic.
I did not see anyone taking care of it so I give it a try.

Also, I did not see any specification / description about electro flares, which raised my question.
BTW, where are all the specs of new stuff added to the game, should they be in the code, wiki, Mantis ?
Cause I did not see anything about this in HACKING file.

Ok, back to topic.
When you drop / throw an electro flare on the ground, it raises the light level of the cells around it.
Question is:
Should the light levels be restored (lowered to previous values) when the flare is picked up (flare is "switched off" ) ?
or
The light levels should remain and "move" with the one carrying an active electro flare.

I cannot access Mantis at the moment, but is the bug about implementation of electroflares or an actual bug with the current implementation? otherwise you might be doing already done work.

NW must know.

#6 uff

uff

    Sergeant

  • Forum Members
  • PipPipPip
  • 14 posts

Posted 09 October 2007 - 03:05 AM

I cannot access Mantis at the moment, but is the bug about implementation of electroflares or an actual bug with the current implementation? otherwise you might be doing already done work.

NW must know.


Indeed, I hope someone is fixing Mantis so that it will resend lost passwords.

Flares are already implemented, it is a bug in the current code.
During night missions, when you drop a flare on the ground, the cells around become brighter as it should be
but
if you open inventory screen, after dropping the flare, and then you click on the flare on the ground and click again to put it back on the ground,
the cells around become brighter again.
This bug actually allowes a player to brighten the entire map with just one flare because after you pick up the flare, the cells around do not go dark automatically as it should be.
Hope it clears it, the bug is well described on Mantis.

And back to my original questions.
How should the flares work ?
Where should the spec / descriptions of new stuff go - code, wiki, Mantis ? As it is not described in the HACKING file.

#7 Guest_Azrael Strife_*

Guest_Azrael Strife_*
  • Guests

Posted 09 October 2007 - 08:10 AM

I cannot access Mantis at the moment, but is the bug about implementation of electroflares or an actual bug with the current implementation? otherwise you might be doing already done work.

NW must know.


Indeed, I hope someone is fixing Mantis so that it will resend lost passwords.

Flares are already implemented, it is a bug in the current code.
During night missions, when you drop a flare on the ground, the cells around become brighter as it should be
but
if you open inventory screen, after dropping the flare, and then you click on the flare on the ground and click again to put it back on the ground,
the cells around become brighter again.
This bug actually allowes a player to brighten the entire map with just one flare because after you pick up the flare, the cells around do not go dark automatically as it should be.
Hope it clears it, the bug is well described on Mantis.

And back to my original questions.
How should the flares work ?
Where should the spec / descriptions of new stuff go - code, wiki, Mantis ? As it is not described in the HACKING file.

Primary location is always the code, then if possible post a description of how it works in either here or in the wiki preferrably, but I guess also having it on Mantis would not hurt in the least bit ^_^

#8 uff

uff

    Sergeant

  • Forum Members
  • PipPipPip
  • 14 posts

Posted 13 October 2007 - 08:24 AM

Ok, here is the patch for the bug.

There is also, probably, an unnecessary call to update_lights() routine when a player enters a battle planner screen.
I dont know why that is, I guess it is unnecessary because noone needs to see the actual "3D" map at that point.

I noticed it when I put two battle_report() calls to show_light_source() which is called from update_lights() for, I guess, many cells in the map.
Loading the battle planner lasted almost 30s for moon base map.

And what is going on with the Mantis. I will not be able to do anything more without it.

Attached Files

  • Attached File  map.rar   1.25K   108 downloads

Edited by uff, 13 October 2007 - 08:30 AM.


#9 nachtwolf

nachtwolf

    UFO2000 Staff: Leader

  • Moderators
  • PipPipPipPip
  • 310 posts

Posted 05 December 2007 - 06:41 PM

This bug is in fact a useless call to update_lights() and probably a missing one to remove_lights().

Thanks for the patch, I'll check this out.
Posted Image

#10 Kratos

Kratos

    UFO2000 Staff

  • Moderators
  • PipPipPipPipPip
  • 4,113 posts

Posted 30 December 2007 - 06:20 PM

Thanks for your interest! :)

I did notice this bug as well (I made the topic in mantis after all :P)