1. Post #1
    Gold Member
    Sanya_Zol's Avatar
    August 2010
    157 Posts
    I can't keep it anymore..

    Some days ago, playing on another shitty Russian HL2RP server i found that saying too much Russian text causes client to freeze for 1-2 seconds.

    A bug.
    1) bind <key> "say ыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыы ыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыы ыыы"
    2) press <key> again and again, then kill frozen players with hands (don't stop pressing <key>).
    Works on 98% of players - idk why.

    Story
    I got downloaded openaura & hl2rp from (spoiler) and looked through code, then made a temporary client-side fix that causes every text size be calculated with same width&height, so, now everything (chat, text, etc) looks weird, but the client doesn't hangs.
    Then i found that saying that also freezes everyone who can hear you.
    I decided to give the fix to some peoples (asking them to never give that fix to anyone), and release it when any of them will give that fix to someone else (sadly, it happened in 2 days).

    Peoples who got fix from me
    D}|{ET (epiccraft.ru admin) - leaked a fix to staywith.org (as LIskar said)
    Collision (doesn't host any openaura servers - used for clientside fun)
    LIskar (don't know server ip, but he definitely have one)

    The fix, damnit!
    How to apply clientside (while connected to a server): Just run this lua code.
    How to apply serverside: download pirated openaura (or become a kurozael) and replace respective functions in gamemodes\openaura\gamemode\openaura\sh_core.lua
    Code:
    	-- A function to get the size of text.
    	function openAura:GetTextSize(font, text)
    		local lol1,lol2=self:GetCachedTextSize(font,text);
    		return lol1,lol2;
    		-- @fixed
    	end;
    Code:
    	-- A function to get a cached text size.
    	function openAura:GetCachedTextSize(font, text)
    		if (!self.CachedTextSizes) then
    			self.CachedTextSizes = {};
    		end;
    		if ( !self.CachedTextSizes[font] ) then
    			self.CachedTextSizes[font] = {};
    		end;
    		if ( !self.CachedTextSizes[font][text] ) then
    			-- print('openAura:GetCachedTextSize('..font..', '..text..')');
    			--self.CachedTextSizes[font][text] = { 200,20 };
    			surface.SetFont(font);
    			self.CachedTextSizes[font][text] = { surface.GetTextSize(text) };
    		end;
    		-- @fixed
    		--print( unpack( self.CachedTextSizes[font][text] ) );
    		return self.CachedTextSizes[font][text][1],self.CachedTextSizes[font][text][2];
    	end;
    p.s. kurozael, i don't know who are you and don't have anything against. But i definitely hate idea of selling gamemodes, for 150, or 50, or even 0.1. And i also hate peoples who steal someone else's code. Sorry for that.

    Credits
    bug: me
    fix: me
    openaura:
    2011 CloudSixteen.com do not share, re-distribute or modify
    without permission of its author (kurozael.......
    wait.. OH SHI~~
    Reply With Quote Edit / Delete Reply Windows 7 Russian Federation Show Events Friendly Friendly x 2 (list)

  2. Post #2
    guys i have unique darkrp, k?
    chuck14's Avatar
    May 2008
    1,358 Posts
    shit man you and your CRAPPY PIRATED VERSIONS. everyone knows only LEGIT versions won't have these bugs, shit, all it takes is fucking $75 dollars and you STOP MAGICALLY HAVING BUGS
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Funny Funny x 2Dumb Dumb x 2Disagree Disagree x 1 (list)

  3. Post #3
    Gold Member
    Sanya_Zol's Avatar
    August 2010
    157 Posts
    shit man you and your CRAPPY PIRATED VERSIONS. everyone knows only LEGIT versions won't have these bugs, shit, all it takes is fucking $75 dollars and you STOP MAGICALLY HAVING BUGS
    So, that means, you can crash only pirated OA servers? Sorry, i didn't found legit ones to test this.

  4. Post #4
    guys i have unique darkrp, k?
    chuck14's Avatar
    May 2008
    1,358 Posts
    So, that means, you can crash only pirated OA servers? Sorry, i didn't found legit ones to test this.
    its a joke
    forget i said anything

  5. Post #5
    LIskar's Avatar
    January 2012
    9 Posts
    -removed
    Reply With Quote Edit / Delete Reply Windows Vista Russian Federation Show Events Funny Funny x 1Dumb Dumb x 1 (list)

  6. Post #6
    |spec45as|'s Avatar
    September 2011
    15 Posts
    Not the best solution, there is a way without the removal of the functional of GetTextSize() and other functions.

  7. Post #7
    Gold Member
    Sanya_Zol's Avatar
    August 2010
    157 Posts
    Not the best solution, there is a way without the removal of the functional of GetTextSize() and other functions.
    The old solution was:
    1) check the EACH symbol size
    2) if (size==0) then size=size of "U"

    The new solution is:
    Check whole text size, because GetTextSize() is not so buggy anymore.

    AFAIK, only cracked servers affected with that.

  8. Post #8
    |spec45as|'s Avatar
    September 2011
    15 Posts
    The old solution was:
    1) check the EACH symbol size
    2) if (size==0) then size=size of "U"

    The new solution is:
    Check whole text size, because GetTextSize() is not so buggy anymore.
    i understand
    I will say in Russian, bcs seems I talks only with you
    Я понимаю, просто хочу сказать, что это не единственный метод. Я также исправил эту проблему, но совершенно иным методом без урезания дефолтного функционала.

    :]

    AFAIK, only cracked servers affected with that.
    Но при чем тут это вообще?

  9. Post #9

    May 2010
    1,122 Posts
    maybe it's a unicode thing and that's sending a pretty huge string from server to client/vice versa
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Dumb Dumb x 1 (list)

  10. Post #10
    Gold Member
    Sanya_Zol's Avatar
    August 2010
    157 Posts
    i understand
    I will say in Russian, bcs seems I talks only with you
    Я понимаю, просто хочу сказать, что это не единственный метод. Я также исправил эту проблему, но совершенно иным методом без урезания дефолтного функционала.

    :]


    Но при чем тут это вообще?
    Where, where i removed functional of GetTextSize()? It works exactly the same, but ten times faster.

    maybe it's a unicode thing and that's sending a pretty huge string from server to client/vice versa
    Nope, it's just buggy unpack()

    Edited:

    and, please, use [img_thumb] instead of [img] for screenshots

  11. Post #11
    Gold Member
    Sanya_Zol's Avatar
    August 2010
    157 Posts
    My friend reporting that there is still tons of OA servers where this bug works (he is having fun with that bug atm, lol). However, you will need SE bypass to run this fix clientside (or you should be VERY lucky to become one of 2% who won't affected with that)