diff --git a/CHANGELOG.md b/CHANGELOG.md index 488aaa7a..aecace85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/Components/Modules/GSC/Field.cpp b/src/Components/Modules/GSC/Field.cpp index 63893b19..b11270e3 100644 --- a/src/Components/Modules/GSC/Field.cpp +++ b/src/Components/Modules/GSC/Field.cpp @@ -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()