Inheritance: IDisposable
Example #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");
        }
Example #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");
        }
Example #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");
        }
Example #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);
        }
Example #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));
        }
Example #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");	
		}
Example #7
0
		public void RemoveContactEntity(idEntity entity)
		{
			this.Physics.RemoveContactEntity(entity);
		}
Example #8
0
		public void AddContactEntity(idEntity entity)
		{
			this.Physics.AddContactEntity(entity);
		}
Example #9
0
		/// <summary>
		/// Activate the physics object.
		/// </summary>
		/// <param name="entity">Entity activating us.</param>
		public void ActivatePhysics(idEntity entity)
		{
			this.Physics.Activate();
		}
Example #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);
 }
Example #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;
		}
Example #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");
		}
Example #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;
		}
Example #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)
		{

		}
Example #15
0
 /// <summary>
 /// Activate the physics object.
 /// </summary>
 /// <param name="entity">Entity activating us.</param>
 public void ActivatePhysics(idEntity entity)
 {
     this.Physics.Activate();
 }
Example #16
0
 public void RemoveContactEntity(idEntity entity)
 {
     this.Physics.RemoveContactEntity(entity);
 }
Example #17
0
 public void AddContactEntity(idEntity entity)
 {
     this.Physics.AddContactEntity(entity);
 }
Example #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;
		}
Example #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)
 {
 }
Example #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++;
			}
		}
Example #21
0
		public virtual bool HandleSingleGuiCommand(idEntity entityGui, idLexer lexer)
		{
			return false;
		}
Example #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");
		}
Example #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;
		}
Example #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");
		}
Example #25
0
 public virtual bool HandleSingleGuiCommand(idEntity entityGui, idLexer lexer)
 {
     return(false);
 }