Skip to content
Permalink
Browse files

drop UnitDef::isAirBase

  • Loading branch information...
rtri
rtri committed Oct 18, 2019
1 parent b10785d commit 1add37cca0e24c19dc1bdf64fa48eaf08aad6377
Showing with 6 additions and 17 deletions.
  1. +3 −13 rts/ExternalAI/SSkirmishAICallbackImpl.cpp
  2. +3 −1 rts/Lua/LuaUnitDefs.cpp
  3. +0 −2 rts/Sim/Units/UnitDef.cpp
  4. +0 −1 rts/Sim/Units/UnitDef.h
@@ -1723,19 +1723,9 @@ EXPORT(float) skirmishAiCallback_Gui_getViewRange(int skirmishAIId) { return 0.0
EXPORT(float) skirmishAiCallback_Gui_getScreenX(int skirmishAIId) { return 0.0f; }
EXPORT(float) skirmishAiCallback_Gui_getScreenY(int skirmishAIId) { return 0.0f; }

EXPORT(void) skirmishAiCallback_Gui_Camera_getDirection(int skirmishAIId, float* return_posF3_out) {
// DEPRECATED
return_posF3_out[0] = 0.0f;
return_posF3_out[1] = 0.0f;
return_posF3_out[2] = 0.0f;
}
EXPORT(void) skirmishAiCallback_Gui_Camera_getDirection(int skirmishAIId, float* dir) {} // DEPRECATED
EXPORT(void) skirmishAiCallback_Gui_Camera_getPosition(int skirmishAIId, float* pos) {} // DEPRECATED

EXPORT(void) skirmishAiCallback_Gui_Camera_getPosition(int skirmishAIId, float* return_posF3_out) {
// DEPRECATED
return_posF3_out[0] = 0.0f;
return_posF3_out[1] = 0.0f;
return_posF3_out[2] = 0.0f;
}



@@ -3095,7 +3085,7 @@ EXPORT(int) skirmishAiCallback_UnitDef_getMinTransportSize(int skirmishAIId, int
}

EXPORT(bool) skirmishAiCallback_UnitDef_isAirBase(int skirmishAIId, int unitDefId) {
return getUnitDefById(skirmishAIId, unitDefId)->isAirBase;
return false; // DEPRECATED
}

EXPORT(float) skirmishAiCallback_UnitDef_getTransportMass(int skirmishAIId, int unitDefId) {
@@ -811,7 +811,9 @@ ADD_BOOL("canAttackWater", canAttackWater); // CUSTOM
ADD_INT( "transportSize", ud.transportSize);
ADD_FLOAT("transportMass", ud.transportMass);
ADD_FLOAT("loadingRadius", ud.loadingRadius);
ADD_BOOL( "isAirBase", ud.isAirBase);

ADD_DEPRECATED_LUADEF_KEY("isAirBase");

ADD_BOOL( "isFirePlatform", ud.isFirePlatform);
ADD_BOOL( "holdSteady", ud.holdSteady);
ADD_BOOL( "releaseHeld", ud.releaseHeld);
@@ -191,7 +191,6 @@ UnitDef::UnitDef()
, transportCapacity(0)
, transportSize(0)
, minTransportSize(0)
, isAirBase(false)
, isFirePlatform(false)
, transportMass(0.0f)
, minTransportMass(0.0f)
@@ -446,7 +445,6 @@ UnitDef::UnitDef(const LuaTable& udTable, const std::string& unitName, int id)
minTransportSize = udTable.GetInt("minTransportSize", 0);
transportCapacity = udTable.GetInt("transportCapacity", 0);
isFirePlatform = udTable.GetBool("isFirePlatform", false);
isAirBase = udTable.GetBool("isAirBase", false);
loadingRadius = udTable.GetFloat("loadingRadius", 220.0f);
unloadSpread = udTable.GetFloat("unloadSpread", 5.0f);
transportMass = udTable.GetFloat("transportMass", 100000.0f);
@@ -310,7 +310,6 @@ struct UnitDef: public SolidObjectDef
int transportCapacity;
int transportSize;
int minTransportSize;
bool isAirBase;
bool isFirePlatform; ///< should the carried units still be able to shoot?
float transportMass;
float minTransportMass;

0 comments on commit 1add37c

Please sign in to comment.
You can’t perform that action at this time.