removing projectiles if they go out of map bounds

This commit is contained in:
devZoGok
2026-02-01 10:26:54 +02:00
parent bd12a393b8
commit 0770d64784
10 changed files with 74 additions and 18 deletions
+3
View File
@@ -14,6 +14,7 @@
#include "cruiseMissile.h"
#include "iceSheet.h"
#include "shell.h"
#include "torpedo.h"
#include "depthCharge.h"
#include "defConfigs.h"
@@ -77,6 +78,8 @@ namespace battleship{
return new CruiseMissile(unit, id, targetPos, pos, rot);
case ProjectileClass::MISSILE:
return new Missile(unit, id, targetPos, pos, rot);
case ProjectileClass::TORPEDO:
return new Torpedo(unit, id, pos, rot);
case ProjectileClass::DEPTH_CHARGE:
return new DepthCharge(unit, id, pos, rot);
default: