test
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
if (player == mp.players.local) {
|
||||
blockInput = true;
|
||||
}
|
||||
} else if (!loop) {
|
||||
} else if (!loop && player.isPlayingAnim(animDict, animName, 3)) {
|
||||
if (player == mp.players.local) {
|
||||
blockInput = false;
|
||||
mp.events.callRemote("CLIENT:ClearAnimationData", player);
|
||||
@@ -127,6 +127,14 @@
|
||||
mp.events.callRemote("CLIENT:SET_InFrontOfPos", result);
|
||||
});
|
||||
|
||||
mp.events.add("SERVER:GetInFrontOfPlayer", (entity: PlayerMp) => {
|
||||
let player = mp.players.local;
|
||||
let result = xyInFrontOfPos(entity.position, entity.heading, 0.5);
|
||||
result.z = player.position.z;
|
||||
mp.players.local.heading = entity.heading;
|
||||
mp.players.local.position = result;
|
||||
});
|
||||
|
||||
function xyInFrontOfPos(pos, heading, dist): Vector3Mp {
|
||||
heading *= Math.PI / 180
|
||||
pos.x += (dist * Math.sin(-heading))
|
||||
|
||||
Reference in New Issue
Block a user