@@ -45,64 +45,82 @@ int update_POWERED(UPDATE_FUNC_ARGS) {
4545 {
4646 if (parts[r>>8 ].life >2 )
4747 {
48- int tentmp2 = 10 , ninetmp2 = 9 , skipmoveflags = parts[i].flags |FLAG_SKIPMOVE;
4948 if (parts[r>>8 ].ctype ==PT_PSCN && parts[i].tmp2 < 10 )
5049 {
51- flood_prop (x,y,offsetof (particle, tmp2),&tentmp2,0 );
52- flood_prop (x,y,offsetof (particle, flags),&skipmoveflags,0 );
50+ PropertyValue tempValue;
51+ tempValue.Integer = 10 ;
52+ globalSim->FloodProp (x, y, Integer, tempValue, offsetof (particle, tmp2));
53+ tempValue.Integer = parts[i].flags |FLAG_SKIPMOVE;
54+ globalSim->FloodProp (x, y, Integer, tempValue, offsetof (particle, flags));
5355 }
5456 else if (parts[r>>8 ].ctype ==PT_NSCN && parts[i].tmp2 >= 10 )
5557 {
56- flood_prop (x,y,offsetof (particle, tmp2),&ninetmp2,0 );
57- flood_prop (x,y,offsetof (particle, flags),&skipmoveflags,0 );
58+ PropertyValue tempValue;
59+ tempValue.Integer = 9 ;
60+ globalSim->FloodProp (x, y, Integer, tempValue, offsetof (particle, tmp2));
61+ tempValue.Integer = parts[i].flags |FLAG_SKIPMOVE;
62+ globalSim->FloodProp (x, y, Integer, tempValue, offsetof (particle, flags));
5863 }
5964 }
6065 }
6166 else if (parts[i].type == PT_ANIM)
6267 {
6368 if (parts[r>>8 ].life >2 )
6469 {
65- int tenlife = 10 , ninelife = 9 , fourteenlife = 14 , zero = 0 , skipmoveflags = parts[i].flags |FLAG_SKIPMOVE;
6670 if (parts[r>>8 ].ctype ==PT_PSCN && parts[i].life < 10 )
6771 {
68- flood_prop (x,y,offsetof (particle, life),&tenlife,0 );
69- flood_prop (x,y,offsetof (particle, flags),&skipmoveflags,0 );
72+ PropertyValue tempValue;
73+ tempValue.Integer = 10 ;
74+ globalSim->FloodProp (x, y, Integer, tempValue, offsetof (particle, life));
75+ tempValue.Integer = parts[i].flags |FLAG_SKIPMOVE;
76+ globalSim->FloodProp (x, y, Integer, tempValue, offsetof (particle, flags));
7077 }
7178 else if (parts[r>>8 ].ctype ==PT_NSCN && (parts[i].life >= 10 || parts[i].tmp != (int )(parts[i].temp -273.15 ) || parts[i].tmp2 > 1 ))
7279 {
73- flood_prop (x,y,offsetof (particle, life),&ninelife,0 );
74- flood_prop (x,y,offsetof (particle, tmp),&zero,0 );
75- flood_prop (x,y,offsetof (particle, tmp2),&zero,0 );
76- flood_prop (x,y,offsetof (particle, flags),&skipmoveflags,0 );
80+ PropertyValue tempValue;
81+ tempValue.Integer = 9 ;
82+ globalSim->FloodProp (x, y, Integer, tempValue, offsetof (particle, life));
83+ tempValue.Integer = parts[i].flags |FLAG_SKIPMOVE;
84+ globalSim->FloodProp (x, y, Integer, tempValue, offsetof (particle, flags));
85+ tempValue.Integer = 0 ;
86+ globalSim->FloodProp (x, y, Integer, tempValue, offsetof (particle, tmp));
87+ globalSim->FloodProp (x, y, Integer, tempValue, offsetof (particle, tmp2));
7788 }
7889 else if (parts[r>>8 ].ctype ==PT_METL)
7990 {
8091 if (parts[i].life == 10 )
8192 {
82- flood_prop (x,y,offsetof (particle, life),&ninelife,0 );
83- // flood_prop(x,y,offsetof(particle, flags),&skipmoveflags,0);
93+ PropertyValue tempValue;
94+ tempValue.Integer = 9 ;
95+ globalSim->FloodProp (x, y, Integer, tempValue, offsetof (particle, life));
8496 }
8597 else if (parts[i].life == 0 )
8698 {
87- flood_prop (x,y,offsetof (particle, life),&fourteenlife,0 );
88- // flood_prop(x,y,offsetof(particle, flags),&skipmoveflags,0);
99+ PropertyValue tempValue;
100+ tempValue.Integer = 14 ;
101+ globalSim->FloodProp (x, y, Integer, tempValue, offsetof (particle, life));
89102 return 0 ;
90103 }
91104 }
92105 }
93106 }
94107 else
95108 {
96- int tenlife = 10 , ninelife = 9 , skipmoveflags = parts[i].flags |FLAG_SKIPMOVE;
97109 if (parts[r>>8 ].ctype ==PT_PSCN && parts[i].life < 10 )
98110 {
99- flood_prop (x,y,offsetof (particle, life),&tenlife,0 );
100- flood_prop (x,y,offsetof (particle, flags),&skipmoveflags,0 );
111+ PropertyValue tempValue;
112+ tempValue.Integer = 10 ;
113+ globalSim->FloodProp (x, y, Integer, tempValue, offsetof (particle, life));
114+ tempValue.Integer = parts[i].flags |FLAG_SKIPMOVE;
115+ globalSim->FloodProp (x, y, Integer, tempValue, offsetof (particle, flags));
101116 }
102117 else if (parts[r>>8 ].ctype ==PT_NSCN && parts[i].life >= 10 )
103118 {
104- flood_prop (x,y,offsetof (particle, life),&ninelife,0 );
105- flood_prop (x,y,offsetof (particle, flags),&skipmoveflags,0 );
119+ PropertyValue tempValue;
120+ tempValue.Integer = 9 ;
121+ globalSim->FloodProp (x, y, Integer, tempValue, offsetof (particle, life));
122+ tempValue.Integer = parts[i].flags |FLAG_SKIPMOVE;
123+ globalSim->FloodProp (x, y, Integer, tempValue, offsetof (particle, flags));
106124 }
107125 else if ((parts[i].type == PT_SWCH || parts[i].type == PT_BUTN) && parts[r>>8 ].ctype != PT_PSCN && parts[r>>8 ].ctype != PT_NSCN && !(parts[r>>8 ].ctype == PT_INWR && parts[r>>8 ].tmp == 1 ) && parts[i].life == 10 )
108126 {
0 commit comments