mirror of
https://github.com/ineedbots/iw5_bot_warfare.git
synced 2025-06-28 07:01:50 +00:00
Move files
This commit is contained in:
@ -1,4 +0,0 @@
|
||||
init()
|
||||
{
|
||||
level thread maps\mp\bots\_bot::init();
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
init()
|
||||
{
|
||||
level thread maps\mp\bots\_menu::init();
|
||||
}
|
@ -1,73 +0,0 @@
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\bots\_bot_utility;
|
||||
|
||||
init()
|
||||
{
|
||||
setDvarIfUninitialized( "bots_test", true );
|
||||
|
||||
if (!getDvarInt("bots_test"))
|
||||
return;
|
||||
|
||||
level thread onConnected();
|
||||
level thread onframe();
|
||||
}
|
||||
|
||||
onframe()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
wait 0.05;
|
||||
|
||||
if(getDvarInt("developer")) print("time:" + getTime() + " child0:" + getVarUsage(0) + " child1:" + getVarUsage(1) + " notifycount:" + getVarUsage(2));
|
||||
}
|
||||
}
|
||||
|
||||
onConnected()
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
level waittill("connected", player);
|
||||
|
||||
player thread test();
|
||||
player thread onSpawn();
|
||||
}
|
||||
}
|
||||
|
||||
onSpawn()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for (;;)
|
||||
{
|
||||
self waittill("spawned_player");
|
||||
|
||||
self thread spawned();
|
||||
}
|
||||
}
|
||||
|
||||
spawned()
|
||||
{
|
||||
self endon("disconnect");
|
||||
self endon("death");
|
||||
|
||||
wait 0.5;
|
||||
}
|
||||
|
||||
test()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
for (;;)
|
||||
{
|
||||
wait 0.05;
|
||||
|
||||
if (self is_bot())
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
init()
|
||||
{
|
||||
level thread maps\mp\bots\_wp_editor::init();
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
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
|
||||
return
|
||||
end
|
||||
|
||||
local huddamage = game:newclienthudelem(attacker)
|
||||
huddamage.alignx = "center"
|
||||
huddamage.horzalign = "center"
|
||||
huddamage.x = 10
|
||||
huddamage.y = 235
|
||||
huddamage.fontscale = 1.6
|
||||
huddamage.font = "objective"
|
||||
huddamage:setvalue(damage)
|
||||
|
||||
if (hitloc == "head") then
|
||||
huddamage.color = vector:new(1, 1, 0.25)
|
||||
end
|
||||
|
||||
huddamage:moveovertime(1)
|
||||
huddamage:fadeovertime(1)
|
||||
huddamage.alpha = 0
|
||||
huddamage.x = math.random(25, 70)
|
||||
huddamage.y = 235 + math.random(25, 70) * (math.random(0, 1) == 1 and -1 or 1)
|
||||
|
||||
game:ontimeout(function()
|
||||
huddamage:destroy()
|
||||
end, 1000)
|
||||
end)
|
Reference in New Issue
Block a user