aboutsummaryrefslogtreecommitdiff
path: root/dat.h
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-02-22 21:40:54 +0000
committerrodri <rgl@antares-labs.eu>2023-02-22 21:40:54 +0000
commitd40305baf8a0722cf6128520a5b792fc173c5a93 (patch)
treed55310d984f0b94ee1e22edcbc6ba1eb1ce52c01 /dat.h
parentecc7d34e9229524a8d4340f0e127f1421029141c (diff)
downloadmusw-d40305baf8a0722cf6128520a5b792fc173c5a93.tar.gz
musw-d40305baf8a0722cf6128520a5b792fc173c5a93.tar.bz2
musw-d40305baf8a0722cf6128520a5b792fc173c5a93.zip
take player input into account when stepping the simulations.
Diffstat (limited to 'dat.h')
-rw-r--r--dat.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/dat.h b/dat.h
index 5820845..5e984bb 100644
--- a/dat.h
+++ b/dat.h
@@ -51,6 +51,10 @@ enum {
ConnTimeout = 10000 /* in ms */
};
+enum {
+ THRUST = 100
+};
+
typedef struct VModel VModel;
typedef struct Sprite Sprite;
typedef struct Particle Particle;
@@ -117,6 +121,11 @@ struct Ship
Bullet rounds[10];
VModel *mdl;
Matrix mdlxform;
+
+ void (*forward)(Ship*, double);
+ void (*rotate)(Ship*, int, double);
+ void (*hyperjump)(Ship*);
+ void (*fire)(Ship*);
};
struct Star
@@ -167,6 +176,7 @@ struct NetConn
u32int lastack;
ulong lastrecvts; /* last time a packet was received (in ms) */
ulong lastnudgets; /* last time a nudge was sent (in ms) */
+ Player *player;
};
struct Player