Commit 9b799255 authored by Mikleo's avatar Mikleo

--

parent e75bb7b5
Pipeline #9516 passed with stages
in 13 seconds
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <SteamWorks> #include <SteamWorks>
#define PluginVersion "1.05" #define PluginVersion "1.06"
float pVersion; float pVersion;
// note linearmap field is unstable // note linearmap field is unstable
...@@ -4396,6 +4396,18 @@ SaveEntity(int entity,KeyValues kv,any[] classInfo,char[] className) ...@@ -4396,6 +4396,18 @@ SaveEntity(int entity,KeyValues kv,any[] classInfo,char[] className)
strcopy(className,32,"emp_building_nf_refinery"); strcopy(className,32,"emp_building_nf_refinery");
else else
strcopy(className,32,"emp_building_imp_refinery"); strcopy(className,32,"emp_building_imp_refinery");
// if commander placed refinery and doesent have a default target // add one.
char targetName[32];
GetEntPropString(entity, Prop_Data, "m_target", targetName,sizeof(targetName));
if(strlen(targetName) == 0)
{
FindClosestResourcePoint(position,targetName);
SetEntPropString(entity, Prop_Data, "m_target", targetName,sizeof(targetName));
}
} }
...@@ -4974,7 +4986,6 @@ int findEntityWithHammerID(int hammerID,char [] className) ...@@ -4974,7 +4986,6 @@ int findEntityWithHammerID(int hammerID,char [] className)
int FindClosestResourcePoint(float position[3], char [] pointName) int FindClosestResourcePoint(float position[3], char [] pointName)
{ {
int ent; int ent;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
{ {
"Version" "Version"
{ {
"Latest" "1.05" "Latest" "1.06"
} }
} }
......
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