Found the culprit for bug #45
This commit is contained in:
@@ -223,6 +223,7 @@ std::list<BoundingBox> World::GenerateCollisionGrid(Entity* ptr, int tileWidth,
|
|||||||
//inner loop
|
//inner loop
|
||||||
wallBounds.y = snapToBase((double)wallBounds.h, ptr->GetOrigin().y);
|
wallBounds.y = snapToBase((double)wallBounds.h, ptr->GetOrigin().y);
|
||||||
while(wallBounds.y < (ptr->GetOrigin() + ptr->GetBounds()).y + ptr->GetBounds().h) {
|
while(wallBounds.y < (ptr->GetOrigin() + ptr->GetBounds()).y + ptr->GetBounds().h) {
|
||||||
|
//BUG: #45 this is the culprit; it's pulling regions into existance
|
||||||
//check to see if this tile is solid
|
//check to see if this tile is solid
|
||||||
if (regionPager.GetSolid(wallBounds.x / wallBounds.w, wallBounds.y / wallBounds.h)) {
|
if (regionPager.GetSolid(wallBounds.x / wallBounds.w, wallBounds.y / wallBounds.h)) {
|
||||||
//push onto the box set
|
//push onto the box set
|
||||||
|
|||||||
@@ -241,6 +241,12 @@ void World::KeyDown(SDL_KeyboardEvent const& event) {
|
|||||||
//TODO: (3) the escape key should actually control menus and stuff
|
//TODO: (3) the escape key should actually control menus and stuff
|
||||||
SendLogoutRequest();
|
SendLogoutRequest();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case SDLK_SPACE:
|
||||||
|
//DEBUG: testing bug #45
|
||||||
|
//reset the map
|
||||||
|
regionPager.UnloadAll();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//character movement
|
//character movement
|
||||||
|
|||||||
@@ -29,12 +29,13 @@
|
|||||||
//static functions
|
//static functions
|
||||||
//-------------------------
|
//-------------------------
|
||||||
|
|
||||||
|
//TODO: proper checksum
|
||||||
static int regionChecksum(Region* const region) {
|
static int regionChecksum(Region* const region) {
|
||||||
int sum = 0;
|
int sum = 0;
|
||||||
for(int i = 0; i < REGION_WIDTH; i++) {
|
for(int i = 0; i < REGION_WIDTH; i++) {
|
||||||
for (int j = 0; j < REGION_HEIGHT; j++) {
|
for (int j = 0; j < REGION_HEIGHT; j++) {
|
||||||
for (int k = 0; k < REGION_DEPTH; k++) {
|
for (int k = 0; k < REGION_DEPTH; k++) {
|
||||||
sum += region->GetTile(i, j, k);
|
sum |= region->GetTile(i, j, k);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ SplashScreen::~SplashScreen() {
|
|||||||
//-------------------------
|
//-------------------------
|
||||||
|
|
||||||
void SplashScreen::FrameStart() {
|
void SplashScreen::FrameStart() {
|
||||||
|
//TODO: config flag to change the delay
|
||||||
if (std::chrono::steady_clock::now() - startTick > std::chrono::duration<int>(3)) {
|
if (std::chrono::steady_clock::now() - startTick > std::chrono::duration<int>(3)) {
|
||||||
SetSceneSignal(SceneSignal::MAINMENU);
|
SetSceneSignal(SceneSignal::MAINMENU);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user