mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 04:29:43 +00:00
fixed dismounting
This commit is contained in:
parent
5e57b64e34
commit
4430ab5b65
1 changed files with 4 additions and 4 deletions
|
|
@ -170,7 +170,7 @@ class Entity extends Position
|
||||||
switch($this->class) {
|
switch($this->class) {
|
||||||
case ENTITY_PLAYER:
|
case ENTITY_PLAYER:
|
||||||
$this->player = $this->data["player"];
|
$this->player = $this->data["player"];
|
||||||
$this->setHealth($this->health, "generic");
|
$this->setHealth($this->health, "generic", allowHarm: false);
|
||||||
$this->speedModifer = 1;
|
$this->speedModifer = 1;
|
||||||
$this->width = 0.6;
|
$this->width = 0.6;
|
||||||
$this->height = 1.8;
|
$this->height = 1.8;
|
||||||
|
|
@ -185,7 +185,7 @@ class Entity extends Position
|
||||||
$this->x = $this->data["TileX"] ?? $this->x;
|
$this->x = $this->data["TileX"] ?? $this->x;
|
||||||
$this->y = $this->data["TileY"] ?? $this->y;
|
$this->y = $this->data["TileY"] ?? $this->y;
|
||||||
$this->z = $this->data["TileZ"] ?? $this->z;
|
$this->z = $this->data["TileZ"] ?? $this->z;
|
||||||
$this->setHealth(1, "generic");
|
$this->setHealth(1, "generic", allowHarm: false);
|
||||||
$this->stepHeight = false;
|
$this->stepHeight = false;
|
||||||
$this->setSize(1, 1);
|
$this->setSize(1, 1);
|
||||||
break;
|
break;
|
||||||
|
|
@ -1478,11 +1478,11 @@ class Entity extends Position
|
||||||
if(isset($this->level->entityList[$this->linkedEntity])){
|
if(isset($this->level->entityList[$this->linkedEntity])){
|
||||||
$e = $this->level->entityList[$this->linkedEntity];
|
$e = $this->level->entityList[$this->linkedEntity];
|
||||||
if(!$e->dead && !$e->closed){
|
if(!$e->dead && !$e->closed){
|
||||||
$this->linkedEntity = 0;
|
|
||||||
$e->linkedEntity = 0;
|
|
||||||
$this->server->api->dhandle("entity.link", ["rider" => $this->eid, "riding" => -1, "type" => 1]);
|
$this->server->api->dhandle("entity.link", ["rider" => $this->eid, "riding" => -1, "type" => 1]);
|
||||||
$this->server->api->dhandle("entity.link", ["rider" => $this->linkedEntity, "riding" => -1, "type" => 1]);
|
$this->server->api->dhandle("entity.link", ["rider" => $this->linkedEntity, "riding" => -1, "type" => 1]);
|
||||||
$this->isRider = false;
|
$this->isRider = false;
|
||||||
|
$this->linkedEntity = 0;
|
||||||
|
$e->linkedEntity = 0;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$this->linkedEntity = 0;
|
$this->linkedEntity = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue