Hi, it seems that the class defined as a WeaponProjectile is totally useless, so I have removed it in r2864.
Regards, Matt Kurosu a écrit : > Hello, > > this class is both defined as a derived class of WeaponProjectile in > weapon/polecat.h and a derived class of Particle in > particles/polecat_fart.h, the 2 derivations being unknown to each other. > > The attached patch fixes the problem from a code perspective, but I > highly suspect it changes the game behavior, resulting in another kind > of problems. > > Please evaluate what is the *correct* course of action. > > By the way, this was found using Visual C++ compiler during linking; > I've never noticed it with gcc. > > Best regards, > Kurosu > ------------------------------------------------------------------------ > > Index: particles/polecat_fart.cpp > =================================================================== > --- particles/polecat_fart.cpp (revision 2860) > +++ particles/polecat_fart.cpp (working copy) > @@ -25,6 +25,16 @@ > #include "game/time.h" > #include "graphic/sprite.h" > > +#if 0 > +PolecatFart::PolecatFart(ExplosiveWeaponConfig& cfg, > + WeaponLauncher * p_launcher) : > + WeaponProjectile("polecat_fart", cfg, p_launcher) > +{ > + explode_with_collision = false; > +} > + > +#endif > + > PolecatFart::PolecatFart() : > Particle("polecat_fart_particle") > { > Index: particles/polecat_fart.h > =================================================================== > --- particles/polecat_fart.h (revision 2860) > +++ particles/polecat_fart.h (working copy) > @@ -23,6 +23,15 @@ > #define POLECAT_FART_H > #include "particle.h" > > +#if 0 > +class PolecatFart : public WeaponProjectile > +{ > + public: > + PolecatFart(ExplosiveWeaponConfig& cfg, > + WeaponLauncher * p_launcher); > +}; > +#endif > + > class PolecatFart : public Particle > { > private: > Index: weapon/polecat.h > =================================================================== > --- weapon/polecat.h (revision 2860) > +++ weapon/polecat.h (working copy) > @@ -27,13 +27,6 @@ > #include "gui/progress_bar.h > #include "include/base.h" > > -class PolecatFart : public WeaponProjectile > -{ > - public: > - PolecatFart(ExplosiveWeaponConfig& cfg, > - WeaponLauncher * p_launcher); > -}; > - > class Polecat : public WeaponProjectile > { > private: > Index: weapon/polecat.cpp > =================================================================== > --- weapon/polecat.cpp (revision 2860) > +++ weapon/polecat.cpp (working copy) > @@ -37,13 +37,6 @@ > > const uint TIME_BETWEEN_FART = 500; > > -PolecatFart::PolecatFart(ExplosiveWeaponConfig& cfg, > - WeaponLauncher * p_launcher) : > - WeaponProjectile("polecat_fart", cfg, p_launcher) > -{ > - explode_with_collision = false; > -} > - > Polecat::Polecat(ExplosiveWeaponConfig& cfg, > WeaponLauncher * p_launcher) : > WeaponProjectile("polecat", cfg, p_launcher) > > ------------------------------------------------------------------------ > > _______________________________________________ > Wormux-dev mailing list > Wormux-dev@gna.org > https://mail.gna.org/listinfo/wormux-dev > _______________________________________________ Wormux-dev mailing list Wormux-dev@gna.org https://mail.gna.org/listinfo/wormux-dev