1 #include "simulation/ElementCommon.h" 2 3 static int update(UPDATE_FUNC_ARGS); 4 Element_NBHL()5void Element::Element_NBHL() 6 { 7 Identifier = "DEFAULT_PT_NBHL"; 8 Name = "BHOL"; 9 Colour = PIXPACK(0x202020); 10 MenuVisible = 1; 11 MenuSection = SC_SPECIAL; 12 Enabled = 1; 13 14 Advection = 0.0f; 15 AirDrag = 0.00f * CFDS; 16 AirLoss = 0.90f; 17 Loss = 0.00f; 18 Collision = 0.0f; 19 Gravity = 0.0f; 20 Diffusion = 0.00f; 21 HotAir = 0.000f * CFDS; 22 Falldown = 0; 23 24 Flammable = 0; 25 Explosive = 0; 26 Meltable = 0; 27 Hardness = 0; 28 29 Weight = 100; 30 31 HeatConduct = 186; 32 Description = "Black hole, sucks in particles using gravity. (Requires Newtonian gravity)"; 33 34 Properties = TYPE_SOLID; 35 36 LowPressure = IPL; 37 LowPressureTransition = NT; 38 HighPressure = IPH; 39 HighPressureTransition = NT; 40 LowTemperature = ITL; 41 LowTemperatureTransition = NT; 42 HighTemperature = ITH; 43 HighTemperatureTransition = NT; 44 45 Update = &update; 46 } 47 update(UPDATE_FUNC_ARGS)48static int update(UPDATE_FUNC_ARGS) 49 { 50 if (parts[i].tmp) 51 sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] += restrict_flt(0.001f*parts[i].tmp, 0.1f, 51.2f); 52 else 53 sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] += 0.1f; 54 return 0; 55 } 56