Skip to content

Commit 073e37f

Browse files
committed
Resolve vscript naming conflict between CBaseCombatWeapon and CBaseEntity GetName by adding GetTargetname for CBaseEntity
This remains fully backwards compatible.
1 parent 0565403 commit 073e37f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/game/server/baseentity.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -2259,7 +2259,8 @@ BEGIN_ENT_SCRIPTDESC_ROOT( CBaseEntity, "Root class of all server-side entities"
22592259

22602260
DEFINE_SCRIPTFUNC_NAMED( ScriptInputKill, "Kill", "" )
22612261
DEFINE_SCRIPTFUNC( GetClassname, "" )
2262-
DEFINE_SCRIPTFUNC_NAMED( GetEntityNameAsCStr, "GetName", "" )
2262+
DEFINE_SCRIPTFUNC_NAMED( GetEntityNameAsCStr, "GetName", "!!!LEGACY FOR COMPAT!!! Use GetTargetname" )
2263+
DEFINE_SCRIPTFUNC_NAMED( GetEntityNameAsCStr, "GetTargetname", "" )
22632264
DEFINE_SCRIPTFUNC( GetPreTemplateName, "Get the entity name stripped of template unique decoration" )
22642265
DEFINE_SCRIPTFUNC_NAMED( ScriptGetEHandle, "GetEntityHandle", "Get the entity as an EHANDLE" )
22652266

0 commit comments

Comments
 (0)