updating vehicle stats upon reinit

This commit is contained in:
devZoGok
2024-10-20 14:47:08 +03:00
parent 0510dd0852
commit 4d86a04b87
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -94,6 +94,11 @@ namespace battleship{
garrisonCategory = unitTable["garrisonCategory"];
}
void Vehicle::reinit(){
Unit::reinit();
initProperties();
}
void Vehicle::navigate(float destOffset){
Vector3 hypVec = (pathPoints[0] - pos);
float hypAngle = hypVec.norm().getAngleBetween(upVec) - PI / 2;
+1
View File
@@ -34,6 +34,7 @@ namespace battleship{
void removePathpoint(int = 0);
void removeAllPathpoints();
void select();
void reinit();
protected:
std::vector<vb01::Vector3> pathPoints;
bool pursuingTarget = false;