epic stupid forum rap battles of histoooooory:
Pakooooooooo vs knooooooooorke
what you think it looks like
, what it actually looks like.
You managed to make a 10 second fix into a 10 minute fix and a complete failure.
There are at least 3 bad bugs in that fix:
It's funny because I told you first in lobby chat:
-table.remove(fallingUnits,k) --will skip the next table pos. with ipairs
<[RoX]knorke> yours crashes anytime a unit is killed in midair i think. and randomly from the removing while looping
<[LCC]Pako> "randomly from the removing while looping" any proof?
<[RoX]knorke> iam not 100% sure but i think table.remove shifts elements positions in the table?
<[RoX]knorke> which confuses ipair
<[LCC]Pako> I think that it is safe to do it with ipairs
<[LCC]Pako> I didn't seek example though
<[LCC]Pako> zwzsg said it is okay and I have used it many times before
<[RoX]knorke> removing last element is probally safe. from middle i dont know
<[RoX]knorke> but no idea really
That is why I added the ValidUnitID-check, because I was not 100% sure if that "removing element" stuff was reliable.
(better safe than sorry)
- h = Spring.GetGroundHeight(x,z) --x can be a nil and assinging a global h
because of the ValidUnitID-check, x,z can not be nil anymore.
(unless off-map coordinates but then you'd need to check for x~=nil in UnitUnloaded as well in case transport dies off-map. original gadget does neither and maybe its not even needed should engine clamp unit coords to map on unload)
- Spring.AddUnitDamage --adding damage to already killed unit
also lobby chat:
<[RoX]knorke> what i dont see in air_releaser, units only get removed from fallingUnits table when they reach ground
<[RoX]knorke> there are no checks if they were destroyed due to AddUnitDamage or normal shoting. how is that thought to work?
<[LCC]Pako> it works most of the time
<[RoX]knorke> units dying midair is not that unlikely
<[LCC]Pako> I haven't seen that ever happen
<[LCC]Pako> didn't think at the time
<[RoX]knorke> air drop 20 stumpies into 20 samsons
<[RoX]knorke> triggered it everytime for me
<[RoX]knorke> and whats worse, h > y-10 never gets true so it spams the error every frame
<[LCC]Pako> stumpies definetly should not ever get killed mid air
<[LCC]Pako> they have huge HP
<[RoX]knorke> err thats bad logic
Still those two lines:
should maybe not be in the same if.
- h > y-10 --using that global which can be still nil and crash
I agree global is bad, uninitiliazed even more so.
Still it can not crash because the full line reads:
if (not unitAlive or h > y-10) then
When the first condition is false, the part behind the or
is not checked.
Previous line is
if (unitAlive) then y = blabla
so should be safe.
(again, excep for off-map)
So from what I see, the only problem with that fix is "off-map coordinates are not checked", which is more a case of "the fix does not fix all of the original bugs"
I set the fall damage value so that one lucky PW could survive sometimes.
Introducing the kind of randomness you claim not to like (see your text about combomb. cb change at least was optionial)
Which I fixed in line with
every unit dies on air transport death.
(i kept the exception of "commando", who still gets damaged by your formula.)
And I actually fixed that gadget few hours after it was released:
if x and Spring.GetGroundHeight(x,z) > y-10 then
1) if you fixed it, why is it neither in current BA release or SVN?
2) That would introduce a bug where fC is not decreased and thus would always be > 0 once a loaded transport has died.
Does not really matter much except that this check becomes useless:
if fC > 0 then
for k,t in ipairs(fallingUnits) do
And then knorke started bashing my Lua skill in a public chat like morons.
That was the _only_ line I said about it in public chat. It holds about as much meaning as your "huge shitty gadgets like the mex upgrader."
(omgomg you bashed BigHead and DeadnightWarrior)
Engine developers are not too keen for keeping backward compatibility for BA, rather they are removing the hard-coded TA values so things can break anytime.
I am pretty sure stuff like unit bouncing physics are not based on TA, so they are hardly "TA values."
Any game is affected by this, not just BA.
In 84.0 units do still take falling damage from engine btw.
Maybe it got changed a bit but since bouncing/falling/sliding was pretty wacky in 0.82.7, I think that is okay.