Reconcile the concept of Edict & Networkable across the codebase (#1903)

* Reconcile the concept of Edict & Networkable across the codebase

* There's no need to check this, it's done elsewhere. Also could be null (segfault)

* This was never needed

* Pseudo review changes

Re-added removed null checks, and added new ones.

Changed the error messages in Get/SetProp natives to better reflect reality.

* Don't change the behaviour of GetEntityNetClass

* Overload IGameHelpers::FindServerClass

* Make error messages more accurate

* Fix a dev comment

* Rename FindServerClass

---------

Co-authored-by: Kenzzer <[email protected]>
This commit is contained in:
Benoist
2024-06-01 14:07:55 +00:00
committed by GitHub
co-authored by Kenzzer
parent 9f3584a056
commit 7df2f8e045
13 changed files with 152 additions and 118 deletions
+8 -1
View File
@@ -40,7 +40,7 @@
*/
#define SMINTERFACE_GAMEHELPERS_NAME "IGameHelpers"
#define SMINTERFACE_GAMEHELPERS_VERSION 11
#define SMINTERFACE_GAMEHELPERS_VERSION 12
class CBaseEntity;
class CBaseHandle;
@@ -351,6 +351,13 @@ namespace SourceMod
* @return 64-bit server Steam id.
*/
virtual uint64_t GetServerSteamId64() const =0;
/**
* @brief Finds a given entity's server class.
*
* @return ServerClass pointer on success, nullptr on failure.
*/
virtual ServerClass *FindEntityServerClass(CBaseEntity *pEntity) = 0;
};
}