some quick fixes

This commit is contained in:
devZoGok
2024-01-26 15:02:38 +02:00
parent 377297ed48
commit d71842f0a2
2 changed files with 9 additions and 9 deletions
@@ -363,7 +363,7 @@ units = {
projectile = {id = ProjectileId.CRUISE_MISSILE, pos = {x = 0, y = 2.44, z = -3.5}, rot = {w = .707, x = -.707, y = 0, z = 0}}
},
},
unitClass = UnitClass.MISSILE_SUBMARINE,
unitClass = UnitClass.SUBMARINE,
unitType = UnitType.UNDERWATER,
isVehicle = true,
health = 500,
@@ -393,7 +393,7 @@ units = {
projectile = {id = ProjectileId.TORPEDO, pos = {x = 0, y = -.27, z = 4.6}, rot = {w = 1, x = 0, y = 0, z = 0}}
}
},
unitClass = UnitClass.STEALTH_SUBMARINE,
unitClass = UnitClass.SUBMARINE,
unitType = UnitType.UNDERWATER,
isVehicle = true,
health = 500,
+7 -7
View File
@@ -39,15 +39,15 @@ namespace battleship{
void Projectile::initProperties(){
GameObject::initProperties();
sol::table projTable = generateView()[GameObject::getGameObjTableName()];
rayLength = projTable[id + 1]["rayLength"];
directHitDamage = projTable[id + 1]["directHitDamage"];
sol::table projTable = generateView()[GameObject::getGameObjTableName()][id + 1];
rayLength = projTable["rayLength"];
directHitDamage = projTable["directHitDamage"];
string explKey = "explosion";
explosionDamage = projTable[id + 1][explKey]["damage"];
explosionRadius = projTable[id + 1][explKey]["radius"];
speed = projTable[id + 1]["speed"];
rotAngle = projTable[id + 1]["rotAngle"];
explosionDamage = projTable[explKey]["damage"];
explosionRadius = projTable[explKey]["radius"];
speed = projTable["speed"];
rotAngle = projTable["rotAngle"].get_or(0.0);
}
void Projectile::initSound(){