minor refactoring

corrected CPU player script
This commit is contained in:
devZoGok
2024-01-24 15:39:51 +02:00
parent ceba728438
commit 3cb6b494ce
6 changed files with 1 additions and 35 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ function Player:issueBuildOrder()
end
spawnPoint = self:getSpawnPoint()
structure = GameObjectFactory.createUnit(self, 13, spawnPoint, Quaternion:new(1, 0, 0, 0), 0)
structure = GameObjectFactory.createUnit(self, 14, spawnPoint, Quaternion:new(1, 0, 0, 0), 0)
self:addUnit(structure)
self:issueOrder(1, Vector3:new(0, 0, 0), {Target:new(structure, Vector3:new(0, 0, 0))}, false)
-2
View File
@@ -12,7 +12,6 @@
#include "defConfigs.h"
#include "player.h"
#include "factory.h"
#include "transport.h"
#include "engineer.h"
#include "pointDefense.h"
#include "resourceDeposit.h"
@@ -58,7 +57,6 @@ namespace battleship{
"getUnitClass", &Unit::getUnitClass,
"toEngineer", &Unit::toEngineer,
"toPointDefense", &Unit::toPointDefense,
"toTransport", &Unit::toTransport,
"toFactory", &Unit::toFactory
);
-1
View File
@@ -2,7 +2,6 @@
#include "player.h"
#include "factory.h"
#include "engineer.h"
#include "transport.h"
#include "resourceRover.h"
#include "projectile.h"
#include "resourceDeposit.h"
-13
View File
@@ -1,13 +0,0 @@
#include "transport.h"
#include "player.h"
#include <solUtil.h>
namespace battleship{
using namespace vb01;
using namespace gameBase;
Transport::Transport(Player *player, int id, Vector3 pos, Quaternion rot) : Vehicle(player, id, pos, rot){
}
}
-16
View File
@@ -1,16 +0,0 @@
#ifndef TRANSPORT_H
#define TRANSPORT_H
#include "vehicle.h"
namespace battleship{
class Player;
class Transport : public Vehicle{
public:
Transport(Player*, int, vb01::Vector3, vb01::Quaternion);
private:
};
}
#endif
-2
View File
@@ -30,7 +30,6 @@ namespace battleship{
class Vehicle;
class Factory;
class Cruiser;
class Transport;
class PointDefense;
class Engineer;
@@ -129,7 +128,6 @@ namespace battleship{
virtual void reinit();
bool canGarrison(Vehicle*);
inline Engineer* toEngineer(){return (Engineer*)this;}
inline Transport* toTransport(){return (Transport*)this;}
inline Factory* toFactory(){return (Factory*)this;}
inline Cruiser* toCruiser(){return (Cruiser*)this;}
inline PointDefense* toPointDefense(){return (PointDefense*)this;}