-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
|
||
def player_move(p,x=0,y=0,z=0,xr=0,yr=90,on_ground=None,player=None): | ||
#print(p.y-y,p.on_ground) | ||
if p.on_ground: | ||
p.set_position(x,y,z) | ||
else: # if the player is not on ground | ||
if not p.flying: # and is not flying | ||
if p.y-y < 0 and p.y-y > -1: # and before this packet was sent he was 0 to 1 blocks higher | ||
self.falling_time=p.y-y/0.02 #0.02 seems to be the proportion between the initial height distance and the ticks the player will continue falling | ||
p.x,p.y,p.z,p.on_ground = (x,y,z,on_ground) |