This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
The-Powder-Toy/src/simulation/elements/VRSS.cpp
Tamás Bálint Misius dbd971fb05
Convert float pavg[2] to int tmp3, tmp4
Also add GameSave::PressureInTmp3 to check for elements with pressure memory and fix TUNG not sampling pressure on creation. This does not in itself fix #822 because tmp3 and tmp4 are still saved in 16 bits each, so full ctypes still don't fit in tmp3.
2021-12-09 07:49:31 +01:00

58 lines
1.1 KiB
C++

#include "simulation/ElementCommon.h"
int Element_VIRS_update(UPDATE_FUNC_ARGS);
static int graphics(GRAPHICS_FUNC_ARGS);
void Element::Element_VRSS()
{
Identifier = "DEFAULT_PT_VRSS";
Name = "VRSS";
Colour = PIXPACK(0xD408CD);
MenuVisible = 0;
MenuSection = SC_SOLIDS;
Enabled = 1;
Advection = 0.0f;
AirDrag = 0.00f * CFDS;
AirLoss = 0.90f;
Loss = 0.00f;
Collision = 0.0f;
Gravity = 0.0f;
Diffusion = 0.00f;
HotAir = 0.000f * CFDS;
Falldown = 0;
Flammable = 0;
Explosive = 0;
Meltable = 0;
Hardness = 1;
Weight = 100;
DefaultProperties.temp = R_TEMP + 273.15f;
HeatConduct = 251;
Description = "Solid Virus. Turns everything it touches into virus.";
Properties = TYPE_SOLID|PROP_DEADLY;
LowPressure = IPL;
LowPressureTransition = NT;
HighPressure = IPH;
HighPressureTransition = NT;
LowTemperature = ITL;
LowTemperatureTransition = NT;
HighTemperature = 305.0f;
HighTemperatureTransition = PT_VIRS;
DefaultProperties.tmp4 = 250;
Update = &Element_VIRS_update;
Graphics = &graphics;
}
static int graphics(GRAPHICS_FUNC_ARGS)
{
*pixel_mode |= NO_DECO;
return 1;
}