}
};
-class TargetKeys : public EntityKeyValues::Observer
+class TargetKeys : public Entity::Observer
{
TargetingEntities m_targetingEntities;
Callback m_targetsChanged;
return true;
}
}
+ if(string_equal(key, "killtarget"))
+ {
+ index = -1;
+ return true;
+ }
return false;
}
public:
m_targetsChanged();
}
- void insert(const char* key, EntityKeyValues::Value& value)
+ void insert(const char* key, EntityKeyValue& value)
{
std::size_t index;
if(readTargetKey(key, index))
targetsChanged();
}
}
- void erase(const char* key, EntityKeyValues::Value& value)
+ void erase(const char* key, EntityKeyValue& value)
{
std::size_t index;
if(readTargetKey(key, index))
class TargetableInstance :
public SelectableInstance,
public Targetable,
-public EntityKeyValues::Observer
+public Entity::Observer
{
mutable Vertex3f m_position;
EntityKeyValues& m_entity;
m_targeting.targetsChanged();
}
- void insert(const char* key, EntityKeyValues::Value& value)
+ void insert(const char* key, EntityKeyValue& value)
{
if(string_equal(key, g_targetable_nameKey))
{
value.attach(TargetedEntity::TargetnameChangedCaller(m_targeted));
}
}
- void erase(const char* key, EntityKeyValues::Value& value)
+ void erase(const char* key, EntityKeyValue& value)
{
if(string_equal(key, g_targetable_nameKey))
{
return childBounds.origin;
}
#endif
- return localToWorld().t();
+ return vector4_to_vector3(localToWorld().t());
}
void render(Renderer& renderer, const VolumeTest& volume) const