Humble beginnings

This commit is contained in:
ineedbots 2021-06-11 21:13:23 -06:00
commit 22da80a8b4
2 changed files with 44 additions and 0 deletions

15
.gitignore vendored Normal file
View File

@ -0,0 +1,15 @@
# Ignore everything in repository root
/*
# Files to not ignore
!/.gitignore
!/z_client.bat
# Folder to not ignore
!/mods
/mods/*
!/mods/bots
*.dat
*.log
players/

View File

@ -0,0 +1,29 @@
init()
{
level.clientid = 0;
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;;)
{
level waittill("connecting", player);
player.clientid = level.clientid;
level.clientid++; // Is this safe? What if a server runs for a long time and many people join/leave
player thread ok();
}
}
ok()
{
self endon("disconnect");
for (;;)
{
wait 0.05;
self sayall("hi");
}
}