public static GhostObject CreateObject(TFID id, GhostType type) { Console.WriteLine("GhostObject::CreateObject"); GhostObject obj; switch (type) { case GhostType.Creature: obj = new GhostCreature(); break; case GhostType.Vehicle: obj = new GhostVehicle(); break; case GhostType.Character: obj = new GhostCharacter(); break; case GhostType.Object: obj = new GhostObject(); break; default: throw new ArgumentException("Could not create GhostObject for not existing type!", "type"); } obj.Guid = id; return obj; }
public GhostObject() { Guid = new TFID(); WaitingForParent = true; UpdatePriorityScalar = 0.1f; NetFlags = new BitSet(); NetFlags.Set((UInt32) NetFlag.Ghostable); }
public void RemoveFromMap(TFID tfid) { if (_coList.ContainsKey(tfid)) _coList.Remove(tfid); }
public void AddEquip2(Object createMsg, TFID id, Int32 packetSize) { }
public ClonedObjectBase GetObject(TFID tfid) { return _coList.ContainsKey(tfid) ? _coList[tfid] : null; }
protected ClonedObjectBase() { DamageByMurderer = 0.0f; Faction = -1; LastServerUpdate = 0; TimeOfDeath = 0; HbOnReceiveHit = 0; HbOnDoHit = 0; HbCollision = 0; HbDeath = 0; HbKill = 0; HbStealth = 0; HbCancelSkills = 0; StatusBitField = 0; Scale = 1.0f; GameMass = 0.0f; Value = 0; CustomValue = -1; DeathType = DeathType.Silent; HPSkillScalar = 0.0f; HPSkillAdd = 0; RequiredLevelPrefixOffset = 0; RequiredLevel = -1; CoidCustomizedBy = -1L; MadeFromMemory = false; DistanceDrawOverride = 0; OverheadOffset = 0.0f; DamageState = 0; MangledName = ""; COID = new TFID { Coid = -1L, Global = false }; Bf388 &= 0xFFFFFFF0U; Bf380 = (Bf380 & 0xFFE22210U) | 0x22210U; Position = new Vector3(); Rotation = new Vector4(); Velocity = new Vector3(); AngularVelocity = new Vector3(); SetDirtyState(); TriggerEvents = new[] { -1L, -1L, -1L }; TerrainOffset = 0.0f; Murderer = new TFID { Coid = -1L, Global = false }; }
public void SetCOID(Int64 coid, Boolean global = true) { COID = new TFID { Coid = coid, Global = global }; }
public Creature() { TreasureRolls = 1; Possessor = new TFID { Coid = -1L, Global = false }; ; AttribTech = 1; AttribCombat = 1; AttribTheory = 1; AttribPerception = 1; PreferredAttackRange = 15.0f; DrivingTerrain = 0.0f; FlyingHeight = 0.0f; EnhancementId = -1; Mana = 0; MaxMana = 0; ManaModifier = 1.0f; ManaSkillScalar = 0.0f; ManaSkillAdd = 0; AttribTechModified = 0; AttribCombatModified = 0; AttribTheoryModified = 0; AttribPerceptionModified = 0; AngularDirection = 0; Level = 0; Analyzed = 0; CriticalHitOffenseCreature = 0.0f; CriticalHitOffenseVehicle = 0.0f; CriticalHitDefenseCreature = 0.0f; CriticalHitDefenseVehicle = 0.0f; RefireRateModifier = 1.0f; AggroRadiusModifier = 0.0f; Boost = 0.0f; AIFlags = 0; ForceSpawned = false; DoesntCountAsSummon = false; SummonerIsCharacter = false; Sleeping = false; ActivationCounter = 0; CurrentVehicleId = -1L; DynamicOnUseTrigger = -1L; DynamicOnUseReaction = -1L; SummonOwner = new TFID { Coid = -1L, Global = false }; ; DefensiveBonus = 0; OffensiveBonus = 0; Penetration = 0; Deflection = 0; AIState = 0; SummonDistance = 50.0f; SummonBaseDistance = 50.0f; SummonMode = 0; Wandering = false; IsMoving = false; StoppedToAttack = false; FixatedOnTarget = false; Transforming = false; Falling = false; CanGiveXPAndLoot = true; GivesSharedXPAndLoot = false; IsElite = false; IsUsingVehicle = false; TetherRange = 120.0f; PacketOverride = false; CanUsePowerDump = false; StatusEffectInvincibilityBitField = 0; MoveToTarget.X = 0.0f; MoveToTarget.Y = 0.0f; MoveToTarget.Z = 0.0f; MoveToTarget.W = 0.0f; Accucary = new Single[6]; DamageAddMax = new Int16[6]; DamageAddEquippedMax = new Int16[6]; DamageAddMin = new Int16[6]; DamageAddEquippedMin = new Int16[6]; Resists = new Int16[6]; StatusEffectInvincibility = new Int32[8]; StatusEffectCountingMutexCancelable = new Int32[8]; StatusEffectCountingMutexNonCancelable = new Int32[8]; AttackingAnimation = -1; TurretDirection = 0.0f; Encountered = false; CurrentTrailerCoid = -1L; }
public Vehicle() { _speedLimit = 76.0f; _possibleMaxSpeed = 0.0f; _canMelee = false; _isParked = false; _flipperActivated = false; _localCar = false; _justActivated = false; _drawTacArc = false; _drawTargets = false; _isManuallyAimingTurret = false; _hasAnyTargets = false; BrakeLock = false; _lockdown = false; VehicleIsActive = true; _stuntState = StuntState.None; _lastSentTarget = new TFID { Coid = -1L, Global = false }; ; _kmTravelled = 0.0f; _speed = 0.0f; _speedLastFrame = 0.0f; TurretDirection = 0.0f; _specialArmDirection = 0.0f; _maxWtWeaponFront = 0.0f; _maxWtWeaponTurret = 0.0f; _maxWtArmor = 0.0f; _maxWtPowerPlant = 0.0f; _lastSentBreaking = false; _lastSendFiring = false; Shield = 0x7FFFFFFF; MaxShield = 0; VehicleTemplateId = -1; HeatCurrent = 0; _heatAccumulator = 0; _packetOverride = false; PrimaryColor = 0; SecondaryColor = 0; _dirtyBits = 0U; _armorAdd = 0; _powerMaxAdd = 0; _heatMaxAdd = 0; _cooldownAdd = 0; _inventorySlots = 0; SpeedAdd = 1.0f; BrakesMaxTorqueFrontMultiplier = 1.0f; BrakesMaxTorqueRearAdjustMultiplier = 1.0f; SteeringMaxAngleMultiplier = 1.0f; SteeringFullSpeedLimitMultiplier = 1.0f; AVDNormalSpinDampeningMultiplier = 1.0f; AVDCollisionSpinDampeningAdjust = 1.0f; _torqueMaxAdd = 0; _armorAdjustVariance = 1.0f; _powerMaxAdjustVariance = 1.0f; _cooldownRateVariance = 1.0f; _hHeatMaxVariance = 1.0f; _speedAdjustVariance = 1.0f; _maxWtWeaponFrontVariance = 1.0f; _maxWtWeaponTurretVariance = 1.0f; _maxWtWeaponRearVariance = 1.0f; _maxWtArmorVariance = 1.0f; _maxWtPowerplantVariance = 1.0f; Trim = 0; _invetory = null; _hasInventory = true; _extraCredits = 0UL; Acceleration = 0.0f; Steering = 0.0f; Braking = true; _powerPlantCoid = -1L; _wheelSetCoid = -1L; _weaponsCoid = new[] { -1L, -1L, -1L }; _armorCoid = -1L; _trailerCoid = -1L; VehicleName = ""; _target3DPoint.X = 0.0f; _target3DPoint.Y = 0.0f; _target3DPoint.Z = 0.0f; _target3DPoint.W = 0.0f; TrickIds = new[] { -1, -1, -1, -1, -1, -1, -1, -1 }; TurretDirection = 0.0f; _wantedTurretDirection = 0.0f; _turret.X = 0.0f; _turret.Y = 0.0f; _turret.Z = 0.0f; _turret.W = 0.0f; _wheelWasOffGround = new[] { false, false, false, false, false, false }; _playSuspensionEffect = false; _nextSkid = 0.0f; _nextSuspension = 0.0f; _loadedLight = false; _wheelPhysicsBodyIndex = 0; _weapons = new Weapon[] { null, null, null }; CoidCurrentOwner = -1L; CurrentPathId = -1; SpawnOwnerCoid = -1; IsTrailer = false; }