Added falling damage #23

Merged
merged 3 commits into from Jan 5, 2013

Conversation

Projects
None yet
3 participants
Contributor

nickpoorman commented Jan 4, 2013

There are three new plugins.

player-fall - When a user falls determines damage to be done and fires a damage event on the player.
player-abilities - Used to keep track of when the user is flying for player-fall.
player-health - Modifies the player health on damage events.

plugins/player-fall.js
+ block_z = z & 0x0f,
+ block_y = y;
+
+ var that = this;
@SomeoneWeird

SomeoneWeird Jan 4, 2013

deoxxa will get angry at you for this :P so .bind(this) the function instead

plugins/player-abilities.js
+
+ if(player.mode != creativeMode) {
+ // something weird is happening here, lets log it
+ console.log('[Warning] Player client side game mode does not match server side!');
@SomeoneWeird

SomeoneWeird Jan 4, 2013

maybe change this to console.warn just so it prints to stderr

Owner

deoxxa commented Jan 5, 2013

Looks good, merging.

deoxxa added a commit that referenced this pull request Jan 5, 2013

@deoxxa deoxxa merged commit 92074f4 into deoxxa:master Jan 5, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment