Commit 77ed72a 1 parent 869504a commit 77ed72a Copy full SHA for 77ed72a
File tree 2 files changed +14
-2
lines changed
JustAnotherVoiceChat.Server/src
JustAnotherVoiceChat.Server.GTMP.Resource/Client
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 26
26
*/
27
27
28
28
let voiceHandler = null ;
29
- let rotationThreshold = 0.1 ;
29
+ let rotationThreshold = 0.001 ;
30
30
31
31
API . onResourceStart . connect ( ( ) => { voiceHandler = new GtmpVoiceHandler ( ) ; } ) ;
32
32
@@ -87,7 +87,7 @@ class GtmpVoiceHandler {
87
87
}
88
88
89
89
sendRotation ( ) {
90
- const rotation = ( ( API . getGamePlayCamRot ( ) . Z * - 1 ) * Math . PI ) / 180 ;
90
+ const rotation = ( ( API . getGameplayCamRot ( ) . Z * - 1 ) * Math . PI ) / 180 ;
91
91
92
92
if ( Math . abs ( this . lastRotation - rotation ) < rotationThreshold ) {
93
93
return ;
Original file line number Diff line number Diff line change @@ -272,6 +272,10 @@ void Client::sendPositions() {
272
272
}
273
273
274
274
void Client::setPosition (linalg::aliases::float3 position) {
275
+ if (_position == position) {
276
+ return ;
277
+ }
278
+
275
279
_position = position;
276
280
_positionChanged = true ;
277
281
}
@@ -281,6 +285,10 @@ linalg::aliases::float3 Client::position() const {
281
285
}
282
286
283
287
void Client::setRotation (float rotation) {
288
+ if (_rotation == rotation) {
289
+ return ;
290
+ }
291
+
284
292
_rotation = rotation;
285
293
_positionChanged = true ;
286
294
}
@@ -298,6 +306,10 @@ bool Client::positionChanged() const {
298
306
}
299
307
300
308
void Client::setVoiceRange (float range) {
309
+ if (range == _voiceRange) {
310
+ return ;
311
+ }
312
+
301
313
_voiceRange = range;
302
314
_positionChanged = true ;
303
315
}
You can’t perform that action at this time.
0 commit comments