Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 31 lines (26 sloc) 0.951 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
// Copyright © 2008-2012 Pioneer Developers. See AUTHORS.txt for details
// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt

#ifndef _CARGOBODY_H
#define _CARGOBODY_H

#include "libs.h"
#include "DynamicBody.h"
#include "EquipType.h"

namespace Graphics { class Renderer; }

class CargoBody: public DynamicBody {
public:
OBJDEF(CargoBody, DynamicBody, CARGOBODY);
CargoBody(Equip::Type t);
CargoBody() {}
Equip::Type GetCargoType() const { return m_type; }
virtual void Render(Graphics::Renderer *r, const Camera *camera, const vector3d &viewCoords, const matrix4x4d &viewTransform);
virtual bool OnCollision(Object *o, Uint32 flags, double relVel);
virtual bool OnDamage(Object *attacker, float kgDamage);
protected:
virtual void Save(Serializer::Writer &wr, Space *space);
virtual void Load(Serializer::Reader &rd, Space *space);
private:
void Init();
Equip::Type m_type;
float m_hitpoints;
};

#endif /* _CARGOBODY_H */
Something went wrong with that request. Please try again.