#ifdef SSQC
#include "mapentity.h"
#include "../../server/serialize.h"

#define FUNC_CRUSHABLE_SPAWNFIELDS(v) \
    SPAWNFIELD_PARSESTRING(model, v) \
    SPAWNFIELD_PARSESTRING(mdl, v) \
    SPAWNFIELD_PARSESTRING(target, v) \
    SPAWNFIELD_PARSESTRING(targetname, v) \
    SPAWNFIELD_PARSESTRING(nextstage, v) \
    SPAWNFIELD_PARSESTRING(noise, v) \
    SPAWNFIELD_PARSESTRING(noise2, v) \
    SPAWNFIELD_PARSEFLOAT(attenuation, v) \
    SPAWNFIELD_PARSEINT(spawnflags, v) \
    SPAWNFIELD_PARSEINT(health, v)

.string model2;
.string model3;
.string mdl2;
.string mdl3;
.string noise2;
.string propname;
.string nextstage;

class func_crushable : map_entity_c
{
    func_crushable();
    virtual void GuardedConstructor();

    nonvirtual void Read_func_crushable(sizebuf_t *buf);
    nonvirtual void Serialize_func_crushable(sizebuf_t *buf);
    nonvirtual float SendEntity_Crushable(entity to, float sendflags);
    nonvirtual void func_crushable_reset();
    nonvirtual void func_crushable_evaluate();
    nonvirtual void func_crushable_land(entity ent, float *delta);

    virtual void ParseSpawnField(string key, string value);

    //string model; <- inherited
    //string model2; <- inherited
    //string model3; <- inherited

    //string mdl; <- inherited
    //string mdl2; <- inherited
    //string mdl3; <- inherited

    //string noise; <- inherited
    //string noise2; <- inherited

    //string propname; <- inherited
    //string nextstage; <- inherited
};

class func_crushable2 : func_crushable
{
    func_crushable2();
    virtual void GuardedConstructor();
};
#endif
