server-side Hotfix

wulf 21wulf 21 Join Date: 2011-05-03 Member: 96875Members
edited July 2011 in NS2 General Discussion
<div class="IPBDescription">for gamebreaking bug in build 182</div>There is a gamebreaking bug in the current build that allows any player (even spectator) to spam any structure anywhere. Someone just used it to ruin a game and bring the server "EPIC" down. I already reported it to getsatisfaction (privately).

Looked at the code: It's an extremely simple programming error. Attached is the fixed file.

Extract it into ns2\lua. It will overwrite the original file but don't worry, it is identical to the original but one (update: 3 :) ) character (the one the programmer did wrong). And it probably will be overwritten in the next build anyways, so you don't have to worry about uninstalling it.

edit: Updated download (see below). But really doesn't matter which version you use, both will prevent it. (this one is just more correct from a programmers standpoint)

Comments

  • jeffcojeffco Join Date: 2011-02-14 Member: 81785Members
    hello there,

    i have inspected the diff and.. without having any deeper knowledge of NS2's lua code...
    calling client:GetControllingPlayer() does not make sence if client == nil... hence
    i suggest using "if client ~= nil <b>and</b> Shared.GetCheatsEnabled() then" instead of "if client <b>=</b>= nil or Shared.GetCheatsEnabled() then"
  • wulf 21wulf 21 Join Date: 2011-05-03 Member: 96875Members
    Darn, you are right!

    But you don't want to use this from the server console anyway (client == nil happens only if you put the command into the server console). So it doesn't cause anything. I could have commented it out completely but didn't want it to be too obvious. But now that you mentioned it, I'll update it.
  • billcatbillcat Join Date: 2002-11-02 Member: 4903Members, Constellation
    I saw this bug on my server last night. PITA to keep running around zombies..
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    Amazing what one wrong character can do.
  • wulf 21wulf 21 Join Date: 2011-05-03 Member: 96875Members
    <!--quoteo(post=1863991:date=Jul 28 2011, 12:16 AM:name=Wilson)--><div class='quotetop'>QUOTE (Wilson @ Jul 28 2011, 12:16 AM) <a href="index.php?act=findpost&pid=1863991"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Amazing what one wrong character can do.<!--QuoteEnd--></div><!--QuoteEEnd-->

    yes. ~= (not equal) is the complete opposite of == (equal). Just like this sentence where you put in a comma at another place and the sense changes. pure logic XD
  • PersianImm0rtalPersianImm0rtal Join Date: 2010-12-02 Member: 75414Members, Constellation, NS2 Map Tester
    We just applied this to the 156 servers and it works great!
  • MaGicBushMaGicBush Join Date: 2002-12-02 Member: 10378Members
    <!--quoteo(post=1864012:date=Jul 27 2011, 06:10 PM:name=PersianImm0rtal)--><div class='quotetop'>QUOTE (PersianImm0rtal @ Jul 27 2011, 06:10 PM) <a href="index.php?act=findpost&pid=1864012"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->We just applied this to the 156 servers and it works great!<!--QuoteEnd--></div><!--QuoteEEnd-->

    Oh nice, time to hop on :).
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    Thank you for bringing this up with a fix!
    Thanks volc for telling me.
  • MOOtantMOOtant Join Date: 2010-06-25 Member: 72158Members
Sign In or Register to comment.