more testing

This commit is contained in:
caesarakalaeii 2023-08-13 23:39:05 +02:00
parent 9f9fe68630
commit 19f042c654
1 changed files with 10 additions and 12 deletions

View File

@ -39,22 +39,19 @@ public class MyPlayer : Player<MyPlayer>
Weapons.SSG69
};
public int Level;
public int Level = 0;
public async void UpdateWeapon()
public void UpdateWeapon()
{
await Task.Run(() =>
if (Level < gunGame.Count)
{
if (Level < gunGame.Count)
var w = new WeaponItem
{
var w = new WeaponItem
{
ToolName = gunGame[Level].Name,
MainSight = Attachments.RedDot
};
SetPrimaryWeapon(w, 10, true);
}
});
ToolName = gunGame[Level].Name,
MainSight = Attachments.RedDot
};
SetPrimaryWeapon(w, 10, true);
}
}
public int GetGameLenght()
@ -118,6 +115,7 @@ internal class MyGameServer : GameServer<MyPlayer>
public override Task OnPlayerConnected(MyPlayer player)
{
Console.WriteLine($"{player.Name} connected");
return base.OnPlayerConnected(player);
}