Skip to content

Commit 9c28e76

Browse files
committed
1 parent 2bcd664 commit 9c28e76

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/game/server/baseentity.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2310,7 +2310,12 @@ BEGIN_ENT_SCRIPTDESC_ROOT( CBaseEntity, "Root class of all server-side entities"
23102310

23112311
DEFINE_SCRIPTFUNC_NAMED( ScriptInputKill, "Kill", "" )
23122312
DEFINE_SCRIPTFUNC( GetClassname, "" )
2313-
DEFINE_SCRIPTFUNC_NAMED( GetEntityNameAsCStr, "GetName", "" )
2313+
#ifdef BDSBASE
2314+
DEFINE_SCRIPTFUNC_NAMED(GetEntityNameAsCStr, "GetName", "!!!LEGACY FOR COMPAT!!! Use GetTargetname")
2315+
DEFINE_SCRIPTFUNC_NAMED(GetEntityNameAsCStr, "GetTargetname", "")
2316+
#else
2317+
DEFINE_SCRIPTFUNC_NAMED(GetEntityNameAsCStr, "GetName", "")
2318+
#endif
23142319
DEFINE_SCRIPTFUNC( GetPreTemplateName, "Get the entity name stripped of template unique decoration" )
23152320
DEFINE_SCRIPTFUNC_NAMED( ScriptGetEHandle, "GetEntityHandle", "Get the entity as an EHANDLE" )
23162321

0 commit comments

Comments
 (0)