Servers Online
Major networking & rendering refactoring in progress; Community features coming soon...
Hardcode or not?

Интересный вопрос. Дело в том, что большинство людей просто напросто ленивы, чтобы производить какие либо исследования о том как получать динамические данные во время исполнения, и предпочитают хардкодинг динамическому извлечению данных (ДИД), но иногда причина кроется в другом - им не хватает знаний и опыта.


Когда разговор заходит о читах, люди предпочтут хардкодинг только потому что гораздо легче сделать дамп смещения какой-то переменной и просто вставить его значение себе в проект, чем тратить время на выяснения того как всё устроено. Это вполне понятно в случае, когда ты работаешь с игрой не имеющей так называемые 'карты данных', обычно используемых при сохранении/загрузке в одиночной игре, однако... как насчёт Source Engine? Он предоставляет великолепную возможность надёжно извлекать динамические смещения во время исполнения по имени и... люди всё равно продолжают хардкодить. Очень жаль, что большинство пользователей форума unknowncheats даже не пытаются копать глубже, аргументируя это тем, что ДИД хуже и медленнее, чем захардкоденые смещения. Забавно, что когда доходит до логики и аргументов - они не могут сказать многого, кроме как нести бред о потере производительности и пустой трате времени. Суровая реальность такова, что им придётся обновлять смещения от обновления к обновлению, и я лично считаю, что это, чёрт побери, тупо. Почему бы не потратить час и разработать гибкое API? Оно будет гораздо более удобное хотя бы потому что тебе не надо будет создавать глобальные/статические переменные, чтобы хранить в них те самые смещения, и код будет выглядеть приблизительно так:

C_BaseEntity *C_BasePlayer::GetActiveWeapon()
{
	// Loop through the datamap structure looking for the string you pass, cache the offset and use it further.
	DATAMAP_CACHE_CREATE( m_hActiveWeapon, GetPredDescMap(), "m_hActiveWeapon", NULL );
	// Take the cached offset and extract the value.
	return DATAMAP_CACHE_EXTRACT_VALUE( this, m_hActiveWeapon, CHandle ).Get();
}

Вместо этого:

inline C_BaseCombatWeapon *GetActiveWeapon( void )
{
	CBaseHandle hActiveWeapon = *MakePtr( CBaseHandle *, BaseEnt(), gStaticVars.m_hActiveWeapon );
	return dynamic_cast( g_pEntList->GetClientEntityFromHandle( hActiveWeapon ) );
}

Другая печальная вещь заключается в том, что большинство "разработчиков" читов пытаются подражать своим "героям" с различных форумов, таких как unknowncheats. Однако эти "герои" в некоторых случаях даже не понимают, о чём говорят, а иногда, их посты содержат термины и утверждения, которые, помимо того, что далеки от реальности, так ещё и отсутствуют в Source Engine, или вообще по-другому называются. Но им вообще пофиг (очевидно потому что они даже не заморачиваются о том, кто читает их посты, а это, как правило, необразованные люди). Затем те, кто это читает, пытаются повторять за ними, распуская эти "знания" в виде банального дизинформирования о том, как что устроено. Одним словом, это можно назвать "рак", так как никто не в силах контролировать распространение этой неправильной информации, однако люди, которые ведают эти "секреты", считают, что они правы.


Тоже самое применяется к виртуальным функциям. Дело в том, что существует публичное SDK от Source Engine, где можно просто взять готовые заголовки, для того, чтобы достичь функционала определённых интерфейсов/абстрактных классов, и не морочить себе голову, однако люди не могут осилить объём кода в SSDK и, соответственно, продолжают хардкодить эти вызови в стиле:

INetChannelInfo *pNetChannel = ( ( INetChannelInfo * ( __thiscall * )( void * ) )( engine + 0xD4 ) )( engine );

Ужасно, не так ли? Почему бы просто не скопировать заголовки SSDK, чтобы код выглядел не так ужасно, а даже наоборот:

INetChannelInfo *pNetChannel = engine->GetNetChannelInfo();

Лучше, не так ли?


В общем, это что-то, чего я никогда не понимал, помимо факта того, что люди, которые хардкодят просто не могут оперировать кодом SSDK, наверное, потому что он "слишком сложный". Используйте свои собственные мозги и критическое мышление, когда думаете о том, как организовывать свой собственный проект, так как он всё-таки ваш.


Terms Of Service


THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU ("THE CUSTOMER") AND NULL CORE LIMITED. YOU MUST READ IT BEFORE DOWNLOADING, PURCHASING OR USING NULL CORE SOFTWARE. BY DOWNLOADING AND/OR USING THE NULL CORE SOFTWARE YOU ACCEPT THIS LICENSE. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE YOU ARE NOT PERMITTED TO DOWNLOAD AND/OR USE THE NULL CORE SOFTWARE.


Common terms used in this document:

  • User - The Customer
  • NCL - Null Core Limited (service provider)
  • NCS - Null Core Software (the software product)

  • DISCLAIMER OF WARRANTIES. NCS AND ANY OTHER MATERIAL IS PROVIDED "AS IS". NCL AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES WITH RESPECT TO NCS, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, TITLE AND FITNESS FOR A PARTICULAR PURPOSE.


    LIMITATION OF LIABILITY. IN NO EVENT SHALL NCL OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GAME ITEMS OR ANY OTHER LOSS TO ANY ONLINE GAMING ACCOUNTS) ARISING OUT OF THE USE OF OR INABILITY TO USE NCS OR IT'S SERVICES, EVEN IF NCL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.


    1) PURCHASING

    1. The User is obliged to read our Refund Policy
    2. Once the User has purchased the software subscription they may use it until the expiration date if no violations has been made.
    3. NCL will not recover subscription time lost due to maintenance and hardware/software failure related to NCS backend and/or NCL itself.
    4. If the User has troubles using the automated payment form, they are required to make sure the issue is not related to the payment platform maintenance
    5. NCL accepts payments only through official Null Core Project website, any other unlisted payment methods are not accepted


    2) LIABILITY
    NCL is not responsible for any losses the User may sustain as a result of a Valve Anti-Cheat ban while using NCS or any other in-game bans, including, but not limited to: untrusts, gameserver bans, cooldowns, etc... It is always advisable to be careful and use the NCS on an alternative account. Failure to do so, regardless of how much they may have lost, is the responsibility of the User. NCL/NCS takes no responsibility for the User's online gaming accounts as a result of using this website or any software, or data contained within. NCL/NCS is intended to only be used on a locally hosted gameservers which are owned by the User. NCL/NCS takes no responsibility for the User's online actions and/or any special, incidental, indirect, or consequential damages whatsoever as a result of using this website or any software, data or other content contained within. The User takes full responsibility for their actions in regard to the usage of NCL/NCS, or any data contained within. NCL/NCS may track information related to NCL/NCS usage for statistics. However, the User's private information is never exposed. Read more about our Privacy Policy. NCL/NCS keep the right of terminating/suspending any account without refunding, if fraud and/or illegal activity is detected, including, but not limited to: hacking, scamming, cracking, tampering, spoofing and debugging activities.


    3) USAGE

      The User is permitted to:
    1. Download purchased executable to their own PC.
    2. Share their executable with their friends for demonstrative purposes only. The User takes full responsibility for every action of the person they share their executable with.
    3. Infinitely reset their HWID via website in the event they upgrade their computer.
    4. Store the NCS executable on their computer or removable media for their own personal use.
    5. Make promotional media related to Null Core.

    6. The User is NOT permitted to:
    7. Distribute their executable to any third party, except for the case described in paragraph 3B.
    8. Modify their executable in any way.
    9. Spoof the protocol/network traffic used by executables and/or injected game.
    10. Reverse engineer their executable and/or injected game in any way.
    11. Run their loader in sandboxes and/or virtual machines.
    12. Perform any malicious or illegal activities against NCL including, but not limited to: DoS/DDoS attacks, network traffic spoof, etc...
    13. Make media content designed for misinforming potential clients about our product quality while sustaining toxic/unprofessional behavior.
    14. Perform unauthorized chargebacks.
    15. Resell their account.
    16. Impersonate other members, moderators, or developers of NCL in any way.
    17. Fabricate any kind of data/evidence to substitute other Null Core users.


    4) SUPPORT
    Once the User purchases the software subscription for any of listed games the User gets free support and future updates till the expiration date of the NCS license. The User might want to contact NCL team to report a bug or get help. The User must make sure they follow these rules:

    1. The User must contact the team ONLY via specialized website feedback form.
    2. The User must describe their issue as detailed as possible, attaching links to screenshots and videos, if possible.

    However, NCL might reject the User's help/support request if the User:
    1. Doesn't provide enough information about the issue.
    2. Complains about something that can only happen in a single server.
    3. Complains about something that isn't actually a bug.
    4. Complains about something that the User can't understand/get used to.
    5. Uses external software that is not supported by NCS.
    6. Abuses any of the system faults/exploits.
    7. Asks questions unrelated to issues and/or bugs and/or doesn't consist of technical basis, but theoretical and/or indirect doubts.
    8. Fails to comply with professional ethics.
    9. Fails to fill the feedback form properly.
    10. Tries to spam using the feedback form.
    11. Addresses a non-issue request.

    The User's request and/or an ability to open tickets might be temporarily or permanently suspended in case they don't follow the rules. Any requests to contact NCL members via 'NCL Team' page and report issues directly will be blocked.


    6) EXTERNAL RESOURCES
    NCL has not reviewed all of the websites linked to its website and is not responsible for the contents of any such linked website. The inclusion of any link does not imply endorsement by NCL. Use of any such linked website is at the user's own risk.


    Violation of these rules will result in the User's account being temporarily suspended or completely terminated, discontinuation of any further services from NCL and possible legal action if any local or remote laws are violated in the process.


    This license might change in the future without warning.

    Privacy Policy


    THIS DOCUMENT DESCRIBES A LIST OF INFORMATION GIVEN BY YOU ("THE CUSTOMER") THAT ARE COLLECTED AND PROCESSED BY NULL CORE LIMITED.


    Common terms used in this document:

  • User - The Customer
  • NCL - Null Core Limited (service provider)
  • NCN - Null Core Network (online community)

  • 1) WHAT IS COLLECTED

    1. IP (Internet Protocol) address of the User during their interaction with NCL
    2. E-Mail address of the User specified by the User during the payment
    3. Session of User's payment in a form of JSON body provided by payment platform(s)
    4. SteamID of the User during their interaction with NCL
    5. In-Game statistics of the User during their in-game session (i.e. play time, kill count, death count, etc...)
    6. Config(s) of the User during synchronization with NCL Cloud Service


    2) WHY THIS IS COLLECTED

    1. To perform statistical analyzis
    2. To detect violations and fraudelent activity
    3. To provide support to the User
    4. To analyze User behavior
    5. To improve User experience
    6. To provide services to the User


    3) ONLINE INTERACTIONS
    NCL provides access to NCN to connect and interact with other Users. The User has an option to opt-out of NCN and go offline. If the User is online, other Users may see their Null Core Username, add them to friends, etc... If the User is offline, other Users will not see them as a Null Core User, except NCL, which is always aware of User's current online state. No other information is shared between Users within NCN other than their public Null Core Username and online status.


    This policy might change in the future without warning.

    Refund Policy


    THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU ("THE CUSTOMER") AND NULL CORE LIMITED. YOU MUST READ IT BEFORE DOWNLOADING, PURCHASING OR USING NULL CORE SOFTWARE. BY DOWNLOADING AND/OR USING THE NULL CORE SOFTWARE YOU ACCEPT THIS POLICY. IF YOU DO NOT AGREE TO THE REFUND POLICY YOU ARE NOT PERMITTED TO DOWNLOAD AND/OR USE THE NULL CORE SOFTWARE.


    Common terms used in this document:

  • User - The Customer
  • NCL - Null Core Limited (service provider)
  • NCS - Null Core Software (the software product)

  • 1) REFUNDS

    1. User is not permitted to refund, chargeback or dispute service(s) provided by NCL/NCS once the User has downloaded the NCS to their machine
    2. NCL provides subscription-based online service that is being executed by the NCS
    3. NCS falls under the category of Digital Goods & Services, which are not subject to refund
    4. By refunding the service provided by NCL, the User potentially endangers the business
    5. NCL is not in control of the copy(copies) of NCS that are stored on the User's machine(s)


    2) ELIGIBILITY

    1. The User is eligible for a refund in case they did not download NCS and no more than 7 days have passed since subscription activation
    2. The User is eligible for a refund in case they were unable to run NCS on their machine(s) and/or having technical issues confirmed by NCL that are related to NCS and does not let the User open the Launcher
    3. In any other case an attempt to refund will be considered a violation of this policy and actions will be taken such as permanent discontinuation of contract between the User and NCL


    This policy might change in the future without warning.

    Legal Notes/Third Parties


    This document describes a list of third-party open source projects used during development of Null Core Project.




    Razer Chroma SDK, Copyright (C) 2005-present, Razer Inc.
    - Full License: https://www.razer.com/legal/razer-api-terms-of-use




    LZ4 - Extremely Fast Compression, Copyright (C) 2011-present, Yann Collet.


    BSD 2-Clause License: http://www.opensource.org/licenses/bsd-license.php


    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:


    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.


    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.


    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


    You can contact the author at:
    - LZ4 homepage: http://www.lz4.org
    - LZ4 source repository: https://github.com/lz4/lz4