mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-05 16:33:21 +00:00
eh
This commit is contained in:
parent
0801d644f1
commit
4a8f3f0049
12 changed files with 3 additions and 15 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -78,7 +78,6 @@ New logic overview:
|
|||
3. Find the closest tank
|
||||
4. Retreat if in close range (~300 units)
|
||||
*/
|
||||
//TODO: possibly check if multiple loops being created
|
||||
public Action BotControlTimerV2(Handle timer)
|
||||
{
|
||||
//remove timer once tanks no longer exists/are all dead or finale escape vehicle arrived
|
||||
|
@ -121,7 +120,6 @@ public Action BotControlTimerV2(Handle timer)
|
|||
}
|
||||
}
|
||||
//If the closest tank exists (-1 means no tank.) and is close, avoid.
|
||||
//TODO: Possibly only run if they have an item in the pill shot, or have medkit.
|
||||
if(closestTank > -1 && smallestDistance <= 300 && botHealth >= 40) {
|
||||
//L4D2_RunScript("CommandABot({cmd=3,bot=GetPlayerFromUserID(%i)})", GetClientUserId(i));
|
||||
L4D2_RunScript("CommandABot({cmd=2,bot=GetPlayerFromUserID(%i),target=GetPlayerFromUserID(%i)})", GetClientUserId(i), GetClientUserId(closestTank));
|
||||
|
|
|
@ -35,7 +35,6 @@ public void OnPluginStart() {
|
|||
RegAdminCmd("sm_ai_holdout", Command_SpawnHoldoutBot, ADMFLAG_ROOT);
|
||||
RegAdminCmd("sm_ai_minigun", Command_SpawnMinigunBot, ADMFLAG_ROOT);
|
||||
RegAdminCmd("sm_ai_remove_far", Command_RemoveFar, ADMFLAG_ROOT);
|
||||
//todo: add cmd to remove any that are out of range? possibly only ones you past
|
||||
}
|
||||
|
||||
public void OnMapStart() {
|
||||
|
|
|
@ -23,7 +23,7 @@ public Plugin myinfo =
|
|||
url = ""
|
||||
};
|
||||
|
||||
//TODO: Performance checks, split main loop into scan loop / active loop, and convars for allowed gamemodes / difficulties
|
||||
//TODO: convars for allowed gamemodes / difficulties
|
||||
|
||||
|
||||
static ArrayList WitchList;
|
||||
|
@ -124,9 +124,6 @@ public Action Event_WitchKilled(Event event, const char[] name, bool dontBroadca
|
|||
if(index > -1) {
|
||||
RemoveFromArray(WitchList, index);
|
||||
}
|
||||
if(WitchList.Length == 0) {
|
||||
CloseHandle(timer);
|
||||
}
|
||||
if(AutoCrownTarget == witchID) {
|
||||
ResetAutoCrown();
|
||||
#if defined DEBUG
|
||||
|
@ -206,12 +203,11 @@ public Action Timer_Scan(Handle hdl) {
|
|||
int witchID = WitchList.Get(i);
|
||||
if(IsValidEntity(witchID) && HasEntProp(witchID, Prop_Send, "m_rage") && GetEntPropFloat(witchID, Prop_Send, "m_rage") <= 0.4) {
|
||||
GetEntPropVector(witchID, Prop_Send, "m_vecOrigin", witchPos);
|
||||
//TODO: Calculate closest witch
|
||||
if(GetVectorDistance(botPosition, witchPos) <= SCAN_RANGE) {
|
||||
//GetEntPropVector(witchID, Prop_Send, "m_angRotation", witchAng);
|
||||
//TODO: Implement a line-of-sight trace
|
||||
#if defined DEBUG
|
||||
PrintToChatAll("Found a valid witch in range of %N: %d", bot, witchID);
|
||||
PrintToServer("Found a valid witch in range of %N: %d", bot, witchID);
|
||||
#endif
|
||||
L4D2_RunScript("CommandABot({cmd=1,bot=GetPlayerFromUserID(%i),pos=Vector(%f,%f,%f)})", GetClientUserId(bot), witchPos[0], witchPos[1], witchPos[2]);
|
||||
AutoCrownTarget = witchID;
|
||||
|
|
|
@ -45,7 +45,7 @@ public void OnPluginStart()
|
|||
HookEvent("player_entered_checkpoint", Event_EnterSaferoom);
|
||||
HookEvent("heal_success", Event_HealFinished);
|
||||
|
||||
hExtraItemBasePercentage = CreateConVar("l4d2_extraitem_chance", "0.056", "The base chance (multipled by player count) of an extra item being spawned.", FCVAR_NONE, true, 0.0, true, 1.0);
|
||||
hExtraItemBasePercentage = CreateConVar("l4d2_extraitem_chance", "0.056", "The base chance (multiplied by player count) of an extra item being spawned.", FCVAR_NONE, true, 0.0, true, 1.0);
|
||||
|
||||
AutoExecConfig(true);
|
||||
}
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
//TODO: Detect if player activates crescendo from far away
|
||||
//Possibly cancel event, make poll for other users. if no one responds, activate troll mode/swarm or kick/ban depending on FF amount?
|
||||
|
||||
//TODO: Replace all timers with userID not clientID. GetClientUserId() -> timer
|
||||
//On player_disconnect event, NOT the forward remove?
|
||||
|
||||
public Plugin myinfo =
|
||||
{
|
||||
|
@ -89,9 +87,6 @@ public void OnMapStart() {
|
|||
HookEntityOutput("func_button", "OnPressed", Event_ButtonPress);
|
||||
CreateTimer(MAIN_TIMER_INTERVAL_S, Timer_Main, _, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE);
|
||||
}
|
||||
public void OnPlayerDisconnect(int client) {
|
||||
g_iTrollUsers[client] = 0;
|
||||
}
|
||||
public void Event_PlayerDisconnect(Event event, const char[] name, bool dontBroadcast) {
|
||||
int client = GetClientOfUserId(event.GetInt("userid"));
|
||||
g_iTrollUsers[client] = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue