mirror of
https://git.freebsd.org/ports.git
synced 2025-05-27 08:26:27 -04:00
156 lines
3.8 KiB
Text
156 lines
3.8 KiB
Text
From
|
|
|
|
https://github.com/spring/KAIK/commit/42fec4393483d9c0dd049ca84bd230988c2fbdb6
|
|
|
|
--- AI/Skirmish/KAIK/CommandTracker.h
|
|
+++ AI/Skirmish/KAIK/CommandTracker.h
|
|
@@ -15,7 +15,7 @@ class CCommandTracker {
|
|
ai(aic),
|
|
maxCmdsPerFrame(0),
|
|
peakCmdFrame(0),
|
|
- avgCmdSize(0.0f),
|
|
+ //avgCmdSize(0.0f),
|
|
totalCmdSize(0),
|
|
totalNumCmds(0) {
|
|
}
|
|
@@ -31,7 +31,7 @@ class CCommandTracker {
|
|
int maxCmdsPerFrame;
|
|
int peakCmdFrame;
|
|
|
|
- float avgCmdSize;
|
|
+ //float avgCmdSize;
|
|
int totalCmdSize;
|
|
int totalNumCmds;
|
|
};
|
|
--- AI/Skirmish/KAIK/KAIK.cpp
|
|
+++ AI/Skirmish/KAIK/KAIK.cpp
|
|
@@ -107,7 +107,6 @@ void CKAIK::UnitFinished(int unitID) {
|
|
|
|
void CKAIK::UnitDestroyed(int unitID, int attackerUnitID) {
|
|
if (ai->Initialized()) {
|
|
- attackerUnitID = attackerUnitID;
|
|
ai->econTracker->UnitDestroyed(unitID);
|
|
|
|
if (ai->GetUnit(unitID)->groupID != -1) {
|
|
@@ -151,10 +150,6 @@ void CKAIK::UnitDamaged(int unitID, int attackerID, float damage, float3 dir) {
|
|
if (ai->GetUnit(unitID)->isDead) {
|
|
return;
|
|
}
|
|
-
|
|
- attackerID = attackerID;
|
|
- dir = dir;
|
|
-
|
|
ai->econTracker->UnitDamaged(unitID, damage);
|
|
}
|
|
}
|
|
@@ -169,25 +164,25 @@ void CKAIK::UnitMoveFailed(int unitID) {
|
|
|
|
void CKAIK::EnemyEnterLOS(int enemyUnitID) {
|
|
if (ai->Initialized()) {
|
|
- enemyUnitID = enemyUnitID;
|
|
+ //TODO
|
|
}
|
|
}
|
|
|
|
void CKAIK::EnemyLeaveLOS(int enemyUnitID) {
|
|
if (ai->Initialized()) {
|
|
- enemyUnitID = enemyUnitID;
|
|
+ //TODO
|
|
}
|
|
}
|
|
|
|
void CKAIK::EnemyEnterRadar(int enemyUnitID) {
|
|
if (ai->Initialized()) {
|
|
- enemyUnitID = enemyUnitID;
|
|
+ //TODO
|
|
}
|
|
}
|
|
|
|
void CKAIK::EnemyLeaveRadar(int enemyUnitID) {
|
|
if (ai->Initialized()) {
|
|
- enemyUnitID = enemyUnitID;
|
|
+ //TODO
|
|
}
|
|
}
|
|
|
|
@@ -201,9 +196,6 @@ void CKAIK::EnemyDestroyed(int enemyUnitID, int attackerUnitID) {
|
|
void CKAIK::EnemyDamaged(int enemyUnitID, int attackerUnitID, float damage, float3 dir) {
|
|
if (ai->Initialized()) {
|
|
ai->thm->EnemyDamaged(enemyUnitID, attackerUnitID);
|
|
-
|
|
- damage = damage;
|
|
- dir = dir;
|
|
}
|
|
}
|
|
|
|
@@ -222,7 +214,6 @@ void CKAIK::EnemyFinished(int enemyUnitID) {
|
|
|
|
void CKAIK::RecvChatMessage(const char* msg, int player) {
|
|
if (ai->Initialized()) {
|
|
- player = player;
|
|
|
|
if ((msg = strstr(msg, "KAIK::")) == NULL) {
|
|
return;
|
|
--- AI/Skirmish/KAIK/MetalMap.cpp
|
|
+++ AI/Skirmish/KAIK/MetalMap.cpp
|
|
@@ -219,8 +219,6 @@ void CMetalMap::GetMetalPoints() {
|
|
}
|
|
}
|
|
|
|
- // comment out for debug
|
|
- TotalMetal = TotalMetal;
|
|
}
|
|
|
|
// set that spot's metal making ability (divide by cells to values are small)
|
|
--- AI/Skirmish/KAIK/MetalMap.h
|
|
+++ AI/Skirmish/KAIK/MetalMap.h
|
|
@@ -36,7 +36,7 @@ class CMetalMap {
|
|
int TempMetal;
|
|
int coordx;
|
|
int coordy;
|
|
- int Minradius;
|
|
+ //int Minradius;
|
|
int MinMetalForSpot;
|
|
int XtractorRadius; // in metal map units
|
|
int DoubleRadius; // in metal map units
|
|
--- AI/Skirmish/KAIK/MicroPather.cpp
|
|
+++ AI/Skirmish/KAIK/MicroPather.cpp
|
|
@@ -60,7 +60,7 @@ using namespace NSMicroPather;
|
|
class OpenQueueBH {
|
|
public:
|
|
|
|
- OpenQueueBH(AIClasses* ai, PathNode** heapArray): ai(ai), size(0) {
|
|
+ OpenQueueBH(AIClasses* ai, PathNode** heapArray): size(0) {
|
|
this->heapArray = heapArray;
|
|
}
|
|
|
|
@@ -174,7 +174,6 @@ class OpenQueueBH {
|
|
|
|
private:
|
|
PathNode** heapArray;
|
|
- AIClasses* ai;
|
|
int size;
|
|
};
|
|
|
|
--- AI/Skirmish/KAIK/Unit.cpp
|
|
+++ AI/Skirmish/KAIK/Unit.cpp
|
|
@@ -93,8 +93,7 @@ bool CUNIT::CanAttack(int otherUnit) const {
|
|
return false;
|
|
}
|
|
|
|
-bool CUNIT::CanAttackMe(int otherUnit) const {
|
|
- otherUnit = otherUnit;
|
|
+bool CUNIT::CanAttackMe(int /*otherUnit*/) const {
|
|
// TODO: the function above, in reverse
|
|
return true;
|
|
}
|
|
--- AI/Skirmish/KAIK/UnitHandler.cpp
|
|
+++ AI/Skirmish/KAIK/UnitHandler.cpp
|
|
@@ -117,7 +117,6 @@ void CUnitHandler::IdleUnitUpdate(int frame) {
|
|
}
|
|
|
|
void CUnitHandler::UnitMoveFailed(int unitID) {
|
|
- unitID = unitID;
|
|
}
|
|
|
|
// called when unit nanoframe first created
|