Inheritance: IDisposable
Beispiel #1
0
        public virtual void ApplyImpulse(idEntity entity, int id, Vector3 point, Vector3 impulse)
        {
            if (this.Disposed == true)
            {
                throw new ObjectDisposedException(this.GetType().Name);
            }

            idConsole.Warning("TODO: idEntity.ApplyImpulse");
        }
Beispiel #2
0
        public virtual void Teleport(Vector3 origin, idAngles angles, idEntity destination)
        {
            if (this.Disposed == true)
            {
                throw new ObjectDisposedException(this.GetType().Name);
            }

            idConsole.Warning("TODO: idEntity.Teleport");
        }
Beispiel #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="inflictor">Entity that is causing the damage.</param>
        /// <param name="attacker">Entity that caused the inflictor to cause damage to us.</param>
        /// <param name="direction">Direction of the attack for knockback in global space.</param>
        /// <param name="damageDefName"></param>
        /// <param name="damageScale"></param>
        /// <param name="location"></param>
        public virtual void Damage(idEntity inflictor, idEntity attacker, Vector3 direction, string damageDefName, float damageScale, int location)
        {
            if (this.Disposed == true)
            {
                throw new ObjectDisposedException(this.GetType().Name);
            }

            idConsole.Warning("TODO: idEntity.Damage");
        }
Beispiel #4
0
        public virtual object GetImpactInfo(idEntity entity, int id, Vector3 point)
        {
            if (this.Disposed == true)
            {
                throw new ObjectDisposedException(this.GetType().Name);
            }

            idConsole.Warning("TODO: idEntity.GetImpactInfo");

            return(null);
        }
Beispiel #5
0
        /// <summary>
        ///
        /// </summary>
        /// <remarks>
        /// May not change the game state whatsoever!
        /// </remarks>
        /// <param name="renderEntity"></param>
        /// <param name="renderView"></param>
        /// <returns></returns>
        protected bool ModelCallback(idRenderEntity renderEntity, idRenderView renderView)
        {
            idEntity ent = idR.Game.Entities[renderEntity.EntityIndex];

            if (ent == null)
            {
                idConsole.Error("idEntity::ModelCallback: callback with null game entity");
            }

            return(ent.UpdateRenderEntity(renderEntity, renderView));
        }
Beispiel #6
0
		public virtual void ApplyImpulse(idEntity entity, int id, Vector3 point, Vector3 impulse)
		{
			if(this.Disposed == true)
			{
				throw new ObjectDisposedException(this.GetType().Name);
			}

			idConsole.Warning("TODO: idEntity.ApplyImpulse");	
		}
Beispiel #7
0
		public void RemoveContactEntity(idEntity entity)
		{
			this.Physics.RemoveContactEntity(entity);
		}
Beispiel #8
0
		public void AddContactEntity(idEntity entity)
		{
			this.Physics.AddContactEntity(entity);
		}
Beispiel #9
0
		/// <summary>
		/// Activate the physics object.
		/// </summary>
		/// <param name="entity">Entity activating us.</param>
		public void ActivatePhysics(idEntity entity)
		{
			this.Physics.Activate();
		}
Beispiel #10
0
 /// <summary>
 /// Called whenever an entity recieves damage.  Returns whether the entity responds to the pain.
 /// </summary>
 /// <param name="inflictor"></param>
 /// <param name="attacker"></param>
 /// <param name="damage"></param>
 /// <param name="direction"></param>
 /// <param name="location"></param>
 /// <returns></returns>
 public virtual bool Pain(idEntity inflictor, idEntity attacker, int damage, Vector3 direction, int location)
 {
     return(false);
 }
Beispiel #11
0
		public override bool HandleSingleGuiCommand(idEntity entityGui, Text.idLexer lexer)
		{
			if(this.Disposed == true)
			{
				throw new ObjectDisposedException(this.GetType().Name);
			}

			idConsole.Warning("TODO: idPlayer.HandleSingleGuiCommand");

			return false;
		}
Beispiel #12
0
		public override void Damage(idEntity inflictor, idEntity attacker, Vector3 direction, string damageDefName, float damageScale, int location)
		{
			if(this.Disposed == true)
			{
				throw new ObjectDisposedException(this.GetType().Name);
			}

			idConsole.Warning("TODO: idPlayer.Damage");
		}
Beispiel #13
0
		/// <summary>
		/// Searches all active entities for the next one using the specified entityDef.
		/// </summary>
		/// <remarks>
		/// Searches beginning at the entity after from, or the beginning if NULL
		/// NULL will be returned if the end of the list is reached.
		/// </remarks>
		/// <param name="from"></param>
		/// <param name="match"></param>
		/// <returns></returns>
		public idEntity FindEntityUsingDef(idEntity from, string match)
		{
			int index = 0;

			if(from != null)
			{
				index = _spawnedEntities.IndexOf(from);

				if(index == -1)
				{
					index = 0;
				}
			}

			int count = _spawnedEntities.Count;
			string matchLower = match.ToLower();

			for(int i = index; i < count; i++)
			{
				idEntity ent = _spawnedEntities[i];

				if(ent.DefName.ToLower() == matchLower)
				{
					return ent;
				}
			}

			return null;
		}
Beispiel #14
0
		/// <summary>
		/// Callback function for when another entity received damage from this entity.  damage can be adjusted and returned to the caller.
		/// </summary>
		/// <param name="victim"></param>
		/// <param name="inflictor"></param>
		/// <param name="damage"></param>
		public virtual void DamageFeedback(idEntity victim, idEntity inflictor, ref int damage)
		{

		}
Beispiel #15
0
 /// <summary>
 /// Activate the physics object.
 /// </summary>
 /// <param name="entity">Entity activating us.</param>
 public void ActivatePhysics(idEntity entity)
 {
     this.Physics.Activate();
 }
Beispiel #16
0
 public void RemoveContactEntity(idEntity entity)
 {
     this.Physics.RemoveContactEntity(entity);
 }
Beispiel #17
0
 public void AddContactEntity(idEntity entity)
 {
     this.Physics.AddContactEntity(entity);
 }
Beispiel #18
0
		public virtual object GetImpactInfo(idEntity entity, int id, Vector3 point)
		{
			if(this.Disposed == true)
			{
				throw new ObjectDisposedException(this.GetType().Name);
			}

			idConsole.Warning("TODO: idEntity.GetImpactInfo");

			return null;
		}
Beispiel #19
0
 /// <summary>
 /// Callback function for when another entity received damage from this entity.  damage can be adjusted and returned to the caller.
 /// </summary>
 /// <param name="victim"></param>
 /// <param name="inflictor"></param>
 /// <param name="damage"></param>
 public virtual void DamageFeedback(idEntity victim, idEntity inflictor, ref int damage)
 {
 }
Beispiel #20
0
		public void RegisterEntity(idEntity entity)
		{
			int entitySpawnIndex;

			if(_spawnCount >= (1 << (32 - idR.GameEntityBits)))
			{
				idConsole.Error("idGameLocal.RegisterEntity: spawn count overflow");
			}

			if(_spawnArgs.ContainsKey("spawn_entnum") == true)
			{
				entitySpawnIndex = _spawnArgs.GetInteger("spawn_entnum", 0);
			}
			else
			{
				while((_entities[_firstFreeIndex] != null) && (_firstFreeIndex < idR.EntityCountNormalMax))
				{
					_firstFreeIndex++;
				}

				if(_firstFreeIndex >= idR.EntityCountNormalMax)
				{
					idConsole.Error("no free entities");
				}

				entitySpawnIndex = _firstFreeIndex++;
			}

			_entities[entitySpawnIndex] = entity;
			_spawnIds[entitySpawnIndex] = _spawnCount++;

			entity.Index = entitySpawnIndex;
			entity.SpawnArgs.TransferKeyValues(_spawnArgs);
			
			_spawnedEntities.Add(entity);

			if(entitySpawnIndex >= _entityCount)
			{
				_entityCount++;
			}
		}
Beispiel #21
0
		public virtual bool HandleSingleGuiCommand(idEntity entityGui, idLexer lexer)
		{
			return false;
		}
Beispiel #22
0
		public override void DamageFeedback(idEntity victim, idEntity inflictor, ref int damage)
		{
			if(this.Disposed == true)
			{
				throw new ObjectDisposedException(this.GetType().Name);
			}

			idConsole.Warning("TODO: idPlayer.GetAASLocation");
		}
Beispiel #23
0
		/// <summary>
		/// Called whenever an entity recieves damage.  Returns whether the entity responds to the pain.
		/// </summary>
		/// <param name="inflictor"></param>
		/// <param name="attacker"></param>
		/// <param name="damage"></param>
		/// <param name="direction"></param>
		/// <param name="location"></param>
		/// <returns></returns>
		public virtual bool Pain(idEntity inflictor, idEntity attacker, int damage, Vector3 direction, int location)
		{
			return false;
		}
Beispiel #24
0
		/// <summary>
		/// 
		/// </summary>
		/// <remarks>
		/// Use exitEntityNum to specify a teleport with private camera view and delayed exit.
		/// </remarks>
		/// <param name="origin"></param>
		/// <param name="angles"></param>
		/// <param name="destination"></param>
		public override void Teleport(Vector3 origin, idAngles angles, idEntity destination)
		{
			if(this.Disposed == true)
			{
				throw new ObjectDisposedException(this.GetType().Name);
			}

			idConsole.Warning("TODO: idPlayer.Teleport");
		}
Beispiel #25
0
 public virtual bool HandleSingleGuiCommand(idEntity entityGui, idLexer lexer)
 {
     return(false);
 }