Loading...
  OR  Zero-K Name:    Password:   

Post edit history

Shield link behavior chatlog

To display differences between versions, select one or more edits in the list using checkboxes and click "diff selected"
Post edit history
Date Editor Before After
8/5/2014 12:02:54 PMGBrankTheEloIsALie before revert after revert
Before After
1 Yeah, it would be easily fixable as GF already noted. 1 Yeah, it would be easily fixable as GF already noted.
2 \n 2 \n
3 @AutoWar: The system is really simple now. Every shield finds a random neighboring shield and "normalizes" charge (transfers 1% of the difference). This happens a few times per frame. 3 @AutoWar: The system is really simple now. Every shield finds a random neighboring shield and "normalizes" charge (transfers 1% of the difference). This happens a few times per frame.
4 \n 4 \n
5 Btw GF, your code only has a 1/N² chance (in a normal case with no disabled/dead shields) to make a shield exchange charge with itself. 5 Btw GF, your code only has a 1/N² chance (in a normal case with no disabled/dead shields) to make a shield exchange charge with itself.
6 The random part with "The +1 is here intentional [. . . ] ( otherID will be nil) " only results in an attempt+1, not an attempt=false. Since you have two attempts, you need to roll the right random number twice. 6 The random part with "The +1 is here intentional [. . . ] ( otherID will be nil) " only results in an attempt+1, not an attempt=false. Since you have two attempts, you need to roll the right random number twice to not transfer.
7 I mean, unless every unit is included in its own neighbor list, in which case you have two different ways of making shield transfer fail. I won't try to wrap my head around the AddDataThingToIterable, AddThingToIterable and double table business that's going on [url=https://github. com/ZeroK-RTS/Zero-K/blob/master/LuaRules/Gadgets/unit_shield_link. lua]here[/url]. 7 I mean, unless every unit is included in its own neighbor list, in which case you have two different ways of making shield transfer fail ( which I'm not sure if you actually intended) , but I won't try to wrap my head around the AddDataThingToIterable, AddThingToIterable and double table business that's going on [url=https://github. com/ZeroK-RTS/Zero-K/blob/master/LuaRules/Gadgets/unit_shield_link. lua]here[/url]. . .