Commit 0e39ea35 authored by Gerhard Stein's avatar Gerhard Stein

Level Replayability option noew works as it should in galaxy

parent 66267fe3
......@@ -216,7 +216,7 @@ bool CGameLauncherMenu::loadResources( const std::string& DataDirectory, const i
g_pTimer->setLPS(DEFAULT_LPS_GALAXY);
g_pResourceLoader->setStyle(PROGRESS_STYLE_BAR);
const std::string threadname = "Loading Keen Episode " + itoa(Episode);
const std::string threadname = "Loading Keen " + itoa(Episode);
struct GalaxyDataLoad : public Action
{
......
......@@ -44,6 +44,17 @@ processState(&CFlag::processFlying)
}
void CFlag::getTouchedBy(CSpriteObject &theObject)
{
if(m_baseframe != WAVING_BASEFRAME)
return;
if( CFlag *flag = dynamic_cast<CFlag*>(&theObject) )
{
flag->exists = false;
}
}
/**
* Main process cycle
*/
......
......@@ -26,6 +26,8 @@ public:
CFlag(CMap *pmap, const VectorD2<Uint32> &Location,
const VectorD2<Uint32> &Destination);
void getTouchedBy(CSpriteObject &theObject);
// The flag is flying when player throws it.
// It's waving all the time being stuck on the pole.
void process();
......
......@@ -623,7 +623,14 @@ void CPlayerWM::processLeavingTeleporter()
*/
void CPlayerWM::startLevel(Uint16 object)
{
int x, y;
int level = object - 0xC000;
Uint16 flag_dest = level + 0xF000;
if(mp_Map->findTile(flag_dest, &x, &y, 2) || g_pBehaviorEngine->m_option[OPT_LVLREPLAYABILITY].value || level >= 18)
{
g_pBehaviorEngine->m_EventList.add(new EventEnterLevel(object));
}
}
/*
......
......@@ -67,6 +67,8 @@ private:
int elevator_frames;
int waveTimer;
bool swimming;
std::vector<bool> mLevelDone;
void (CPlayerWM::*mProcessPtr)();
};
......
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