#ifdef SSQC

#include "mapentity.h"

#define PLAT_LOW_TRIGGER    1
#define STATE_TOP           0
#define STATE_BOTTOM        1
#define STATE_UP            2
#define STATE_DOWN          3

#define FUNC_PLAT_SPAWNFIELDS(v) \
    SPAWNFIELD_PARSEFLOAT(height, v) \
    SPAWNFIELD_PARSEFLOAT(lip, v) \
    SPAWNFIELD_PARSEFLOAT(speed, v) \
    SPAWNFIELD_PARSEFLOAT(accel, v) \
    SPAWNFIELD_PARSEFLOAT(decel, v) \
    SPAWNFIELD_PARSEFLOAT(dmg, v)

class func_plat : map_entity_c
{
    func_plat();

    virtual void GuardedConstructor();

    // type is a void returning function
    // Functrs
    var virtual void() use;

    nonvirtual void Plat_CreateTrigger();
    nonvirtual void Plat_Use();
    nonvirtual void Plat_Physics();
    nonvirtual float Plat_PushEnt(entity ent, vector start, vector go);
    nonvirtual void Plat_GoDown();

    // Parses fields set in editor
    virtual void ParseSpawnField(string key, string value);

    vector	pos1;
    vector	pos2;
    vector	spos;
    vector  epos;
    float	accel;
    float	decel;
    float	decel_distance;
    float	accel_distance;
    float	speed;
    float	dmg;
    float	lip;
    float	height;
    float	finish_time;
    float	travel_time;
};
#endif