|
@@ -97,14 +97,14 @@ bool EnterhakenEffect::tick( double time, Spiel *zSpiel )
|
|
|
}
|
|
|
for( auto s = zSpiel->getSpieler(); s; s++ )
|
|
|
{
|
|
|
- if( s->zTeam() != zSpieler->zTeam() && s->getX() <= ehpx - 7 && s->getX() + s->getWidth() > ehpx + 7 && s->getY() <= ehpy - 7 && s->getY() + s->getWidth() > ehpy + 7 )
|
|
|
+ if( s->zTeam() != zSpieler->zTeam() && s->getX() <= ehpx - 7 && s->getX() + s->getWidth() > ehpx + 7 && s->getY() <= ehpy - 7 && s->getY() + s->getHeight() > ehpy + 7 )
|
|
|
s->nimmSchaden( 150 * (float)time, zSpieler, r, zSpiel );
|
|
|
}
|
|
|
for( auto b = zSpiel->getBarieren(); b; b++ )
|
|
|
{
|
|
|
if( b->hatStyle( Bariere::Style::Aktiv ) && ( !b->zTeam() || b->zTeam() == zSpieler->zTeam() ) )
|
|
|
{
|
|
|
- if( b->getX() <= ehpx - 7 && b->getX() + b->getWidth() > ehpx + 7 && b->getY() <= ehpy - 7 && b->getY() + b->getWidth() > ehpy + 7 )
|
|
|
+ if( b->getX() <= ehpx - 7 && b->getX() + b->getWidth() > ehpx + 7 && b->getY() <= ehpy - 7 && b->getY() + b->getHeight() > ehpy + 7 )
|
|
|
{
|
|
|
target = b;
|
|
|
state = 2;
|
|
@@ -132,7 +132,7 @@ bool EnterhakenEffect::tick( double time, Spiel *zSpiel )
|
|
|
}
|
|
|
for( auto s = zSpiel->getSpieler(); s; s++ )
|
|
|
{
|
|
|
- if( s->zTeam() != zSpieler->zTeam() && s->getX() <= ehpx - 7 && s->getX() + s->getWidth() > ehpx + 7 && s->getY() <= ehpy - 7 && s->getY() + s->getWidth() > ehpy + 7 )
|
|
|
+ if( s->zTeam() != zSpieler->zTeam() && s->getX() <= ehpx - 7 && s->getX() + s->getWidth() > ehpx + 7 && s->getY() <= ehpy - 7 && s->getY() + s->getHeight() > ehpy + 7 )
|
|
|
s->nimmSchaden( 150 * (float)time, zSpieler, invert( r ), zSpiel );
|
|
|
}
|
|
|
timeLeft -= (float)time;
|
|
@@ -157,7 +157,7 @@ bool EnterhakenEffect::tick( double time, Spiel *zSpiel )
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
- if( !target->hatStyle( Bariere::Style::Aktiv ) || target->getX() > ehpx - 7 || target->getX() + target->getWidth() <= ehpx + 7 || target->getY() > ehpy - 7 || target->getY() + target->getWidth() <= ehpy + 7 )
|
|
|
+ if( !target->hatStyle( Bariere::Style::Aktiv ) || target->getX() > ehpx - 7 || target->getX() + target->getWidth() <= ehpx + 7 || target->getY() > ehpy - 7 || target->getY() + target->getHeight() <= ehpy + 7 )
|
|
|
state = 3;
|
|
|
}
|
|
|
return state == 5;
|