Cheeki breeki

This commit is contained in:
2016-03-13 01:25:13 +01:00
parent 95f9065037
commit 45bfc374de
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -25,9 +25,7 @@ struct ComponentWrapper
ComponentInfo::EnumType Enum(const char* fieldName, const char* enumKey); ComponentInfo::EnumType Enum(const char* fieldName, const char* enumKey);
bool Dirty(DirtySetType type, const std::string& fieldName); bool Dirty(DirtySetType type, const std::string& fieldName);
void SetDirty(DirtySetType type, const std::string& fieldName, bool dirty = true); void SetDirty(DirtySetType type, const std::string& fieldName, bool dirty = true);
void SetAllDirty(const std::string& fieldName, bool dirty = true); void SetAllDirty(const std::string& fieldName, bool dirty = true);
template <typename T> template <typename T>
@@ -117,7 +115,8 @@ struct ComponentWrapper
typename T, typename T,
typename = typename std::enable_if<!std::is_base_of<::FIELDLOL, T>::value>::type typename = typename std::enable_if<!std::is_base_of<::FIELDLOL, T>::value>::type
> >
operator T&() = delete; //operator T&() = delete;
operator T&() { static_assert(constexpr(false), "https://github.com/teamfisk/TacticalZ/pull/212"); }
// Value assignment // Value assignment
template <typename T> template <typename T>
+1 -1
View File
@@ -33,6 +33,6 @@ public:
ComponentWrapper& cTransform = entity["Transform"]; ComponentWrapper& cTransform = entity["Transform"];
//FSubscriptProxy subOri(&cTransform, "Orientation"); //FSubscriptProxy subOri(&cTransform, "Orientation");
//Field<glm::vec3> orientation = subOri; //Field<glm::vec3> orientation = subOri;
(Field<glm::vec3>)cTransform["Orientation"] += (float)(const double&)cRaptorCopter["Speed"] * (float)dt * (glm::vec3)cRaptorCopter["Axis"]; (glm::vec3&)cTransform["Orientation"] += (float)(const double&)cRaptorCopter["Speed"] * (float)dt * (glm::vec3)cRaptorCopter["Axis"];
} }
}; };