Skip to content

Commit

Permalink
#5660: The flexibility of being able to define the name of the "name"…
Browse files Browse the repository at this point in the history
… entity key in the .game file is not worth the performance cost.
  • Loading branch information
codereader committed Jul 1, 2021
1 parent ddea62a commit 9df337b
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 10 deletions.
1 change: 0 additions & 1 deletion install/games/darkmod.game
Expand Up @@ -153,7 +153,6 @@
<curveCatmullRomKey value="curve_CatmullRomSpline" />
<bindKey value="bind" />
<playerHeight value="64" />
<nameKey value="name" />
<speakerMinRadius value="24" />
<speakerMaxRadius value="32" />
<guiSmallFontLimit value="0.15" />
Expand Down
1 change: 0 additions & 1 deletion install/games/doom3-demo.game
Expand Up @@ -137,7 +137,6 @@
<curveCatmullRomKey value="curve_CatmullRomSpline" />
<bindKey value="bind" />
<playerHeight value="64" />
<nameKey value="name" />
<speakerMinRadius value="24" />
<speakerMaxRadius value="32" />
<guiSmallFontLimit value="0.15" />
Expand Down
1 change: 0 additions & 1 deletion install/games/doom3.game
Expand Up @@ -145,7 +145,6 @@
<curveCatmullRomKey value="curve_CatmullRomSpline" />
<bindKey value="bind" />
<playerHeight value="64" />
<nameKey value="name" />
<speakerMinRadius value="24" />
<speakerMaxRadius value="32" />
<guiSmallFontLimit value="0.15" />
Expand Down
1 change: 0 additions & 1 deletion install/games/prey.game
Expand Up @@ -145,7 +145,6 @@
<curveCatmullRomKey value="curve_CatmullRomSpline" />
<bindKey value="bind" />
<playerHeight value="64" />
<nameKey value="name" />
<speakerMinRadius value="24" />
<speakerMaxRadius value="32" />
<guiSmallFontLimit value="0.15" />
Expand Down
1 change: 0 additions & 1 deletion install/games/quake3.game
Expand Up @@ -142,7 +142,6 @@
<curveCatmullRomKey value="curve_CatmullRomSpline" />
<bindKey value="bind" />
<playerHeight value="64" />
<nameKey value="name" />
<speakerMinRadius value="24" />
<speakerMaxRadius value="32" />
<guiSmallFontLimit value="0.15" />
Expand Down
1 change: 0 additions & 1 deletion install/games/quake4.game
Expand Up @@ -145,7 +145,6 @@
<curveCatmullRomKey value="curve_CatmullRomSpline" />
<bindKey value="bind" />
<playerHeight value="64" />
<nameKey value="name" />
<speakerMinRadius value="24" />
<speakerMaxRadius value="32" />
<guiSmallFontLimit value="0.15" />
Expand Down
1 change: 0 additions & 1 deletion install/games/xreal.game
Expand Up @@ -153,7 +153,6 @@
<curveCatmullRomKey value="curve_CatmullRomSpline" />
<bindKey value="bind" />
<playerHeight value="64" />
<nameKey value="name" />
<speakerMinRadius value="24" />
<speakerMaxRadius value="32" />
<guiSmallFontLimit value="0.15" />
Expand Down
8 changes: 5 additions & 3 deletions radiantcore/entity/NamespaceManager.cpp
Expand Up @@ -8,14 +8,16 @@
namespace entity
{

// The registry key pointing towards the "name" spawnarg
const char* const GKEY_NAME_KEY("/defaults/nameKey");
namespace
{
const char* const NAME_KEY("name");
}

NamespaceManager::NamespaceManager(SpawnArgs& entity) :
_namespace(nullptr),
_entity(entity),
_updateMutex(false),
_nameKey(game::current::getValue<std::string>(GKEY_NAME_KEY))
_nameKey(NAME_KEY)
{
// Attach <self> to the observed entity
_entity.attachObserver(this);
Expand Down

0 comments on commit 9df337b

Please sign in to comment.