diff --git a/vehicle.cpp b/vehicle.cpp index 6a68d11..57fba4e 100644 --- a/vehicle.cpp +++ b/vehicle.cpp @@ -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; diff --git a/vehicle.h b/vehicle.h index 6794d7b..cff6990 100644 --- a/vehicle.h +++ b/vehicle.h @@ -34,6 +34,7 @@ namespace battleship{ void removePathpoint(int = 0); void removeAllPathpoints(); void select(); + void reinit(); protected: std::vector pathPoints; bool pursuingTarget = false;