|
@@ -224,6 +224,8 @@ Spieler::Spieler( ResourceRegistry *zResources, int id, Team *team, int spawnX,
|
|
|
texturScale = 1;
|
|
|
resources = zResources->getThis();
|
|
|
current = zResources->getResource( R_SPIELER, farbe );
|
|
|
+ if( !current )
|
|
|
+ throw "error";
|
|
|
textur = current->getImages()->getThis();
|
|
|
heilungR = zResources->getResource( R_HEILUNG, 0 );
|
|
|
schadenR = zResources->getResource( R_SCHADEN, 0 );
|
|
@@ -251,6 +253,8 @@ bool Spieler::setTastenStand( unsigned char taste, bool pressed )
|
|
|
{
|
|
|
current->release();
|
|
|
current = resources->getResource( R_SPIELER_RECHTS, color );
|
|
|
+ if( !current )
|
|
|
+ throw "error";
|
|
|
}
|
|
|
ausrichtung = OBEN;
|
|
|
}
|
|
@@ -258,6 +262,8 @@ bool Spieler::setTastenStand( unsigned char taste, bool pressed )
|
|
|
{
|
|
|
current->release();
|
|
|
current = resources->getResource( R_SPIELER_LINKS, color );
|
|
|
+ if( !current )
|
|
|
+ throw "error";
|
|
|
ausrichtung = LINKS;
|
|
|
}
|
|
|
if( taste == 's' )
|
|
@@ -266,6 +272,8 @@ bool Spieler::setTastenStand( unsigned char taste, bool pressed )
|
|
|
{
|
|
|
current->release();
|
|
|
current = resources->getResource( R_SPIELER_LINKS, color );
|
|
|
+ if( !current )
|
|
|
+ throw "error";
|
|
|
}
|
|
|
ausrichtung = UNTEN;
|
|
|
}
|
|
@@ -273,6 +281,8 @@ bool Spieler::setTastenStand( unsigned char taste, bool pressed )
|
|
|
{
|
|
|
current->release();
|
|
|
current = resources->getResource( R_SPIELER_RECHTS, color );
|
|
|
+ if( !current )
|
|
|
+ throw "error";
|
|
|
ausrichtung = RECHTS;
|
|
|
}
|
|
|
if( taste >= '1' && taste <= '8' )
|
|
@@ -284,6 +294,8 @@ bool Spieler::setTastenStand( unsigned char taste, bool pressed )
|
|
|
{
|
|
|
current->release();
|
|
|
current = resources->getResource( R_SPIELER, color );
|
|
|
+ if( !current )
|
|
|
+ throw "error";
|
|
|
ausrichtung = MITTE;
|
|
|
}
|
|
|
else
|
|
@@ -299,6 +311,8 @@ bool Spieler::setTastenStand( unsigned char taste, bool pressed )
|
|
|
{
|
|
|
current->release();
|
|
|
current = resources->getResource( R_SPIELER_LINKS, color );
|
|
|
+ if( !current )
|
|
|
+ throw "error";
|
|
|
ausrichtung = LINKS;
|
|
|
}
|
|
|
if( tastenStand[ 's' ] )
|
|
@@ -307,6 +321,8 @@ bool Spieler::setTastenStand( unsigned char taste, bool pressed )
|
|
|
{
|
|
|
current->release();
|
|
|
current = resources->getResource( R_SPIELER_RECHTS, color );
|
|
|
+ if( !current )
|
|
|
+ throw "error";
|
|
|
ausrichtung = RECHTS;
|
|
|
}
|
|
|
}
|
|
@@ -728,6 +744,8 @@ void Spieler::nimmSchaden( float schaden, Spieler *zVerursacher, Richtung r, Spi
|
|
|
{
|
|
|
current->release();
|
|
|
current = resources->getResource( R_SPIELER, color );
|
|
|
+ if( !current )
|
|
|
+ throw "error";
|
|
|
heilungImage = 0;
|
|
|
schadenImage = 0;
|
|
|
showSchaden = 0;
|