Commit 04327fe4 authored by Mikleo's avatar Mikleo

--

parent 3c2965a4
Pipeline #9445 passed with stages
in 13 seconds
......@@ -9,7 +9,7 @@
#include <updater>
#define PluginVersion "1.02"
#define PluginVersion "1.03"
float pVersion;
// note linearmap field is unstable
......@@ -155,6 +155,8 @@ public void OnPluginStart()
RegConsoleCmd("sm_setcolor", Command_Action);
RegConsoleCmd("sm_repeat", Command_Repeat);
RegConsoleCmd("sm_removeent", Command_Action);
RegConsoleCmd("sm_tdt", Command_Action);
RegConsoleCmd("sm_baseswap", Command_Base_Swap);
RegConsoleCmd("sm_entinfo", Command_Action);
RegConsoleCmd("sm_entcrosshair", Command_Enable_Editor);
......@@ -360,7 +362,15 @@ public OnMapStart()
latestKnownMapEntity = 0;
Funcs_OnMapStart();
}
public OnGameStart()
{
for(int i=1; i< MaxClients; i++)
......@@ -1067,6 +1077,10 @@ public Action Command_Action(int client,int args)
{
Edit_Entity(client,entity,position,true);
}
else if(StrEqual(command,"sm_tdt",false))
{
TakeDamageTest(client,entity);
}
else if(StrEqual(command,"sm_entinfo",false))
{
char modelName[64];
......@@ -1672,7 +1686,11 @@ public Action Command_Save_Preset(int client, int args)
return Plugin_Handled;
}
public Action TakeDamageTest(int client, int entity)
{
// this works mainly, but will crash vehicles.
SDKHooks_TakeDamage(entity, 0, 0, 1000.0, 0 );
}
......
......@@ -65,6 +65,7 @@ void Funcs_OnPluginStart()
AddCommand("TargetParams",TargetParamsCommand,0);
AddCommand("FilterTeam",FilterTeamCommand,1);
AddCommand("SetHealth",SetHealthCommand,1);
AddCommand("TakeDamage",TakeDamageCommand,1);
AddCommand("Cancel",CancelCommand,100);
AddCommand("RunIf",RunIfCommand,6);
AddCommand("AddDamageFilter",AddDamageFilterCommand,100);
......@@ -1180,6 +1181,24 @@ public int SetHealthCommand(int entity,char[] args,char[] remainder)
return entity;
}
public int TakeDamageCommand(int entity,char[] args,char[] remainder)
{
char className[64];
GetEntityClassname(entity, className, sizeof(className));
// taking damage on vehicles crashes, other entities seem to work fine.
if(!StrEqual(className,"emp_vehicle",false))
{
int argIndex;
char damageAmountString[32];
BreakArg(args,damageAmountString,sizeof(damageAmountString),argIndex);
float damage = StringToFloat(damageAmountString);
SDKHooks_TakeDamage(entity, 0, 0, damage, 0 );
}
return entity;
}
// like run
......
......@@ -14,9 +14,9 @@
"DestroyTrigger" "OnOutput OnBreak -> TargetParams -> Input InputImpWin 0 EndActivator"
"OnGameStart" "Run Warning AirStrikeExec1 AirStrikeExec2 SmartIdeas AirStrikeExec3"
"Warning" "After 400 -> ChatText *Gen. Strickland:TXTCLR_DF Intel has revealed that the enemy are planning airstrikes on key buildings at our location. Don't take any defences for granted!* *Gen. Mendez:TXTCLR_DF Be alert, We have allied bombers in the area which will deliver precision airstrikes on enemy targets* **"
"AirStrikeExec1" "After 600 -> TargetClassname emp_building_radar 2-> Run AircraftEffect -> SetHealth 0 -> After 2 -> Run AirStrikeNotice1 -> After 10 -> Input Kill"
"AirStrikeExec1" "After 600 -> TargetClassname emp_building_radar 2-> Run AircraftEffect -> TakeDamage 500 -> After 2 -> Run AirStrikeNotice1 "
"AirStrikeNotice1" "ChatText *Gen. Strickland:TXTCLR_DF Oh no! Our radar has just been taken out by a precision airstrike!* *Gen. Mendez:TXTCLR_DF Great news! A precision allied airstrike has just taken out the enemy radar! *"
"AirStrikeExec2" "After 900 -> TargetClassname emp_building_vehiclefactory 2 -> Run AircraftEffect -> SetHealth 0 -> After 2 -> Run AirStrikeNotice2 -> After 10 -> Input Kill"
"AirStrikeExec2" "After 900 -> TargetClassname emp_building_vehiclefactory 2 -> Run AircraftEffect -> TakeDamage 500 -> After 2 -> Run AirStrikeNotice2"
"AirStrikeNotice2" "ChatText *Gen. Strickland:TXTCLR_DF Oh no! Our vehicle factory has just been taken out by a precision airstrike!* *Gen. Mendez:TXTCLR_DF Great news! A precision allied airstrike has just taken out the enemy vehicle factory! *"
"SmartIdeas" "After 1000 -> ChatText ** *Gen. Mendez:TXTCLR_DF Listen up maggot, anyone else with 'smart' suggestions about airstriking the artifact will be reassigned to the bioweapon research division.* **"
"AirStrikeExec3" "After 1050 -> Run AirStrikeWarning3 -> After 50 -> TargetParams -> Run AircraftDownEffect -> Input SetNFTickets 1 -> After 2 -> Run AirStrikeNotice3"
......
......@@ -4,7 +4,7 @@
{
"Version"
{
"Latest" "1.02"
"Latest" "1.03"
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment