Void CGameContext::CreateDeath(vec2 Pos, int ClientID, CClientMask Mask) ![]() The best show-case of the new API -330,7 +330,7 void CGameContext::CreatePlayerSpawn(vec2 Pos, CClientMask Mask) Yet, we do not use auto and personally I'm skeptic about `auto` in any non-obvious cases so I still keep the class name on the left side. MsgID leveraged from NetMessage to NetObject) we can come to this:Īuto *pSpectatorInfo = Server()->SnapNewItem(m_ClientID) With some small changes in the generated code (e.g. We have the relation between `CNetObj_` classes and their corresponding `NETOBJTYPE_` so we can use it to remove most of the arguments and the cast. ![]() Protocol7::CNetObj_SpectatorInfo *pSpectatorInfo = static_cast(Server()->SnapNewItem(NETOBJTYPE_SPECTATORINFO, m_ClientID, sizeof(protocol7::CNetObj_SpectatorInfo))) This is the next step after a similar #5600 ![]() ![]() The idea is to simplify and refactor the game code step by step. > What is the motivation for the changes of this pull request? Merge #6330 6330: IServer: Add SnapNewItem() template to simplify the API, do some small refactoring r=def- a=Kaffeine
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
June 2023
Categories |