Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-11-18 17:59:52 +0000
committerStijn Buys <ingar@osirion.org>2012-11-18 17:59:52 +0000
commitdf20ff5ad47b1d8a04385956589a7564522258a6 (patch)
tree55112286358004c7f5099c9a78f74cc5113063f3 /src/game/base/spacemine.h
parent2cd1f55f26f2236641fa2f3b36d9d23b99ca072f (diff)
Support for ownerid() on projectiles and spacemines,
show assassin name in death messages.
Diffstat (limited to 'src/game/base/spacemine.h')
-rw-r--r--src/game/base/spacemine.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/game/base/spacemine.h b/src/game/base/spacemine.h
index 4f95849..3c314c2 100644
--- a/src/game/base/spacemine.h
+++ b/src/game/base/spacemine.h
@@ -41,6 +41,14 @@ public:
return spacemine_damage;
}
+ /**
+ * @brief id of the player who dropped the spacemine
+ * */
+ inline const int ownerid() const
+ {
+ return spacemine_ownerid;
+ }
+
/* --- mutators -------------------------------------------- */
/**
@@ -50,11 +58,21 @@ public:
{
spacemine_damage = damage;
}
+
+ /**
+ * @brief set the id of the player who dropped the spacemine
+ * */
+ inline void set_ownerid(const int ownerid)
+ {
+ spacemine_ownerid = ownerid;
+ }
private:
unsigned long spacemine_detonated_timestamp;
float spacemine_damage;
+ int spacemine_ownerid;
+
static const Template *spacemine_template;
};