[Field]: Add address field (#1003)
This commit is contained in:
parent
8f02f164a0
commit
a46a271dfd
18
CHANGELOG.md
18
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/).
|
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
|
## r4246 - 2023-05-03
|
||||||
|
|
||||||
### Added
|
### 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
|
### Fixed
|
||||||
|
|
||||||
|
@ -140,6 +140,16 @@ namespace Components::GSC
|
|||||||
Game::Scr_AddInt(client->ping);
|
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()
|
Field::Field()
|
||||||
|
Loading…
Reference in New Issue
Block a user