Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
werasik2aa authored Mar 14, 2022
1 parent 3ecce04 commit 167e209
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions VehicleController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ public static void CHANGESIT(int number, int i, int from)
{
SkyCoop.MyMod.players[from].transform.root.parent = sit;
SkyCoop.MyMod.playersData[from].m_Position = sit.position;
SkyCoop.MyMod.players[from].transform.position = sit.position;
}
}
private static void CameraFollow(GameObject car)
Expand Down
14 changes: 7 additions & 7 deletions main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ public override void OnUpdate()
VehicleController.accel = 1;

if (levelname == "Empty" || levelname == "MainMenu" || levelname == "Boot" || levelname == "" || !GameManager.GetVpFPSPlayer()) return;
GameManager.m_AsyncSceneLoadsInProgress.TryGetValue(levelname, out bool f);
if (!isSit && f)
{
GameManager.GetVpFPSPlayer().transform.SetParent(VehicleController.myparent);
}
VehicleController.turn = Input.GetAxis("Horizontal");
VehicleController.move = Input.GetAxis("Vertical");
MyId = API.m_MyClientID;
Expand Down Expand Up @@ -195,15 +200,10 @@ public override void OnLateUpdate()
{
if (levelname == "Empty" || levelname == "MainMenu" || levelname == "Boot" || levelname == "" || !GameManager.GetVpFPSPlayer()) return;

if (!isSit)
{
GameManager.GetVpFPSPlayer().transform.SetParent(VehicleController.myparent);
}

if (vehicles.ContainsKey(MyId) && !isDrive(MyId))
sendMycarPos(2);
if (isSit)
{

if (isSit) {
SkyCoop.MyMod.MyAnimState = "Sit";
}
MenuControll.Update(0); // COUNT CARS
Expand Down

0 comments on commit 167e209

Please sign in to comment.