Commit 7e1a4051 authored by Gerhard Stein's avatar Gerhard Stein

More Bug fixes

parent 94617955
......@@ -28,12 +28,15 @@ processState(&CFlag::processFlying)
honorPriority = false;
sprite = WAVING_BASEFRAME;
CSprite &rSprite = g_pGfxEngine->getSprite(sprite);
/*CSprite &rSprite = g_pGfxEngine->getSprite(sprite);
int moveup = (1<<CSF)-1;
moveup -= ((rSprite.getHeight()+1)<<STC);
m_Pos.y += moveup;
processMove(0, 1);
m_Pos.y += moveup;*/
alignToTile();
//processMove(0, 1);
}
/**
......
......@@ -615,7 +615,7 @@ void CPlayerWM::finishLevel(Uint16 object)
csfX += (6<<STC);
csfY -= FlagSprite.m_bboxY2;
csfY += (1<<STC);
csfY += (2<<STC);
VectorD2<Uint32> dst(csfX, csfY);
......
......@@ -54,7 +54,7 @@ void CBlueBird::setActionForce(const size_t ActionNumber)
bool CBlueBird::isNearby(CSpriteObject &theObject)
{
if( !getProbability(80) )
if( !getProbability(60) )
return false;
if( CPlayerLevel *player = dynamic_cast<CPlayerLevel*>(&theObject) )
......@@ -84,7 +84,7 @@ void CBlueBird::processWalking()
if( mTimer % CHANCETOFLY == 0 )
{
// Chance to poo
if( getProbability(30) )
if( getProbability(50) )
{
setAction(A_EAGLE_FLYING);
inhibitfall = true;
......@@ -165,7 +165,9 @@ void CBlueBird::getTouchedBy(CSpriteObject &theObject)
void CBlueBird::process()
{
performCollisions();
performGravityLow();
if(!inhibitfall)
performGravityMid();
if( blockedl )
xDirection = RIGHT;
......
......@@ -85,7 +85,7 @@ void CEgg::getTouchedBy(CSpriteObject &theObject)
void CEgg::process()
{
performGravityLow();
performGravityMid();
performCollisions();
......
......@@ -183,20 +183,20 @@ void CMimrock::processBounce()
}
void CMimrock::process()
{
performGravityMid();
performCollisions();
{
if(dead)
return;
(this->*mp_processState)();
performCollisions();
performGravityMid();
processActionRoutine();
if(getActionStatus(A_MIMROCK_STUNNED))
dead = true;
(this->*mp_processState)();
}
......
......@@ -69,7 +69,7 @@ void CPoisonSlug::processCrawling()
CSlugSlime *slime = new CSlugSlime(mp_Map, 0, getXMidPos(), getYDownPos()-(1<<CSF));
g_pBehaviorEngine->m_EventList.add( new EventSpawnObject( slime ) );
if(!slope)
//if(!slope)
{
// Turn around!
xDirection = -xDirection;
......@@ -86,7 +86,6 @@ void CPoisonSlug::processCrawling()
{
moveLeft( m_Action.velX<<1 );
}
}
......@@ -134,10 +133,8 @@ void CPoisonSlug::process()
{
performCollisions();
if(!blockedd)
performGravityMid();
(this->*mp_processState)();
//if(!blockedd)
performGravityLow();
if( blockedl )
xDirection = RIGHT;
......@@ -145,7 +142,9 @@ void CPoisonSlug::process()
xDirection = LEFT;
if(!processActionRoutine())
exists = false;
exists = false;
(this->*mp_processState)();
}
}
......@@ -21,7 +21,7 @@ const unsigned int DIST_TO_STRIKE = 1<<CSF;
const unsigned int DIST_TO_AWAKE = 7<<CSF;
const int MOVE_SPEED = 34;
const int STRIKE_TIME = 80;
const int STRIKE_TIME = 120;
CThunderCloud::CThunderCloud(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y),
......@@ -61,7 +61,7 @@ bool CThunderCloud::isNearby(CSpriteObject &theObject)
if( playXLeft < cloudX &&
playXRight > cloudX )
{
if( getActionStatus(A_CLOUD_ASLEEP) && getProbability(200) )
if( getActionStatus(A_CLOUD_ASLEEP) && getProbability(180) )
setAction(A_CLOUD_WAKING);
}
else
......@@ -76,7 +76,7 @@ bool CThunderCloud::isNearby(CSpriteObject &theObject)
}
if( getProbability(80) && getActionStatus(A_CLOUD_MOVING) )
if( getProbability(70) && getActionStatus(A_CLOUD_MOVING) )
{
if( player->getXMidPos() < getXMidPos() )
xDirection = LEFT;
......@@ -92,11 +92,11 @@ bool CThunderCloud::isNearby(CSpriteObject &theObject)
if( playXStrikeLeft < cloudX &&
playXStrikeRight > cloudX &&
getProbability(90) )
getProbability(80) )
{
setAction(A_CLOUD_STRIKING);
mpBolt = new CThunderBolt( mp_Map, getXLeftPos() + (12<<STC), getYDownPos()+(2<<CSF) );
g_pBehaviorEngine->m_EventList.add( new EventSpawnObject( mpBolt ) );
mpBolt = new CThunderBolt( mp_Map, getXLeftPos() + (12<<STC), getYDownPos() + (32<<STC) );
g_pBehaviorEngine->m_EventList.spawnObj( mpBolt );
}
......@@ -108,8 +108,7 @@ bool CThunderCloud::isNearby(CSpriteObject &theObject)
}
void CThunderCloud::processAsleep()
{
}
{}
void CThunderCloud::processWaking()
{
......@@ -160,10 +159,7 @@ void CThunderCloud::process()
mTimer++;
/*if( getActionStatus(A_CLOUD_WAKING) || getActionStatus(A_CLOUD_STRIKING) )*/
{
processActionRoutine();
}
processActionRoutine();
}
......@@ -196,7 +192,7 @@ void CThunderBolt::process()
{
performCollisions();
if(!processActionRoutine())
exists = false;
exists = false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment