public void Unlink() { if (!linked) throw new InvalidOperationException(); linked = false; if (!nosector) UnlinkSector(); if (block != null) { if (nextinblock != null) nextinblock.previnblock = previnblock; if (previnblock != null) previnblock.nextinblock = nextinblock; else block.FirstActor = nextinblock; block = null; } }
public Actor(World world) : base(world) { this.linked = false; this.block = null; this.nextinblock = null; this.previnblock = null; // TODO :: x // TODO :: y // TODO :: z // TODO :: angle // TODO :: spritenum // TODO :: spriteframe // TODO :: radius // TODO :: height // TODO :: xmomentum // TODO :: ymomentum // TODO :: zmomentum // TODO :: ticks // TODO :: statenum // TODO :: special // TODO :: solid // TODO :: shootable // TODO :: nosector // TODO :: noblockmap // TODO :: ambush // TODO :: justhit // TODO :: justattacked // TODO :: spawnceiling // TODO :: nogravity // TODO :: dropoff // TODO :: pickup // TODO :: noclip // TODO :: slide // TODO :: float // TODO :: teleport // TODO :: missile // TODO :: dropped // TODO :: shadow // TODO :: noblood // TODO :: corpse // TODO :: infloat // TODO :: countkill // TODO :: countitem // TODO :: skullfly // TODO :: notdmatch // TODO :: health // TODO :: movementdirection // TODO :: movementcount // TODO :: target // TODO :: reactiontime // TODO :: lastlook // TODO :: tracer this.speed = Fixed.Zero; this.mass = 100; this.damage = 0; this.painchance = 0; this.seesoundnum = 0; this.activesoundnum = 0; this.attacksoundnum = 0; this.painsoundnum = 0; this.deathsoundnum = 0; this.species = GetType(); this.states = new Dictionary<string,int>(); DefineState("Spawn",0); }
public void Link() { if (linked) throw new InvalidOperationException(); linked = true; LinkSubsector(); if (!nosector) LinkSector(); if (!noblockmap) { int blockx = (x - World.Blockmap.XOffset).IntValue / 128; int blocky = (y - World.Blockmap.YOffset).IntValue / 128; if (blockx >= 0 && blockx < World.Blockmap.Width && blocky >= 0 && blocky < World.Blockmap.Height) { block = World.Blockmap[blockx,blocky]; nextinblock = block.FirstActor; previnblock = null; if (nextinblock != null) nextinblock.previnblock = this; block.FirstActor = this; } } }