Lightning rod LightningRodRadius* Properties are not respected in block check
Reported
So as one does, to gain understanding of how the game works I'm investigating the lightning code for the game. I found a bug in it.
In Sandbox.Game.SessionComponents.MySectorWeatherComponent in Sandbox.Game.dll, the lightning rod radius is hardcoded to 50 in the block check portion (after the entity checks have failed), for decoys, but not antennas. I've attached a screenshot of the disassembly and circled the incorrect check.
Hello, Merii,
thanks for sharing this issue with us. It was reported into our internal system. I will let you know about any progress on this.
Kind Regards
Keen Software House: QA Department
Hello, Merii,
thanks for sharing this issue with us. It was reported into our internal system. I will let you know about any progress on this.
Kind Regards
Keen Software House: QA Department
Hello, Merii,
can you please tell me if you are still experiencing this problem on your end?
Can this somehow be observed in the actual game as well?
Can you please try to describe, what exactly is wrong? With what blocks? How is it affecting the game?
Our programmers tried to take a look on this, but did not find any problem there. So if you can provide more information, that are more detailed, that would be great!
Thank you in advance.
Kind Regards
Keen Software House: QA Department
Hello, Merii,
can you please tell me if you are still experiencing this problem on your end?
Can this somehow be observed in the actual game as well?
Can you please try to describe, what exactly is wrong? With what blocks? How is it affecting the game?
Our programmers tried to take a look on this, but did not find any problem there. So if you can provide more information, that are more detailed, that would be great!
Thank you in advance.
Kind Regards
Keen Software House: QA Department
Sure! It's not super easy to reproduce because it's lightning and no vanilla blocks set this property related but:
"Lightning rod" blocks are any blocks that have a LightningRodRadiusLarge/LightningRodRadiusSmall property. This would be the "Decoy" and "Antenna" blocks (all decoys, all antennas - it's a property on the definition for that block type.)
This radius property is used to try to detect if lightning should hit a decoy block instead of whatever other target was selected, based on what I can see from the code above.
For antennas, this is properly used. For decoys, the property exists on the block def, which would let you create a modded block with a very large lightning rod radius, but this radius will not work, because of the problem I reported. Decoys do not get their radius checked.
What needs to happen is a tiny bit of code needs to be changed from what I can see.
Sure! It's not super easy to reproduce because it's lightning and no vanilla blocks set this property related but:
"Lightning rod" blocks are any blocks that have a LightningRodRadiusLarge/LightningRodRadiusSmall property. This would be the "Decoy" and "Antenna" blocks (all decoys, all antennas - it's a property on the definition for that block type.)
This radius property is used to try to detect if lightning should hit a decoy block instead of whatever other target was selected, based on what I can see from the code above.
For antennas, this is properly used. For decoys, the property exists on the block def, which would let you create a modded block with a very large lightning rod radius, but this radius will not work, because of the problem I reported. Decoys do not get their radius checked.
What needs to happen is a tiny bit of code needs to be changed from what I can see.
Hello, Merii,
thank you for providing the additional information.
I have passed it to the responsible people and hopefully this will be enough.
I will reach here if still something is needed.
Thank you for you time and understanding.
Kind Regards
Keen Software House: QA Department
Hello, Merii,
thank you for providing the additional information.
I have passed it to the responsible people and hopefully this will be enough.
I will reach here if still something is needed.
Thank you for you time and understanding.
Kind Regards
Keen Software House: QA Department
Replies have been locked on this page!