[Field]: Add address field (#1003)

This commit is contained in:
Edo 2023-05-03 18:03:46 +01:00 committed by GitHub
parent 8f02f164a0
commit a46a271dfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 1 deletions

View File

@ -4,11 +4,27 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0.3.0/).
## r4251 - 2023-05-03
### Added
- Add GSC client field `ping` as a read-only field (#1002)
- Add GSC client field `address` as a read-only field (#1003)
- Add to the iw4x-rawfiles common_scripts\utility GSC script `getIP` function.
### Fixed
- `getPing` function in `common_scripts\utility` now works.
### Known issues
- Sound issue fix is experimental as the bug is not fully understood.
## r4246 - 2023-05-03
### Added
- Add to the iw4x-rawfiles common_scripts\utility GSC script `setPing` & `getPing` for backward compatibility.
- Add to the iw4x-rawfiles `common_scripts\utility` GSC script `setPing` & `getPing` functions for backward compatibility.
### Fixed

View File

@ -140,6 +140,16 @@ namespace Components::GSC
Game::Scr_AddInt(client->ping);
}
);
AddClientField("address",
[]([[maybe_unused]] Game::client_s* client, [[maybe_unused]] Game::gclient_s* pSelf, [[maybe_unused]] const ClientFields* pField)
{
},
[]([[maybe_unused]] Game::client_s* client, [[maybe_unused]] Game::gclient_s* pSelf, [[maybe_unused]] const ClientFields* pField)
{
Game::Scr_AddString(Game::NET_AdrToString(client->header.netchan.remoteAddress));
}
);
}
Field::Field()