summaryrefslogtreecommitdiff
path: root/src/elements
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-10-23 17:24:51 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-23 17:24:51 (GMT)
commitb04c20e747a03a895cdef478a7356e7a79c40200 (patch)
treef4d4cef2c2d965ef86fdcd482016b4c284fc4069 /src/elements
parent0a8f65b2cf69604151fcb26c8c1de80951005d1f (diff)
downloadpowder-b04c20e747a03a895cdef478a7356e7a79c40200.zip
powder-b04c20e747a03a895cdef478a7356e7a79c40200.tar.gz
More MSVC fixes
Diffstat (limited to 'src/elements')
-rw-r--r--src/elements/ligh.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/elements/ligh.c b/src/elements/ligh.c
index 30ffad7..bfbcd0d 100644
--- a/src/elements/ligh.c
+++ b/src/elements/ligh.c
@@ -44,10 +44,10 @@ int contact_part(int i, int tp)
void create_line_par(int x1, int y1, int x2, int y2, int c, int temp, int life, int tmp, int tmp2)
{
- if (c==WL_EHOLE || c==WL_ALLOWGAS || c==WL_ALLOWALLELEC || c==WL_ALLOWSOLID || c==WL_ALLOWAIR || c==WL_WALL || c==WL_DESTROYALL || c==WL_ALLOWLIQUID || c==WL_FAN || c==WL_STREAM || c==WL_DETECT || c==WL_EWALL || c==WL_WALLELEC)
- return; // this function only for particles, no walls
int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy;
float e, de;
+ if (c==WL_EHOLE || c==WL_ALLOWGAS || c==WL_ALLOWALLELEC || c==WL_ALLOWSOLID || c==WL_ALLOWAIR || c==WL_WALL || c==WL_DESTROYALL || c==WL_ALLOWLIQUID || c==WL_FAN || c==WL_STREAM || c==WL_DETECT || c==WL_EWALL || c==WL_WALLELEC)
+ return; // this function only for particles, no walls
if (cp)
{
y = x1;
@@ -115,7 +115,10 @@ int update_LIGH(UPDATE_FUNC_ARGS)
* tmp - angle of lighting
*
*/
- int r,rx,ry, multipler, powderful=parts[i].temp*(1+parts[i].life/40)*LIGHTING_POWER;
+ int r,rx,ry, multipler, powderful;
+ float angle, angle2=-1;
+ int near;
+ powderful = powderful=parts[i].temp*(1+parts[i].life/40)*LIGHTING_POWER;
update_PYRO(UPDATE_FUNC_SUBCALL_ARGS);
if (aheat_enable)
{
@@ -192,9 +195,9 @@ int update_LIGH(UPDATE_FUNC_ARGS)
return 1;
}
- float angle, angle2=-1;
+ angle2=-1;
- int near = LIGH_nearest_part(i, parts[i].life*2.5);
+ near = LIGH_nearest_part(i, parts[i].life*2.5);
if (near!=-1)
{
int t=parts[near].type;