[297] Alien_Upgrade.lua's GetHasRegenerationUpgrade() returning false unconditionally?

WyzcrakWyzcrak Pot Pie Aficionado Join Date: 2002-12-04 Member: 10447Forum Moderators, Constellation, NS2 Playtester, Squad Five Blue
I'm having the same problem with all of GetHasCelerityUpgrade(), GetHasAdrenalineUpgrade(), GetHasRegenerationUpgrade(), GetHasCarapaceUpgrade(), GetHasSilenceUpgrade(), and GetHasAuraUpgrade(), but I'll arbitrarily focus on what the title cites for my examples below.

I wrote code for 278 (Dec 2015) that shows players' Alien upgrades on the scoreboard. It worked flawlessly until a few weeks ago (295? -- I'm not sure), when /some/ players' upgrades would appear on the scoreboard while others' did not.

I'm passing a player who has regeneration into Alien_Upgrade.lua's global GetHasRegenerationUpgrade() like so:

GetHasRegenerationUpgrade(player)

From 278 until two or three builds ago, it always returned true when given a player with regeneration and false when given a player without regeneration. Now it's intermittently returning false (sometimes returning true) when given a player with regeneration, and I've yet to establish a pattern or figure out why.

Can anyone repro GetHasRegenerationUpgrade() returning false when given a player who has regeneration?

Comments

  • WyzcrakWyzcrak Pot Pie Aficionado Join Date: 2002-12-04 Member: 10447Forum Moderators, Constellation, NS2 Playtester, Squad Five Blue
    In my original code, I was calling GetHasXyzUpgrade() /immediately/ after Embryo:SetGestationData() was called (at the immediate moment when the player chose the upgrade), and GetHasXyzUpgrade() would return true reliably (while the player was still an upgrading egg). That's my best recollection of how the code behaved when I authored it for build 278, and it was worked reliably until a few weeks ago.

    I've modified my code now to /delay/ my call to GetHasXyzUpgrade() until after the gestation is /complete/. By delaying the call until the player is no longer an egg, GetHasXyzUpgrade() again reliably returns true.
Sign In or Register to comment.