Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up[BUGFIX] Stairs, teleportation, and mob disappearing when they shouldn't. #4291
Conversation
freezerbunny
added some commits
Nov 11, 2013
This comment has been minimized.
This comment has been minimized.
|
Saves zombies to the buffer when teleporting. Properly handles stair zombies. |
freezerbunny
added some commits
Nov 11, 2013
This comment has been minimized.
This comment has been minimized.
|
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
added some commits
Nov 11, 2013
This comment has been minimized.
This comment has been minimized.
|
Okay. That's it done. It's pretty awesome too. |
freezerbunny
added some commits
Nov 12, 2013
This comment has been minimized.
This comment has been minimized.
|
Updating stair search code so it doesn't just randomly find any stairs. |
This comment has been minimized.
This comment has been minimized.
freezerbunny
added some commits
Nov 12, 2013
kevingranade
merged commit 676cf84
into
CleverRaven:master
Nov 17, 2013
1 check passed
default
Merged build finished.
Details
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
freezerbunny commentedNov 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.