aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin Berger <jdavidberger@gmail.com>2018-03-23 16:19:22 +0000
committerJustin Berger <jdavidberger@gmail.com>2018-03-24 06:19:21 +0000
commit378b6e58d4cb0e9873062cfabefa271e43794bd6 (patch)
tree8d253666b76eb0fd9a528a1a97953cc37fb65108 /src
parent5e8633ecc6f1309b5be2dd86b61e8a7b0a9f5ecb (diff)
downloadlibsurvive-378b6e58d4cb0e9873062cfabefa271e43794bd6.tar.gz
libsurvive-378b6e58d4cb0e9873062cfabefa271e43794bd6.tar.bz2
Broadcast lighthouse position at startup
Diffstat (limited to 'src')
-rw-r--r--src/survive.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/survive.c b/src/survive.c
index 3f3b844..1786d45 100644
--- a/src/survive.c
+++ b/src/survive.c
@@ -294,6 +294,13 @@ int survive_startup(SurviveContext *ctx) {
}
}
+ // If lighthouse positions are known, broadcast them
+ for (int i = 0; i < ctx->activeLighthouses; i++) {
+ if(ctx->bsd[i].PositionSet) {
+ ctx->lighthouseposeproc(ctx, i, &ctx->bsd[i].Pose, 0);
+ }
+ }
+
return 0;
}