Move files

This commit is contained in:
ineedbots 2021-06-02 22:06:18 -06:00
parent 955daae077
commit 7de40cc662
15 changed files with 7862 additions and 7860 deletions

14
.gitignore vendored
View File

@ -5,13 +5,15 @@
!/.gitignore !/.gitignore
# Folder to not ignore # Folder to not ignore
!/scripts !/raw
/raw/*
!/raw/scripts
!/maps !/raw/maps
/maps/* /raw/maps/*
!/maps/mp/ !/raw/maps/mp/
/maps/mp/* /raw/maps/mp/*
!/maps/mp/bots/ !/raw/maps/mp/bots/
*.zip *.zip

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
init() init()
{ {
level thread maps\mp\bots\_bot::init(); level thread maps\mp\bots\_bot::init();
} }

View File

@ -1,4 +1,4 @@
init() init()
{ {
level thread maps\mp\bots\_menu::init(); level thread maps\mp\bots\_menu::init();
} }

View File

@ -1,73 +1,73 @@
#include maps\mp\_utility; #include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util; #include maps\mp\gametypes\_hud_util;
#include common_scripts\utility; #include common_scripts\utility;
#include maps\mp\bots\_bot_utility; #include maps\mp\bots\_bot_utility;
init() init()
{ {
setDvarIfUninitialized( "bots_test", true ); setDvarIfUninitialized( "bots_test", true );
if (!getDvarInt("bots_test")) if (!getDvarInt("bots_test"))
return; return;
level thread onConnected(); level thread onConnected();
level thread onframe(); level thread onframe();
} }
onframe() onframe()
{ {
for(;;) for(;;)
{ {
wait 0.05; wait 0.05;
if(getDvarInt("developer")) print("time:" + getTime() + " child0:" + getVarUsage(0) + " child1:" + getVarUsage(1) + " notifycount:" + getVarUsage(2)); if(getDvarInt("developer")) print("time:" + getTime() + " child0:" + getVarUsage(0) + " child1:" + getVarUsage(1) + " notifycount:" + getVarUsage(2));
} }
} }
onConnected() onConnected()
{ {
for (;;) for (;;)
{ {
level waittill("connected", player); level waittill("connected", player);
player thread test(); player thread test();
player thread onSpawn(); player thread onSpawn();
} }
} }
onSpawn() onSpawn()
{ {
self endon("disconnect"); self endon("disconnect");
for (;;) for (;;)
{ {
self waittill("spawned_player"); self waittill("spawned_player");
self thread spawned(); self thread spawned();
} }
} }
spawned() spawned()
{ {
self endon("disconnect"); self endon("disconnect");
self endon("death"); self endon("death");
wait 0.5; wait 0.5;
} }
test() test()
{ {
self endon("disconnect"); self endon("disconnect");
for (;;) for (;;)
{ {
wait 0.05; wait 0.05;
if (self is_bot()) if (self is_bot())
{ {
} }
else else
{ {
} }
} }
} }

View File

@ -1,4 +1,4 @@
init() init()
{ {
level thread maps\mp\bots\_wp_editor::init(); level thread maps\mp\bots\_wp_editor::init();
} }

View File

@ -1,28 +1,28 @@
game:onplayerdamage(function(_self, inflictor, attacker, damage, dflags, mod, weapon, point, dir, hitloc) game:onplayerdamage(function(_self, inflictor, attacker, damage, dflags, mod, weapon, point, dir, hitloc)
if (game:isplayer(attacker) ~= 1 or _self.sessionteam == attacker.sessionteam or _self == attacker) then if (game:isplayer(attacker) ~= 1 or _self.sessionteam == attacker.sessionteam or _self == attacker) then
return return
end end
local huddamage = game:newclienthudelem(attacker) local huddamage = game:newclienthudelem(attacker)
huddamage.alignx = "center" huddamage.alignx = "center"
huddamage.horzalign = "center" huddamage.horzalign = "center"
huddamage.x = 10 huddamage.x = 10
huddamage.y = 235 huddamage.y = 235
huddamage.fontscale = 1.6 huddamage.fontscale = 1.6
huddamage.font = "objective" huddamage.font = "objective"
huddamage:setvalue(damage) huddamage:setvalue(damage)
if (hitloc == "head") then if (hitloc == "head") then
huddamage.color = vector:new(1, 1, 0.25) huddamage.color = vector:new(1, 1, 0.25)
end end
huddamage:moveovertime(1) huddamage:moveovertime(1)
huddamage:fadeovertime(1) huddamage:fadeovertime(1)
huddamage.alpha = 0 huddamage.alpha = 0
huddamage.x = math.random(25, 70) huddamage.x = math.random(25, 70)
huddamage.y = 235 + math.random(25, 70) * (math.random(0, 1) == 1 and -1 or 1) huddamage.y = 235 + math.random(25, 70) * (math.random(0, 1) == 1 and -1 or 1)
game:ontimeout(function() game:ontimeout(function()
huddamage:destroy() huddamage:destroy()
end, 1000) end, 1000)
end) end)