private bool _spawned; // using my own spawn flag cause Actor.Spawned isn't being used right now public Projectile(PowerContext context, int actorSNO, Vector3D position) : base(context.World, actorSNO) { this.Field2 = 0x8; this.Field7 = 0x00000001; // TODO: test if this is necessary if (this.Scale == 0f) this.Scale = 1.00f; this.Context = context; this.Position = new Vector3D(position); // offset position by mpq collision data this.Position.Z += this.ActorData.Cylinder.Ax1 - this.ActorData.Cylinder.Position.Z; // 2 second default timeout for projectiles this.Timeout = new SecondsTickTimer(context.World.Game, 2f); // copy in important effect params from user this.Attributes[GameAttribute.Rune_A, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_A, context.PowerSNO]; this.Attributes[GameAttribute.Rune_B, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_B, context.PowerSNO]; this.Attributes[GameAttribute.Rune_C, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_C, context.PowerSNO]; this.Attributes[GameAttribute.Rune_D, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_D, context.PowerSNO]; this.Attributes[GameAttribute.Rune_E, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_E, context.PowerSNO]; _prevUpdatePosition = null; _mover = new ActorMover(this); _spawned = false; }
private bool _spawned; // using my own spawn flag cause Actor.Spawned isn't being used right now public Projectile(PowerContext context, int actorSNO, Vector3D position) : base(context.World, actorSNO) { this.Field2 = 0x8; this.Field7 = 0x00000001; // TODO: test if this is necessary if (this.Scale == 0f) { this.Scale = 1.00f; } this.Context = context; this.Position = new Vector3D(position); // offset position by mpq collision data this.Position.Z += this.ActorData.Cylinder.Ax1 - this.ActorData.Cylinder.Position.Z; // 2 second default timeout for projectiles this.Timeout = new SecondsTickTimer(context.World.Game, 2f); // copy in important effect params from user this.Attributes[GameAttribute.Rune_A, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_A, context.PowerSNO]; this.Attributes[GameAttribute.Rune_B, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_B, context.PowerSNO]; this.Attributes[GameAttribute.Rune_C, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_C, context.PowerSNO]; this.Attributes[GameAttribute.Rune_D, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_D, context.PowerSNO]; this.Attributes[GameAttribute.Rune_E, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_E, context.PowerSNO]; _prevUpdatePosition = null; _mover = new ActorMover(this); _spawned = false; }
public PowerAction(Actor owner, int powerSNO) : base(owner) { _power = PowerLoader.CreateImplementationForPowerSNO(powerSNO); _power.User = owner; _powerRan = false; _baseAttackRadius = this.Owner.ActorData.Cylinder.Ax2 + _power.EvalTag(PowerKeys.AttackRadius) + 1.5f; _ownerMover = new ActorMover(owner); }