fix bug where PROP wouldn't set properties of particle id 0
This commit is contained in:
parent
d38af2764c
commit
2cbee180a1
@ -388,23 +388,23 @@ int Simulation::flood_prop_2(int x, int y, size_t propoffset, void * propvalue,
|
|||||||
}
|
}
|
||||||
for (x=x1; x<=x2; x++)
|
for (x=x1; x<=x2; x++)
|
||||||
{
|
{
|
||||||
i = pmap[y][x]>>8;
|
i = pmap[y][x];
|
||||||
if (!i)
|
if (!i)
|
||||||
i = photons[y][x]>>8;
|
i = photons[y][x];
|
||||||
if (!i)
|
if (!i)
|
||||||
continue;
|
continue;
|
||||||
switch (proptype) {
|
switch (proptype) {
|
||||||
case StructProperty::Float:
|
case StructProperty::Float:
|
||||||
*((float*)(((char*)&parts[i])+propoffset)) = *((float*)propvalue);
|
*((float*)(((char*)&parts[i>>8])+propoffset)) = *((float*)propvalue);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case StructProperty::ParticleType:
|
case StructProperty::ParticleType:
|
||||||
case StructProperty::Integer:
|
case StructProperty::Integer:
|
||||||
*((int*)(((char*)&parts[i])+propoffset)) = *((int*)propvalue);
|
*((int*)(((char*)&parts[i>>8])+propoffset)) = *((int*)propvalue);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case StructProperty::UInteger:
|
case StructProperty::UInteger:
|
||||||
*((unsigned int*)(((char*)&parts[i])+propoffset)) = *((unsigned int*)propvalue);
|
*((unsigned int*)(((char*)&parts[i>>8])+propoffset)) = *((unsigned int*)propvalue);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user