about summary refs log tree commit diff
path: root/src/game/server/entities/projectile.hpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-08-14 18:25:44 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-08-14 18:25:44 +0000
commita420eb543f8206730aebb80e60a625f7204694e4 (patch)
tree235971d38c917c1b97c512743db64c2fd23ffadc /src/game/server/entities/projectile.hpp
parent817f431377c7f1545621ff597c018b133651e991 (diff)
downloadzcatch-a420eb543f8206730aebb80e60a625f7204694e4.tar.gz
zcatch-a420eb543f8206730aebb80e60a625f7204694e4.zip
moved alot of stuff to their own cpp/hpp files
Diffstat (limited to 'src/game/server/entities/projectile.hpp')
-rw-r--r--src/game/server/entities/projectile.hpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/game/server/entities/projectile.hpp b/src/game/server/entities/projectile.hpp
new file mode 100644
index 00000000..c1370af1
--- /dev/null
+++ b/src/game/server/entities/projectile.hpp
@@ -0,0 +1,38 @@
+/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
+
+#ifndef GAME_SERVER_ENTITY_PROJECTILE_H
+#define GAME_SERVER_ENTITY_PROJECTILE_H
+
+class PROJECTILE : public ENTITY
+{
+public:
+	enum
+	{
+		PROJECTILE_FLAGS_EXPLODE = 1 << 0,
+	};
+	
+	vec2 direction;
+	ENTITY *powner; // this is nasty, could be removed when client quits
+	int lifespan;
+	int owner;
+	int type;
+	int flags;
+	int damage;
+	int sound_impact;
+	int weapon;
+	int bounce;
+	float force;
+	int start_tick;
+	
+	PROJECTILE(int type, int owner, vec2 pos, vec2 vel, int span, ENTITY* powner,
+		int damage, int flags, float force, int sound_impact, int weapon);
+
+	vec2 get_pos(float time);
+	void fill_info(NETOBJ_PROJECTILE *proj);
+
+	virtual void reset();
+	virtual void tick();
+	virtual void snap(int snapping_client);
+};
+
+#endif