mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
pathfinder was changed, 102 bug fixed
This commit is contained in:
parent
2ea5fcd034
commit
7b66cd0250
10 changed files with 424 additions and 160 deletions
|
|
@ -77,8 +77,8 @@ require_once(FILE_PATH . "/src/math/Vector3.php");
|
|||
require_once(FILE_PATH . "/src/world/Position.php");
|
||||
require_once(FILE_PATH . "/src/pmf/PMF.php");
|
||||
|
||||
require_once(FILE_PATH . "/src/utils/pathfinder/PathNode.php");
|
||||
require_once(FILE_PATH . "/src/utils/pathfinder/Path.php");
|
||||
require_once(FILE_PATH . "/src/utils/pathfinder/astar/Node.php");
|
||||
require_once(FILE_PATH . "/src/utils/pathfinder/astar/AStar.php");
|
||||
|
||||
require_once(FILE_PATH . "/src/entity/Rideable.php");
|
||||
require_once(FILE_PATH . "/src/entity/Attachable.php");
|
||||
|
|
|
|||
|
|
@ -141,6 +141,11 @@ class Entity extends Position{
|
|||
}
|
||||
}
|
||||
|
||||
public function setVelocity($vX, $vY, $vZ){
|
||||
$this->motionX = $vX;
|
||||
$this->motionY = $vY;
|
||||
$this->motionZ = $vZ;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $e Entity instance or EID
|
||||
|
|
@ -492,7 +497,7 @@ class Entity extends Position{
|
|||
}
|
||||
|
||||
if($support === false){
|
||||
$this->speedY -= $this->class === ENTITY_FALLING ? 0.08 : 1.6;
|
||||
$this->speedY -= $this->class === ENTITY_FALLING ? 0.08 : 0.04; //TODO: replace with $gravity
|
||||
$update = true;
|
||||
}else{
|
||||
//$this->speedX = 0;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ class Pig extends Animal{
|
|||
const TYPE = MOB_PIG;
|
||||
public $pathFinder, $path, $server;
|
||||
public function __construct(Level $level, $eid, $class, $type = 0, $data = array()){
|
||||
$this->pathFinder = new AStar($this); //make it before everything else as entity class constructor sends update
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"]:10, "generic");
|
||||
$this->server = ServerAPI::request();
|
||||
|
|
@ -19,4 +20,12 @@ class Pig extends Animal{
|
|||
array(($this->fire > 0 ? COOKED_PORKCHOP:RAW_PORKCHOP), 0, mt_rand(0,2)),
|
||||
);
|
||||
}
|
||||
|
||||
public function update(){
|
||||
//$start = new MinecraftNode(round($this->x), round($this->y), round($this->z));
|
||||
//$stop = $start->add(5,0,5);
|
||||
//$path = $this->pathFinder->findPath($start, $stop); //allows diagonals, path should be ~5 blocks
|
||||
//var_dump($path);
|
||||
parent::update();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
98
src/utils/pathfinder/MinecraftNode.php
Normal file
98
src/utils/pathfinder/MinecraftNode.php
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
<?php
|
||||
|
||||
class MinecraftNode extends Node
|
||||
{
|
||||
public $nodes = null;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @see Node::__toString()
|
||||
*/
|
||||
public function __construct($x, $y, $z){
|
||||
parent::__construct($x, $y, $z);
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
return "MinecraftNode({$this->x}, {$this->y}, {$this->z})";
|
||||
}
|
||||
public function add($x = 0, $y = 0, $z = 0){
|
||||
return new MinecraftNode($x+$this->x, $y+$this->y, $z+$this->z);
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @see Node::getOwnCost()
|
||||
*/
|
||||
public function getOwnCost()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public function getParentAndCleanSelf(){
|
||||
try{
|
||||
return $this->parent;
|
||||
}finally{
|
||||
$this->parent = null;
|
||||
$this->nodes = null;
|
||||
}
|
||||
}
|
||||
|
||||
public function generateAdjNodes(AStar $pf)
|
||||
{
|
||||
$this->nodes = [];
|
||||
for($x = -1; $x <= 1; $x++){
|
||||
for($z = -1; $z <= 1; $z++){
|
||||
$node = new MinecraftNode($x + $this->x, $this->y, $z + $this->z);
|
||||
if(!$node->canMoveHere($pf)){
|
||||
console("[DEBUG] Obstacle at $node");
|
||||
continue;
|
||||
}
|
||||
$this->nodes[] = $node;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @see Node::getAdjacentNodes()
|
||||
*/
|
||||
public function getAdjacentNodes(AStar $pf)
|
||||
{
|
||||
if($this->nodes === null){
|
||||
$this->generateAdjNodes($pf);
|
||||
}
|
||||
return $this->nodes;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @see Node::equals()
|
||||
*/
|
||||
public function equals(Node $node)
|
||||
{
|
||||
return $node->x === $this->x && $this->z === $node->z;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @see Node::getHCost()
|
||||
*/
|
||||
public function getHCost(Node $target)
|
||||
{
|
||||
return abs($target->x - $this->x) + abs($target->z - $this->z);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @see Node::canMoveHere()
|
||||
*/
|
||||
|
||||
public function canMoveHere(AStar $pf)
|
||||
{
|
||||
return !$pf->entity->level->getBlockWithoutVector($this->x, $this->y, $this->z)->isSolid;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<?php
|
||||
|
||||
class Path{
|
||||
public $points = [];
|
||||
public $currentPointIndex = 0;
|
||||
public function addPoint(Node $point){
|
||||
$this->points[] = $point;
|
||||
}
|
||||
|
||||
public function getPointAndIncreaseIndex(){
|
||||
return $this->points[$this->currentPointIndex++];
|
||||
}
|
||||
|
||||
public function increaseIndexAndGetPoint(){
|
||||
return isset($this->points[$this->currentPointIndex + 1]) ? $this->points[++$this->currentPointIndex] : null;
|
||||
}
|
||||
|
||||
public function finish(){
|
||||
$this->points = array_reverse($this->points);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
|
||||
class Node{
|
||||
public $g, $h, $f, $parent;
|
||||
public $x, $y, $z;
|
||||
public function __construct($x, $y, $z, $parent, $g = "U", $h = "U", $f = "U"){
|
||||
$this->x = $x;
|
||||
$this->y = $y;
|
||||
$this->z = $z;
|
||||
$this->parent = $parent;
|
||||
$this->g = $g;
|
||||
$this->h = $h;
|
||||
$this->f = $f;
|
||||
}
|
||||
public function __toString(){
|
||||
return "PathNode(x={$this->x}, y={$this->y}, z ={$this->z}, g={$this->g}, h={$this->h}, f={$this->f})";
|
||||
}
|
||||
public function calcH($endNode){
|
||||
return pow(($endNode->x - $this->x), 2) + pow(($endNode->y - $this->y), 2) + pow(($endNode->z - $this->z), 2);
|
||||
}
|
||||
|
||||
public function calcF(){
|
||||
return $this->h + $this->g;
|
||||
}
|
||||
|
||||
public static function loadFromVector3($v3, $parent = null){
|
||||
return new Node($v3->x, $v3->y, $v3->z, $parent, 0, 0, 0);
|
||||
}
|
||||
|
||||
public function equals($n){
|
||||
return $n->x == $this->x && $n->y == $this->y && $n->z == $this->z;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
<?php
|
||||
|
||||
class Pathfinder{
|
||||
const NO_PATH_FOUND = "NO_PATH";
|
||||
private $entity;
|
||||
private $openList, $closedList;
|
||||
|
||||
public function __construct($entity, $avoidWater = true){ //avoid - WIP
|
||||
$this->entity = $entity;
|
||||
}
|
||||
|
||||
public function updateEntityPos($x, $y, $z){
|
||||
$this->entity->x = $x;
|
||||
$this->entity->y = $y;
|
||||
$this->entity->z = $z;
|
||||
}
|
||||
|
||||
public function buildTo($end){
|
||||
$goal = Node::loadFromVector3($end); //247 68 215
|
||||
$this->openList[] = new Node(ceil($this->entity->x), ceil($this->entity->y), ceil($this->entity->z), 0, 0, 0);
|
||||
$this->closedList = [];
|
||||
$cnt = 0;
|
||||
while(!empty($this->openList)){
|
||||
$currentIndex = 0;
|
||||
$currentNode = $this->openList[$currentIndex];
|
||||
foreach($this->openList as $index => $node){
|
||||
if($node->f < $currentNode->f){
|
||||
$currentIndex = $index;
|
||||
$currentNode = $node;
|
||||
}
|
||||
}
|
||||
array_splice($this->openList, $currentIndex, 1);
|
||||
$this->closedList[] = $currentNode;
|
||||
if($currentNode->equals($goal)){
|
||||
$path = new Path();
|
||||
$current = $currentNode;
|
||||
while($current != null){
|
||||
$path->addPoint($current);
|
||||
$current = $current->parent;
|
||||
}
|
||||
$path->finish();
|
||||
return $path;
|
||||
}
|
||||
$children = [];
|
||||
//y was removed
|
||||
for($x = -1; $x <= 1; $x++){
|
||||
for($z = -1; $z <= 1; $z++){
|
||||
$nodePosition = new Vector3($currentNode->x + $x, $currentNode->y, $currentNode->z + $z);
|
||||
if(!$this->isPositionValid($nodePosition)){
|
||||
continue;
|
||||
}
|
||||
if($currentNode->equals($nodePosition)){
|
||||
continue;
|
||||
}
|
||||
$node = Node::loadFromVector3($nodePosition, $currentNode);
|
||||
$children[] = $node;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($children as $child){
|
||||
foreach($this->closedList as $closed){
|
||||
if($child->equals($closed)){
|
||||
goto exitLoopLbl;
|
||||
}
|
||||
}
|
||||
exitLoopLbl:
|
||||
$child->g = $currentNode->g + 1;
|
||||
$child->h = $child->calcH($end);
|
||||
$child->f = $child->g + $child->h;
|
||||
|
||||
$this->openList[] = $child;
|
||||
|
||||
}
|
||||
|
||||
$cnt++;
|
||||
if($cnt === 6){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return Pathfinder::NO_PATH_FOUND;
|
||||
|
||||
}
|
||||
|
||||
public function isPositionValid($nodePosition){
|
||||
return $nodePosition->x >= 0 && $nodePosition->x < 256 && $nodePosition->y > 0 && $nodePosition->y < 128 && $nodePosition->z >= 0 && $nodePosition->z < 256 && $this->isEmpty($nodePosition);
|
||||
}
|
||||
public function distanceBetween($p1, $p2){
|
||||
return sqrt(pow(($p1->x - $p2->x),2) + pow(($p1->y - $p2->y),2) + pow(($p1->z - $p2->z),2));
|
||||
}
|
||||
|
||||
public function isEmpty($v3){
|
||||
return !$this->entity->level->getBlock($v3)->isSolid;
|
||||
}
|
||||
|
||||
}
|
||||
167
src/utils/pathfinder/astar/AStar.php
Normal file
167
src/utils/pathfinder/astar/AStar.php
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
<?php
|
||||
/*
|
||||
MIT License
|
||||
Copyright (c) 2014 Peter Petermann
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class AStar
|
||||
*
|
||||
*/
|
||||
class AStar
|
||||
{
|
||||
/**
|
||||
* @var Node[]
|
||||
*/
|
||||
protected $open = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $closed = [];
|
||||
/**
|
||||
* @var Entity
|
||||
*/
|
||||
public $entity;
|
||||
|
||||
public function __construct(&$entity){
|
||||
$this->entity = $entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* find a path from Node $start to Node $end
|
||||
* @param Node $start
|
||||
* @param Node $end
|
||||
* @param number $maxOffset
|
||||
* @return array|Node[]
|
||||
*/
|
||||
public function findPath(Node $start, Node $end)
|
||||
{
|
||||
// no path if there is no need for moving
|
||||
if ($start->equals($end)) {
|
||||
//console("[DEBUG] $start equals $end, route is empty");
|
||||
return [];
|
||||
}
|
||||
if(!$end->canMoveHere($this)){
|
||||
//console("[DEBUG] $end is not accessible, path will not be found");
|
||||
return false;
|
||||
}
|
||||
$maxOffsetX = abs($start->x - $end->x);
|
||||
$maxOffsetZ = abs($start->z - $end->z);
|
||||
|
||||
$this->addToOpen($start);
|
||||
|
||||
$foundTarget = false;
|
||||
|
||||
while (!$foundTarget && count($this->open) > 0) {
|
||||
//console("[DEBUG] sorting open nodes by cost. Node count:" . count($this->open));
|
||||
uasort(
|
||||
$this->open,
|
||||
function (Node $a, Node $b) use ($end) {
|
||||
return $a->getFCost($end) - $b->getFCost($end);
|
||||
}
|
||||
);
|
||||
|
||||
/** @var Node $current */
|
||||
$current = $this->open[array_keys($this->open)[0]];
|
||||
unset($this->open[array_keys($this->open)[0]]);
|
||||
|
||||
//console("[DEBUG] current node selected: " . $current);
|
||||
|
||||
if ((string)$current == (string)$end) {
|
||||
$foundTarget = $current;
|
||||
//console("[DEBUG] current node is target node, exiting loop");
|
||||
continue;
|
||||
}
|
||||
|
||||
$adjacent = $current->getAdjacentNodes($this);
|
||||
|
||||
foreach ($adjacent as $node) {
|
||||
if (in_array((string)$node, $this->closed)) {
|
||||
//console("[DEBUG] skipping adjacent: $node as it was already processed");
|
||||
continue;
|
||||
}
|
||||
$node->setParent($current);
|
||||
$this->addToOpen($node);
|
||||
}
|
||||
$this->addToClosed($current);
|
||||
|
||||
}
|
||||
|
||||
// we failed to find a route
|
||||
if (!$foundTarget && count($this->open) == 0) {
|
||||
//console("[DEBUG] no open nodes left, and no target found.");
|
||||
return false;
|
||||
}
|
||||
|
||||
//console("[DEBUG] found route!");
|
||||
/** @var Node $foundTarget */
|
||||
try{
|
||||
return $this->createRouteList($foundTarget);
|
||||
}finally{ //removing all elements from them
|
||||
$this->closed = [];
|
||||
$this->open = [];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Node $node
|
||||
*/
|
||||
protected function addToOpen(Node $node)
|
||||
{
|
||||
if (
|
||||
isset($this->open[(string)$node])
|
||||
&& $this->open[(string)$node]->getGCost() < $node->getGCost()
|
||||
) {
|
||||
//console("[DEBUG] skipping add, $node is already known and gcost <= new path");
|
||||
return;
|
||||
}
|
||||
//console("[DEBUG] adding new open node: $node");
|
||||
$this->open[(string)$node] = $node;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Node $node
|
||||
*/
|
||||
protected function addToClosed(Node $node)
|
||||
{
|
||||
//console("[DEBUG] adding $node to closed");
|
||||
$this->closed[] = (string)$node;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Node $foundTarget
|
||||
* @return Node[]
|
||||
*/
|
||||
protected function createRouteList(Node $foundTarget)
|
||||
{
|
||||
$route = [];
|
||||
$route[] = $foundTarget;
|
||||
|
||||
while ($foundTarget = $foundTarget->getParentAndCleanSelf()) {
|
||||
$route[] = $foundTarget;
|
||||
}
|
||||
$route = array_reverse($route);
|
||||
|
||||
return $route;
|
||||
}
|
||||
}
|
||||
136
src/utils/pathfinder/astar/Node.php
Normal file
136
src/utils/pathfinder/astar/Node.php
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
<?php
|
||||
/*
|
||||
MIT License
|
||||
Copyright (c) 2014 Peter Petermann
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
abstract class Node extends Vector3
|
||||
{
|
||||
/**
|
||||
* @var Node|bool
|
||||
*/
|
||||
protected $parent = false;
|
||||
|
||||
/**
|
||||
* @var int|float
|
||||
*/
|
||||
protected $gCost;
|
||||
|
||||
/**
|
||||
* @param Node $parent
|
||||
*/
|
||||
public function setParent(Node $parent)
|
||||
{
|
||||
$this->parent = $parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Node|bool
|
||||
*/
|
||||
public function getParent()
|
||||
{
|
||||
return $this->parent;
|
||||
}
|
||||
|
||||
public function getParentAndCleanSelf(){
|
||||
try{
|
||||
return $this->parent;
|
||||
}finally{
|
||||
$this->parent = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int|float
|
||||
*/
|
||||
public function getGCost()
|
||||
{
|
||||
if(is_null($this->gCost)) {
|
||||
$this->gCost =
|
||||
$this->parent ? $this->parent->getGCost() + $this->getOwnCost() : $this->getOwnCost();
|
||||
}
|
||||
|
||||
return $this->gCost;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Node $target
|
||||
* @return float|int
|
||||
*/
|
||||
public function getFCost(Node $target)
|
||||
{
|
||||
return $this->getGCost() + $this->getHCost($target);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int|float
|
||||
*/
|
||||
abstract public function getOwnCost();
|
||||
|
||||
/**
|
||||
* @param Node $target
|
||||
* @return int|float
|
||||
*/
|
||||
abstract public function getHCost(Node $target);
|
||||
|
||||
/**
|
||||
* @param AStar $pf
|
||||
* @return Node[]
|
||||
*/
|
||||
abstract public function getAdjacentNodes(AStar $pf);
|
||||
|
||||
/**
|
||||
* @param Node $compareTo
|
||||
* @return bool
|
||||
*/
|
||||
abstract public function equals(Node $compareTo);
|
||||
|
||||
/**
|
||||
* Check can this point be used
|
||||
* @param AStar $pf
|
||||
* @return bool
|
||||
*/
|
||||
abstract public function canMoveHere(AStar $pf);
|
||||
|
||||
/**
|
||||
* should return a unique string for this
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString(){
|
||||
return parent::__toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* this method should allow a node
|
||||
* to get the data from the target node getHostCost requires for its heuristic (if needed)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getDataForH()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
|
@ -35,12 +35,12 @@ class Level{
|
|||
|
||||
public function getCubes(AxisAlignedBB $aABB) {
|
||||
$aABBs = [];
|
||||
$x0 = (int)$aABB->minX;
|
||||
$x1 = (int)($aABB->maxX + 1.0);
|
||||
$y0 = (int)$aABB->minY;
|
||||
$y1 = (int)($aABB->maxY + 1.0);
|
||||
$z0 = (int)$aABB->minZ;
|
||||
$z1 = (int)($aABB->maxZ + 1.0);
|
||||
$x0 = floor($aABB->minX);
|
||||
$x1 = ceil($aABB->maxX + 1.0);
|
||||
$y0 = floor($aABB->minY);
|
||||
$y1 = ceil($aABB->maxY + 1.0);
|
||||
$z0 = floor($aABB->minZ);
|
||||
$z1 = ceil($aABB->maxZ + 1.0);
|
||||
$x0 = $x0 < 0 ? 0 : $x0;
|
||||
$y0 = $y0 < 0 ? 0 : $y0;
|
||||
$z0 = $z0 < 0 ? 0 : $z0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue