Austinb / GameQ

A PHP Gameserver Status Query Library
https://austinb.github.io/GameQ/
GNU Lesser General Public License v3.0
404 stars 137 forks source link

$protected normalize in Protocol Quake3 for Call of Duty #715

Open vinguida opened 1 year ago

vinguida commented 1 year ago

I found an incorrect normalization response in the Quake3 protocol, for Call of Duty games (cod,cod2,cod4,coduo,codwaw).

I then verified that with this normalization the problem is solved.

 protected $normalize = [
     // General
     'general' => [
         // target => source
         'gametype' => 'g_gametype',
         'hostname' => 'sv_hostname',
         'mapname' => 'mapname',
         'maxplayers' => 'sv_maxclients',
         'mod' => '_Mod',
         'numplayers' => 'clients',
         'password' => ['g_needpass', 'pswrd'],
     ],
     // Individual
     'player' => [
         'name' => 'name',
         'ping' => 'ping',
         'score' => 'frags',
     ],
 ];

Is it better to add normalization to individual Call Of Duty protocols? or is it enough to act directly on the Quake3 protocol?

Thanks for everything

forgive me for my english, I used google translator