Fortress Forever

Go Back   Fortress Forever > Projects > Fortress Forever > Bug

When 1 first join a team for the 1st time keeps spaming J Issue Tools
issueid=270 03-03-2010 12:01 PM
zE zE is offline
Pew pew ze beams
When 1 first join a team for the 1st time keeps spaming J

When i enter server and i join a team keeps showing this and then shows some strange symbols spam next.

This isnt a hlstats plugin thats causing it for sure because i erased it and kept doing it.

This new patch also broke my Hlstatsx ingame.
I got this from error_logs

L 03/01/2010 - 14:46:41: [SM] [0] Line 843, hlstatsx.sp::display_menu()
L 03/01/2010 - 14:46:41: [SM] [1] Line 1264, hlstatsx.sp::hlx_sm_msay()

Somehow new patch broke hlx_sm_msay function.
Issue Details
Project Fortress Forever
Category General Game
Status Fixed
Priority 10 - Lowest
Affected Version 2.4
Fixed Version 2.42
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)

03-03-2010 12:11 PM
Gets tickled by FF
 
zE send me a screenshot or something cause I'm a bit confused as to what you mean
Reply
03-03-2010 12:45 PM
zE zE is offline
Pew pew ze beams
 
hm i ´ve erased all plugins and upload 1 by one and reset server after each time and the spaming J issue is related to HlStryker FF HUD Clock plugin, and Flag assist points by Hlstryter too somehow this patch broke it, usually showed type hours/ +1 24 to set ur timezone and now just shows J. So those plugin here the ones who got broke witht the update
But still it broke some functions on Hlstatsx ingame related to hlx_sm_msay functions.
Reply
03-03-2010 03:33 PM
 
You'll need to work with hlstatsx to fix that zE. We can't not code things for fear of breaking plug ins.

From the Change Log.
  • Fixed chat spamming using #ff_<msg>
  • Chat now displays properly in clients console. Instead of showing as #ff_<msg> it will show the actual sentence. Color codes no longer display either for easy readability
Reply
03-03-2010 04:29 PM
zE zE is offline
Pew pew ze beams
 
It didnt broke only Hlstats, It kinda broke 3 plugins made for FortressForever

FF Connect/Disconnect Messages by hlstriker
FF Flag Assist Points Messages by hlstriker
FF HUD Clock by hlstriker

They do work, but the display messages on them to inform how to use them and etc, are really broke and spam some weird symbols.

And ye i think its related to the changes on fonts and chat format thing made in 2.41.

I think hlstriker is on the dev team, hes the one who can have a clue of whats messing up, i think the solution to this is easy, but i cant code those plugins so i have no idea how to fix it..
Reply
03-03-2010 05:02 PM
 
yeah zE, anytime we change stuff there is a chance that the plugins that have been made are going to break. That's inevitable b/c those all pull things out of the code, so when we change the code it messes those up. But like zip said, that isn't something we can fix or change b/c it's not our stuff.

Also, hlstriker is afk for an extended period of time, just so you know.
Reply
03-03-2010 05:06 PM
 
I'm guessing that the SayText usermessage has been changed so it expects an extra bit..
Reply
03-03-2010 05:47 PM
zE zE is offline
Pew pew ze beams
 
k, so what file should i edit so the message related stuff in server stays = to 2.4 version
Reply
03-03-2010 07:38 PM
 
Quote:
Originally Posted by zE
k, so what file should i edit so the message related stuff in server stays = to 2.4 version
You don't you fix the plug-ins just like when Valve updates and sourcemod breaks sourcemod patch's their stuff. Remove the plug ins or fix the plug ins pretty simple.
Reply
03-03-2010 07:42 PM
zE zE is offline
Pew pew ze beams
 
k anyway i need to know which code changed, so i can try to fix the plugins

have 1001 dudes asking when the hlstatsx update is coming lol.
Reply
03-03-2010 10:54 PM
 
I made a quick fix of those 3 plugins you mentioned, .sp and .smx files here.

The issue seems to be that the SayText usermessage format has changed, so when the plugin tries to use it it just prints garbage. My quick fix is to use the PrintToChat command instead. This isn't the same and doesn't understand colour codes, but its better than nothing.

You need someone who knows what the new SayText usermessage is to fix this properly.
Reply
03-03-2010 11:48 PM
Stuff Do-er
 
The SayText usermessage has not changed. However, CHudChat::ChatPrintf() was rewritten.

Here's the SayText usermessage:
Code:
	UserMessageBegin( filter, "SayText" );
		if ( pPlayer ) 
		{
			WRITE_BYTE( pPlayer->entindex() );
		}
		else
		{
			WRITE_BYTE( 0 ); // world, dedicated server says
		}
		WRITE_STRING( pText );
		WRITE_BYTE( bChat );
	MessageEnd();
I have no idea how the plugins work.
Reply
03-04-2010 10:52 AM
 
Somewhere between the plugin sending a message and it getting displayed, the string is getting the first bit chopped off.
The string it is trying to send starts "^5[Clock]", in hex this is 5E 35 5B 43 6C, losing the first bit this transforms to BC 6A B6 86 D8 or "□j□□□"
If it's not caused by the plugin and server disagreeing over the message, then it's a bug in FF. Perhaps the string is being accessed as an array thats indexed with a 1 instead of a 0.
Reply
03-04-2010 12:35 PM
zE zE is offline
Pew pew ze beams
 
I Really apreciate the work u put on it sidd, very thks : ))))
i gonna test it now D : let u know in a bit.
Reply
03-04-2010 01:10 PM
zE zE is offline
Pew pew ze beams
 
: )
The connect /disconnect plugin doesnt work at all, doesnt warns when someone enters / emits sound.

The other 2 ones do work but still the messages things are bugged, heres the picture.


* dont care about the flagassist points plugin, the 2.4 already have a function to know wheres the flag is, and im not sure if it works with the latest hlstatsx version,so dont bother about it, ill just erase it.

About the conect/disconect plugin i can get another thats not ff specific from sourcemod page, if it cant be fixed.

I just really wanted to keep the Hud clock one, if that chat thing can´t be fixed, its possible to simply remove the message thing on it ?
Reply
03-05-2010 05:38 PM
zE zE is offline
Pew pew ze beams
 
so ye, sidd fixed the hud hour plugin, removing color codes from plugin code. So the colors are the issue : )
Reply
03-06-2010 12:49 AM
 
Quote:
Originally Posted by Sidd
I made a quick fix of those 3 plugins you mentioned, .sp and .smx files here.

The issue seems to be that the SayText usermessage format has changed, so when the plugin tries to use it it just prints garbage. My quick fix is to use the PrintToChat command instead. This isn't the same and doesn't understand colour codes, but its better than nothing.

You need someone who knows what the new SayText usermessage is to fix this properly.
He changed how it was printing. He didn't remove color codes zE, the color codes are in the SayText but instead of using Say Text he made it use PrintToChat which doesn't have color code in it if I understand correctly.
Reply
03-15-2010 05:24 AM
zE zE is offline
Pew pew ze beams
 
HLstatsX CE Ingame Plugin" (1.6.8-pre3) by psychonic

<@psychonic> i see
<@psychonic> it requires a name
<@psychonic> for the way it autocolors the name
<@psychonic> like
<@psychonic> ^4hi prints garbage
<@psychonic> psychonic: ^4hi works
<@psychonic> working on a workaround now
<@psychonic> also
<@psychonic> i think it can be considered a bug
<@psychonic> octo could better explain why
<@psychonic> bad pointer nonsenz
<@psychonic> can you link that bug thread?
<@psychonic> on their forum
<zE> http://forums.fortress-forever.com/p...d=270#note1760
<@psychonic> it works
<@psychonic> also, hlx prefixes are no longer supported in FF
<@psychonic> as all messages will be prefixed by "Console: "
<@psychonic> the same fix will need to be done for the other plugins as well
<@psychonic> can choose between prefixing them with a player name or with Console
<@psychonic> their function barfs if the message doesn't begin with the name of the client the message was sent from
<@psychonic> the first byte of the message has to be the client index
<@psychonic> then, before any color codes
<@psychonic> add to the message text
<@psychonic> "Name: "
<@psychonic> the colon and space also need to be there (i think)
* Retrieving #hlxce modes...

If anyone understands what this means, and if helps for the next version/patch this is from the dude that codes Hlstatsx.

He fixed it for me puting console: displayng before all chat commands show.
Reply
03-15-2010 12:24 PM
 
I had to create a new account as I hadn't reset my password since they were cleared and the captcha on the forgot password link seems busted (kept telling me "The string you entered for the image verification did not match what was displayed." when I was positive it was correct, thrice).

As hinted above, since the FF devs would only give a minor hint of what changed or what to do to fix it, I did some messing around with it.

They are correct that the SayText format itself did not change, but not their chat display function in the client.dll appears to require that the message be prefixed by the name of the sender, otherwise it appears it gets a pointer to an incorrect address and prints whatever happens to be in the server's memory at that address (until it hits a 0, of course). This itself is probably a bug, but not one they would ever need to expect when it doesn't affect their own code since they control where they call it from.

As a quick fix to hlstriker's plugins, you can replace his stock SayText function in each plugin with this one.

PHP Code:
stock SayText(const String:szText[], const iColor=1, const iClient=0)
{
    
decl String:szFormat[1024];
    
FormatEx(szFormatsizeof(szFormat)-1"Console: %s\x0A"szText);
    
    new 
Handle:hBf;
    if(
iClient <= 0)
        
hBf StartMessageAll("SayText");
    else
    {
        
EmitSoundToClient(iClientSOUND_CHAT);
        
hBf StartMessageOne("SayText"iClient);
    }
    
BfWriteByte(hBf0);
    
BfWriteString(hBfszFormat);
    
BfWriteByte(hBfiColor);
    
EndMessage();

The message will print correctly again in color, but they will also now be prefixed by "Console: " as if you typed them with "say" in the server console.

I also made a minor optimization in it and fixed a bug where the message may no longer print at all if only a single client was in the game.
Reply
03-15-2010 07:12 PM
Stuff Do-er
 
Thanks for looking into it psychonic. I'll take a look at the code.
Reply
03-15-2010 07:29 PM
zE zE is offline
Pew pew ze beams
 
Thks psychonic you pown : )

And pls devs, make it compatible with sourcemod plugins for the next patch/version , all servers use some of this 3rd party plugins.
Reply
Reply

Issue Tools
Subscribe to this issue

All times are GMT. The time now is 11:57 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.