fixed name length bug, and 2v2 timer change#24
fixed name length bug, and 2v2 timer change#24tommy-mor wants to merge 1 commit intosapphonie:masterfrom
Conversation
|
Can you describe how long names would cut off, like with a screenshot? This doesn't make sense, SourceMod defines MAX_NAME_LENGTH == 128 in clients.inc: , there shouldn't be any way to overfill that, as GetClientName should never return something over that size. Digging a little deeper... |
|
Buffers need to be >256: Format(client_name, sizeof(client_name), "%s and %s", client_name, client_teammate_name);
Format(foe_name, sizeof(foe_name), "%s and %s", foe_name, foe_teammate_name);Max name size of 128 on each client would overflow client/foe_name |
|
yeah theres a lot of places where theres more than just player names beign put in buffers. like the score: MGEMod/addons/sourcemod/scripting/mge.sp Line 1725 in 76f0e2d |
|
You can kick it to 300 or 512 for the buffers and ideally I'd prefer you put that timer behavior in a cvar. If you want it'd be feasible to truncate client names as well, I don't know if anyone actually wants to read 128 characters of a clients name, could probably cap it at 32, 48, 64, something like that, with |
name length bug was where in 2v2, super long names would cut off on the hud and you couldn't see the score. now, we doubled the buffer for all names, so that shouldn't ever be a problem. we tested with some long names.
we also changed the behavior for 2v2, for the 2v2 cup. previously, it would start a 3-2-1-fight timer for every round, now it just does that for the beginning round. This is mostly an aesthetic preference, but we got some complaints about it, and prefer it this way.