KO
games/dmmotor / src / Dm / Play / Mobj.php · commit 9d248a4
<?php/* * dmmotor — a map object: the player, a monster, an item, a missile, a decoration (mobj_t of p_mobj.h). * Copyright (C) 1993-1996 by id Software, Inc.; PHP port for dmmotor. GPL v2 (see LICENSE). */namespace App\Dm\Play;use App\Dm\Subsector;final class Mobj{    // position (map units, floats instead of fixed point)    public float $x = 0;    public float $y = 0;    public float $z = 0;    // sector links (thing list of the sector) and blockmap links    public ?Mobj $snext = null;    public ?Mobj $sprev = null;    public ?Mobj $bnext = null;    public ?Mobj $bprev = null;    public int $blockIndex = -1;    /** angle in radians, 0 = east, counter-clockwise */    public float $angle = 0;    public int $sprite = 0;    /** frame number, | 0x8000 = full bright */    public int $frame = 0;    public ?Subsector $subsector = null;    public float $floorZ = 0;    public float $ceilingZ = 0;    public float $radius = 0;    public float $height = 0;    public float $momX = 0;    public float $momY = 0;    public float $momZ = 0;    public int $validCount = 0;    public int $type = 0;    /** @var array<string,mixed> Info::MOBJINFO row */    public array $info = [];    public int $tics = 0;    public int $state = 0;    public int $flags = 0;    public int $health = 0;    /** movement direction (DI_*), 8 = none */    public int $moveDir = 8;    public int $moveCount = 0;    public ?Mobj $target = null;    public int $reactionTime = 0;    public int $threshold = 0;    public ?Player $player = null;    public int $lastLook = 0;    /** the map thing it was spawned from (respawn) */    public ?\App\Dm\MapThing $spawnPoint = null;    public ?Mobj $tracer = null;    /** removed from the world (P_RemoveMobj): its thinker stops */    public bool $removed = false;    public function __construct()    {    }}