mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
fixed compile errors
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ namespace battleship{
|
||||
return environment;
|
||||
}
|
||||
|
||||
static void explode(Vector3 pos, int damage, float radius, sf::Sound *explosionSfx){
|
||||
void Environment::explode(Vector3 pos, int damage, float radius, sf::Sound *explosionSfx){
|
||||
if(!(damage == 0 || radius == 0))
|
||||
for(Player *pl : Game::getSingleton()->getPlayers()){
|
||||
for(Unit *un : pl->getUnits()){
|
||||
|
||||
+2
-2
@@ -97,7 +97,7 @@ namespace battleship{
|
||||
for(int i = 0; i < targetNodes.size(); i++)
|
||||
if(targetNodes[i]->getMesh(0) == results[0].mesh){
|
||||
targetUnits[i]->takeDamage(directHitDamage);
|
||||
Environment::getSingleton()->explode(pos, explosionDamage, explosionRadius, explosionSfx);
|
||||
Environment::explode(pos, explosionDamage, explosionRadius, explosionSfx);
|
||||
remove = true;
|
||||
}
|
||||
}
|
||||
@@ -108,7 +108,7 @@ namespace battleship{
|
||||
int cellId = map->getCellId(pos, false);
|
||||
|
||||
if((pos + dirVec * rayLength).y <= map->getCells()[cellId].pos.y){
|
||||
Environment::getSingleton()->explode(pos, explosionDamage, explosionRadius, explosionSfx);
|
||||
Environment::explode(pos, explosionDamage, explosionRadius, explosionSfx);
|
||||
remove = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -325,7 +325,7 @@ namespace battleship{
|
||||
displayUnitStats(slot.foreground, slot.background, (int)((bool)slot.vehicle), (int)true, renderSelectables, slot.offset);
|
||||
|
||||
if (health <= DEATH_HP){
|
||||
Environment::getSingleton()->explode(pos, 0, 0, deathSfx);
|
||||
Environment::explode(pos, 0, 0, deathSfx);
|
||||
remove = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user