Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Stairs, teleportation, and mob disappearing when they shouldn't. #4291

Merged
merged 19 commits into from Nov 17, 2013

Conversation

Projects
None yet
2 participants
@freezerbunny
Copy link
Contributor

commented Nov 11, 2013

#4286

Fixes a lot of things related to disappearing mobs, including going upstairs/downstairs.

If you went up/down stairs, the mobs around you would vanish when you come back.
If you load the game, the monsters that loaded around you wouldn't be stored to the map buffer and would eventually disappear when you went off screen.
If you teleport, the monsters in your current grid aren't saved to the map buffer, so will disappear when you go back.

The above three issues are fixed.

Also fixes the stair buffer, so mobs can actually use stairs and won't disappear, and saves it to file so they don't vanish when they're using the stairs.
Mobs will also now come out of the stairs they should. Previously they came out of the first stairs found by looping from a random location in the submap... which meant zombies could come out stairs from other houses' basements instead of the one the player is in.

Plus, improved functionality:
http://i.imgur.com/NmNIySr.png
Mobs can block you from using the stairs. You can try to slip past using a dex roll, or push past with a strength roll.
The mobs will still be stored in the stair buffer so they'll pop out again. Before, the stair buffer was being wiped so they'd get lost in the stairs.

http://i.imgur.com/x92uJHz.png
Because stairs are now fixed, the player can potentially block mobs infinitely by standing on the exit.
Now, I've allowed zombies to try and push you back. There's a chance for you to stumble, meaning you won't be able to simply go back on the stair tile.
This means the zombie will be able to get out, and prevents a potential exploit.

If the zombie can't push you back for whatever reason (e.g. surrounded by obstacles), he will attack you instead, giving incentive for the player to try to slip past instead, or to unblock the stairs.

freezerbunny added some commits Nov 11, 2013

@freezerbunny

This comment has been minimized.

Copy link
Contributor Author

commented Nov 11, 2013

Saves zombies to the buffer when teleporting. Properly handles stair zombies.

freezerbunny added some commits Nov 11, 2013

@freezerbunny

This comment has been minimized.

Copy link
Contributor Author

commented Nov 11, 2013

We need to save monsters that are on the stairs, or they vanish when loaded.

Made monsters able to block the stairs so they don't vanish if the player goes up/down quickly.

@freezerbunny

This comment has been minimized.

Copy link
Contributor Author

commented Nov 12, 2013

Okay. That's it done.

It's pretty awesome too.

@freezerbunny

This comment has been minimized.

Copy link
Contributor Author

commented Nov 12, 2013

Updating stair search code so it doesn't just randomly find any stairs.

@freezerbunny

This comment has been minimized.

Copy link
Contributor Author

commented Nov 12, 2013

freezerbunny added some commits Nov 12, 2013

Fix self referencing comparison.
Signed-off-by: freezerbunny <freezerbunny92@gmail.com>

@kevingranade kevingranade merged commit 676cf84 into CleverRaven:master Nov 17, 2013

1 check passed

default Merged build finished.
Details

@freezerbunny freezerbunny deleted the freezerbunny:mob-despawn-fix branch Dec 2, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.