Parallel entity hierarchy
- Lenguaje dominante
- C++
- Estrellas
- 1
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Need to get rid of the insanity of composition of the Renderable on the client side and instead migrate fully to inheritance and polymorphism.
**The problem**
Mirroring the hierarchy using a CEntity to contain the logic of a renderable object and that of a plain Entity then inheriting from it using a CPuppet and/or CUnit will result in a duplicate ancestor instantiation and cause ambiguity, since CPuppet has to inherit from _both_ CEntity (which inherits from Entity) and Puppet (which also inherits from Entity).
**The proper fix**
Use virtual inheritance to ensure that only one base Entity instance is created. However, tolua++ does not have support for virtual inheritance and I couldn't do it manually, so this isn't viable.
**The viable fix**
Using abstract _base_ interfaces for all entity types: Entity, Puppet, Unit, Spell, and Caster from which both the server and the client have to subclass and define. The problem here is that we can no longer define base logic; so shit has to be duplicated to some extent and the reusability is lost. /wave DRY /wrist
**The Responsible Thing To Do**
Add virtual inheritance support to tolua++ or do it manually.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.