From bebb67e03d378a084367cc05c3d9bbb76f1d8e73 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 16 Dec 2014 20:37:15 +0000 Subject: Project::OSiRiON can now be built with Clang, use -Wno-overloaded-virtual. --- src/game/base/ship.h | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to 'src/game/base/ship.h') diff --git a/src/game/base/ship.h b/src/game/base/ship.h index d627295..4b4ae61 100644 --- a/src/game/base/ship.h +++ b/src/game/base/ship.h @@ -99,18 +99,30 @@ public: return ( (ship_autopilot_flags & flag) == flag); } - /// maximum amount of armor + /// maximal armor strength inline const float maxarmor() const { return ship_maxarmor; } - /// current amount of armor + /// current armor strength inline const float armor() const { return ship_armor; } + /// maximal armor strength + inline const float maxshield() const + { + return ship_maxshield; + } + + /// current armor strength + inline const float shield() const + { + return ship_shield; + } + virtual void print() const; /* -- mutators --------------------------------------------- */ @@ -160,19 +172,31 @@ public: ship_roll_force = roll; } - /// set maximal armor amount (100% health) + /// set maximal armor strength (100% health) inline void set_maxarmor(const float maxarmor) { ship_maxarmor = maxarmor; } - /// set current armor amount (current health) + /// set current armor strength (current health) inline void set_armor(const float armor) { ship_armor = armor; } - /// Initiate jump, departing from a jump point + /// set maximal shield strength + inline void set_maxshield(const float maxshield) + { + ship_maxshield = maxshield; + } + + /// set current shield strength + inline void set_shield(const float shield) + { + ship_shield = shield; + } + + /// initiate jump sequence, departing from a jump point void initiate_jump(JumpPoint *depart); /// reset physics state and ship controls -- cgit v1.2.3