예제 #1
0
 public string nadeEventToSQL(Vector pos, string team, int landedOrThrown, int roundNumber, float currentTime, string type)
 {
     var sql = "insert into nadeEvents values (" +
         f2s(pos.X) + ", " +
         f2s(pos.Y) + ", " +
         toSqlString(team) + ", " +
         landedOrThrown + ", " +
         roundNumber + ", " +
         f2s(currentTime) + ", " +
         toSqlString(type)+ ")";
     return sql;
 }
예제 #2
0
 public Player()
 {
     Velocity = new Vector();
     LastAlivePosition = new Vector();
 }
예제 #3
0
		private void HandleBombSites()
		{
			SendTableParser.FindByName("CCSPlayerResource").OnNewEntity += (s1, newResource) => {
				newResource.Entity.FindProperty("m_bombsiteCenterA").VectorRecived += (s2, center) => {
					bombsiteACenter = center.Value;
				};
				newResource.Entity.FindProperty("m_bombsiteCenterB").VectorRecived += (s3, center) => {
					bombsiteBCenter = center.Value;
				};
			};

			SendTableParser.FindByName("CBaseTrigger").OnNewEntity += (s1, newResource) => {

				BoundingBoxInformation trigger = new BoundingBoxInformation(newResource.Entity.ID);
				triggers.Add(trigger);

				newResource.Entity.FindProperty("m_Collision.m_vecMins").VectorRecived += (s2, vector) => {
					trigger.Min = vector.Value;
				};

				newResource.Entity.FindProperty("m_Collision.m_vecMaxs").VectorRecived += (s3, vector) => {
					trigger.Max = vector.Value;
				};
			};

		}
예제 #4
0
		/// <summary>
		/// Checks wheter a point lies within the BoundingBox. 
		/// </summary>
		/// <param name="point">The point to check</param>
		public bool Contains(Vector point)
		{
			return point.X >= Min.X && point.X <= Max.X &&
				point.Y >= Min.Y && point.Y <= Max.Y &&
				point.Z >= Min.Z && point.Z <= Max.Z;
		}
예제 #5
0
 static void PrintKillEvent(DemoParser parser, StreamWriter outputStream, string demoName, string mapName, string killerName, Vector killerPosition, string killerWeapon, bool isHeadshot, int penetradedObjects, string killedName, Vector killedPosition)
 {
     string nameEvent = "kill";
     outputStream.WriteLine(string.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}",
     demoName,
     nameEvent,
     mapName,
     killerName,
     "X:" + killerPosition.X + ";Y:" + killerPosition.Y + ";Z:" + killerPosition.Z,
     killerWeapon,
     isHeadshot,
     penetradedObjects,
     killedName,
     "X:" + killedPosition.X + ";Y:" + killedPosition.Y + ";Z:" + killedPosition.Z
     ));
 }